Skip to content

Commit

Permalink
remake new features page etc
Browse files Browse the repository at this point in the history
also adjusted an english translation
  • Loading branch information
RoderickQiu committed Oct 9, 2022
1 parent 3780d99 commit b0297b7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
21 changes: 16 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,18 @@
if (store.get("islocked")) $("#locker").css("display", "inline-block");
</script>
</div>
<div id="new-feature" class="container-fluid"></div>
<div id="new-feature" class="container-fluid p-5">
<div class="align-content-center small text-left">
<h6 id="new-feature-title" class="rest"></h6>
<div id="new-feature-description" class="small text-grey"></div>
<div id="new-feature-description-universal" class="small text-grey"></div>
<div id="new-feature-btn-container" class="w-100 text-right">
<button type="button" class="btn-sm btn btn-outline-primary" onclick="newFeatureClose()">
<script>document.write(i18n.__('ok'));</script>
</button>
</div>
</div>
</div>
<div id="set-onlyrest" class="container-fluid">
<div class="align-content-center">
<input name="rest-time-onlyrest" id="rest-time-onlyrest" type="text" onkeyup="allSet()"
Expand Down Expand Up @@ -329,10 +340,10 @@

//new feature message
if (require("./update.json")["feature-introduction"] && !store.has("introduced-" + require("./update.json").version)) {
$("#new-feature-title").text(require("./update.json")["introduce"][store.get("i18n")]["title"]);
$("#new-feature-description").text(require("./update.json")["introduce"][store.get("i18n")]["description"][process.platform]);
$("#new-feature-description-universal").text(require("./update.json")["introduce"][store.get("i18n")]["description"]["universal"]);
$("#new-feature-image").attr("src", require("./update.json")["introduce"][store.get("i18n")]["image"]);
$("#new-feature-title").html(require("./update.json")["introduce"][store.get("i18n")]["title"]);
$("#new-feature-description").html(require("./update.json")["introduce"][store.get("i18n")]["description"][process.platform]);
$("#new-feature-description-universal").html(require("./update.json")["introduce"][store.get("i18n")]["description"]["universal"]);
//$("#new-feature-image").attr("src", require("./update.json")["introduce"][store.get("i18n")]["image"]);
$("#new-feature").show();
$("#bottom-btn").hide();
$("#set").hide();
Expand Down
2 changes: 1 addition & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"predefined-task-wnr-recommended" : "wnr recommended",
"predefined-task-pomodoro" : "pomodoro",
"predefined-task-class-time" : "class time",
"focus-notify-pre" : "When",
"focus-notify-pre" : "when",
"focus-notify-working" : "working",
"focus-notify-resting" : "resting",
"focus-notify-body" : "focus mode will be on",
Expand Down
15 changes: 15 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,21 @@ li input:nth-last-child(4)::after {
-webkit-app-region: no-drag;
}

#new-feature {
text-align: left;
line-height: 2.2;
transform: translateY(10px);
}

#new-feature-description, #new-feature-description-universal {
padding-top: 5px;
padding-bottom: 0;
}

#new-feature-btn-container {
transform: translateY(-9px);
}

#top-bar {
position: absolute;
right: 50%;
Expand Down

0 comments on commit b0297b7

Please sign in to comment.