Skip to content

Commit

Permalink
add: show popup control
Browse files Browse the repository at this point in the history
fix: #286
fix: fx115 settings layout
  • Loading branch information
windingwind committed Mar 28, 2024
1 parent 8d42d7b commit 0b6663c
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 5 deletions.
21 changes: 17 additions & 4 deletions addon/chrome/content/preferences.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<html:link rel="localization" href="__addonRef__-preferences.ftl" />
</linkset>
<html:style>
.virtualized-table-container { height: 300px; max-height: 300px; }
.action-button { min-width:auto; width:30px; height:24px;
-moz-context-properties: fill, fill-opacity; fill: currentColor;}
#__addonRef__-action-add {
Expand All @@ -24,10 +25,15 @@
</html:style>
<groupbox style="width: -moz-available">
<label><html:h2 data-l10n-id="action"></html:h2></label>
<hbox class="virtualized-table-container" flex="1" height="300px">
<hbox
class="virtualized-table-container"
flex="1"
height="300px"
align="center"
>
<html:div id="__addonRef__-table-container" />
</hbox>
<hbox>
<hbox align="center">
<button
id="__addonRef__-action-add"
class="action-button"
Expand Down Expand Up @@ -59,7 +65,7 @@
data-l10n-id="action-import"
></button>
</hbox>
<hbox>
<hbox align="center">
<checkbox
preference="__prefsPrefix__.ruleWarningDisabled"
native="true"
Expand All @@ -69,7 +75,7 @@
</groupbox>
<groupbox style="width: -moz-available">
<label><html:h2 data-l10n-id="menu"></html:h2></label>
<hbox>
<hbox align="center">
<label data-l10n-id="menu-sort"></label>
<menulist preference="__prefsPrefix__.menuSortBy" native="true">
<menupopup>
Expand All @@ -82,6 +88,13 @@
</menupopup>
</menulist>
</hbox>
<hbox align="center">
<checkbox
preference="__prefsPrefix__.showPopup"
native="true"
data-l10n-id="show-popup"
></checkbox>
</hbox>
</groupbox>
<html:label
data-l10n-id="help"
Expand Down
3 changes: 3 additions & 0 deletions addon/locale/en-US/preferences.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@ menu-sort-menuLabel =
menu-sort-name =
.label = Name
show-popup =
.label = Show popup after running action
script-warning-ignore =
.label = Don't show warning when saving script actions
3 changes: 3 additions & 0 deletions addon/locale/it-IT/preferences.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@ menu-sort-menuLabel =
menu-sort-name =
.label = Nome
show-popup =
.label = Show popup after running action
script-warning-ignore =
.label = Non mostrare avvisi durante il salvataggio di azioni di script
3 changes: 3 additions & 0 deletions addon/locale/zh-CN/preferences.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@ menu-sort-menuLabel =
menu-sort-name =
.label = 名称
show-popup =
.label = 在运行动作后显示状态弹窗
script-warning-ignore =
.label = 在保存自定义脚本时不显示警告
1 change: 1 addition & 0 deletions addon/prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
pref("__prefsPrefix__.rulesInit", false);
pref("__prefsPrefix__.ruleWarningDisabled", false);
pref("__prefsPrefix__.menuSortBy", "menu");
pref("__prefsPrefix__.showPopup", true);
2 changes: 1 addition & 1 deletion src/utils/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ async function applyAction(action: ActionData, args: ActionArgs) {
await (item && item.save());
});
ztoolkit.log("applyAction", action, args);
message && updateHint(message);
message && getPref("showPopup") !== false && updateHint(message);
return true;
}

Expand Down

0 comments on commit 0b6663c

Please sign in to comment.