Skip to content

Commit

Permalink
Final fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp <[email protected]>
  • Loading branch information
Kiuryy committed Jun 11, 2023
1 parent 1d2f8cf commit 5512b22
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"message": "Lesezeichen"
},
"extension_desc": {
"message": "F\u00fcgt eine ausklappbare Leiste mit all deinen Lesezeichen auf der Seite deines Browsers hinzu. Alternativ kann die Lesezeichenleiste auch in der Seitenleiste des Browsers neben dem Seiteninhalt angezeigt werden."
"message": "F\u00fcgt eine ausklappbare Leiste mit all deinen Lesezeichen auf der Seite deines Browsers hinzu."
},
"extension_version": {
"message": "Version"
Expand Down
2 changes: 1 addition & 1 deletion src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"message": "Bookmarks"
},
"extension_desc": {
"message": "Adds a toggleable sidebar with all your bookmarks to the edge of your browser window or inside the browser provided side panel alongside the main content of a webpage."
"message": "Adds a toggleable sidebar with all your bookmarks at the edge of your browser window."
},
"extension_author": {
"message": "Philipp K\u00f6nig"
Expand Down
2 changes: 1 addition & 1 deletion src/_locales/en_US/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"message": "Bookmarks"
},
"extension_desc": {
"message": "Adds a toggleable sidebar with all your bookmarks to the edge of your browser window or inside the browser provided side panel alongside the main content of a webpage."
"message": "Adds a toggleable sidebar with all your bookmarks at the edge of your browser window."
},
"extension_version": {
"message": "Version"
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/sl/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"extension_name_short": {
"message": "Zaznamki"
},
"extension_desc": {
"message": "Doda preklopljivo vrstico z vsemi va\u0161imi zaznamki na rob okna va\u0161ega brskalnika."
},
"extension_version": {
"message": "Verzija"
},
Expand Down
3 changes: 3 additions & 0 deletions src/_locales/zh_CN/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"extension_name_short": {
"message": "\u4e66\u7b7e"
},
"extension_desc": {
"message": "\u5728\u6d4f\u89c8\u5668\u89c6\u56fe\u533a\u5de6\u4fa7\u6dfb\u52a0\u53ef\u8c03\u8282\u7684\u4fa7\u8fb9\u680f\u7ba1\u7406\u60a8\u7684\u4e66\u7b7e."
},
"extension_version": {
"message": "\u7248\u672c"
},
Expand Down
1 change: 1 addition & 0 deletions src/js/onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
"b/iconAction": value === "icon" ? "overlay" : "sidepanel",
"b/overlayEnabled": true
});
this.helper.model.call("reloadBrowserAction");
await gotoNextSlide();
}
}).on("mouseenter", (e) => {
Expand Down
26 changes: 22 additions & 4 deletions src/js/settings/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,23 +251,27 @@
indicatorMenuPoint.removeClass($.cl.hidden);
hideableBoxes.removeClass($.cl.hidden);
s.elm.sidebar.previewVideoOverlay.removeClass($.cl.disabled);
s.elm.select.iconAction.removeAttr("disabled");
s.elm.select.openAction.trigger("change");
} else {
indicatorMenuPoint.addClass($.cl.hidden);
hideableBoxes.addClass($.cl.hidden);
s.elm.sidebar.previewVideoOverlay.addClass($.cl.disabled);
s.elm.select.iconAction[0].value = "sidepanel";
s.elm.select.iconAction.attr("disabled", "disabled").trigger("change");
}
enableDisableIconAction();
});

s.elm.select.sidebarPosition.on("change", (e) => {
s.elm.sidebar.toggleArea.attr($.attr.type, e.currentTarget.value);
});

s.elm.select.openAction.on("change", (e) => {
if (!s.helper.checkbox.isChecked(s.elm.checkbox.overlayEnabled)) {
return;
}

// hide menupoint for changing the appearance of the indicator if it is not visible at all
if ((e.currentTarget.value === "contextmenu" || e.currentTarget.value === "mousedown") && s.helper.checkbox.isChecked(s.elm.checkbox.overlayEnabled)) {
if (e.currentTarget.value === "contextmenu" || e.currentTarget.value === "mousedown") {
indicatorMenuPoint.removeClass($.cl.hidden);
} else {
indicatorMenuPoint.addClass($.cl.hidden);
Expand All @@ -277,10 +281,10 @@
if (e.currentTarget.value === "icon") {
s.elm.sidebar.toggleArea.addClass($.cl.hidden);
s.elm.select.iconAction[0].value = "overlay";
s.elm.select.iconAction.trigger("change");
} else {
s.elm.sidebar.toggleArea.removeClass($.cl.hidden);
}
enableDisableIconAction();
});

s.elm.select.rememberState.on("change", (e) => { // toggle the checkbox to configure whether to remember opened subdirectories, too (won't be displayed when user select to remember nothing)
Expand All @@ -300,6 +304,20 @@
});
});
};

/**
* Enable or Disable the ability to change the value of the field "iconAction" based on what is configured
*/
const enableDisableIconAction = () => {
const openAction = s.elm.select.openAction[0].value;
const overlayEnabled = s.helper.checkbox.isChecked(s.elm.checkbox.overlayEnabled);

if (openAction === "icon" || !overlayEnabled) {
s.elm.select.iconAction.attr("disabled", "disabled").trigger("change");
} else {
s.elm.select.iconAction.removeAttr("disabled");
}
};
};

})(jsu);

0 comments on commit 5512b22

Please sign in to comment.