summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2022-02-25 18:45:00 +0300
committerAndrew Dolgov <[email protected]>2022-02-25 18:45:00 +0300
commita39557451604ba1ad4558f8283f1a13ca76ba5ba (patch)
tree539ce1565b285c722f813894c0d877dad6e237f6 /index.php
parent39c0bd378afb804cf3a13477ae606eaa65d75f7b (diff)
actions dropdown: add context-sensitive UI layout labels
Diffstat (limited to 'index.php')
-rw-r--r--index.php29
1 files changed, 24 insertions, 5 deletions
diff --git a/index.php b/index.php
index 37a3253b9..b1f3274f3 100644
--- a/index.php
+++ b/index.php
@@ -239,10 +239,26 @@
<span><i class="material-icons">menu</i></span>
<div dojoType="dijit.Menu" style="display: none">
<script type='dojo/method' event='onOpen' args='evt,a,b,c'>
- const ws = this.getChildren().find((m) => m.id == 'qmcToggleWidescreen');
+ const widescreen = this.getChildren().find((m) => m.id == 'qmcToggleWidescreen');
+ const expanded = this.getChildren().find((m) => m.id == 'qmcToggleExpanded');
+ const combined = this.getChildren().find((m) => m.id == 'qmcToggleCombined');
+
+ if (combined)
+ combined.attr('label',
+ App.isCombinedMode() ? __('Switch to three panel view') : __('Switch to combined view'));
+
+ if (widescreen)
+ widescreen
+ .attr('hidden', !!App.isCombinedMode())
+ .attr('label',
+ App.isWideScreenMode() ? __('Disable widescreen mode') : __('Enable widescreen mode'));
+
+ if (expanded)
+ expanded
+ .attr('hidden', !App.isCombinedMode())
+ .attr('label',
+ App.isExpandedMode() ? __('Expand selected article only') : __('Expand all articles'));
- if (ws)
- ws.attr('hidden', !!App.isCombinedMode());
</script>
<div dojoType="dijit.MenuItem" onclick="App.onActionSelected('qmcPrefs')"><?= __('Preferences...') ?></div>
@@ -254,10 +270,13 @@
<div dojoType="dijit.MenuItem" disabled="1"><?= __('All feeds:') ?></div>
<div dojoType="dijit.MenuItem" onclick="App.onActionSelected('qmcCatchupAll')"><?= __('Mark as read') ?></div>
<div dojoType="dijit.MenuItem" onclick="App.onActionSelected('qmcShowOnlyUnread')"><?= __('(Un)hide read feeds') ?></div>
- <div dojoType="dijit.MenuItem" disabled="1"><?= __('Other actions:') ?></div>
+ <div dojoType="dijit.MenuItem" disabled="1"><?= __('UI layout:') ?></div>
+ <div dojoType="dijit.MenuItem" id="qmcToggleCombined" onclick="App.onActionSelected('qmcToggleCombined')"><?= __('Toggle combined mode') ?></div>
<div dojoType="dijit.MenuItem" id="qmcToggleWidescreen" onclick="App.onActionSelected('qmcToggleWidescreen')">
<?= __('Toggle widescreen mode') ?></div>
- <div dojoType="dijit.MenuItem" onclick="App.onActionSelected('qmcToggleCombined')"><?= __('Toggle combined mode') ?></div>
+ <div dojoType="dijit.MenuItem" id="qmcToggleExpanded" onclick="App.onActionSelected('qmcToggleExpanded')">
+ <?= __('Toggle expand all articles') ?></div>
+ <div dojoType="dijit.MenuItem" disabled="1"><?= __('Other actions:') ?></div>
<div dojoType="dijit.MenuItem" onclick="App.onActionSelected('qmcHKhelp')"><?= __('Keyboard shortcuts help') ?></div>
<?php