Add '+' shortcut for new subscription page
This commit is contained in:
parent
4831acba39
commit
1e357d3ced
3 changed files with 8 additions and 0 deletions
|
@ -47,6 +47,7 @@
|
|||
</head>
|
||||
<body
|
||||
{{ if .csrf }}data-csrf-token="{{ .csrf }}"{{ end }}
|
||||
data-add-subscription-url="{{ route "addSubscription" }}"
|
||||
data-entries-status-url="{{ route "updateEntriesStatus" }}"
|
||||
data-refresh-all-feeds-url="{{ route "refreshAllFeeds" }}"
|
||||
{{ if .user }}{{ if not .user.KeyboardShortcuts }}data-disable-keyboard-shortcuts="true"{{ end }}{{ end }}>
|
||||
|
@ -128,6 +129,7 @@
|
|||
<li>{{ t "page.keyboard_shortcuts.go_to_categories" }} = <strong>g + c</strong></li>
|
||||
<li>{{ t "page.keyboard_shortcuts.go_to_settings" }} = <strong>g + s</strong></li>
|
||||
<li>{{ t "page.keyboard_shortcuts.show_keyboard_shortcuts" }} = <strong>?</strong></li>
|
||||
<li>{{ t "menu.add_feed" }} = <strong>+</strong></li>
|
||||
</ul>
|
||||
|
||||
<p>{{ t "page.keyboard_shortcuts.subtitle.items" }}</p>
|
||||
|
|
|
@ -612,3 +612,8 @@ function showToast(label, iconElement) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Navigate to the new subscription page. */
|
||||
function goToAddSubscription() {
|
||||
window.location.href = document.body.dataset.addSubscriptionUrl;
|
||||
}
|
||||
|
|
1
ui/static/js/bootstrap.js
vendored
1
ui/static/js/bootstrap.js
vendored
|
@ -32,6 +32,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
keyboardHandler.on("F", () => goToFeed());
|
||||
keyboardHandler.on("R", () => handleRefreshAllFeeds());
|
||||
keyboardHandler.on("?", () => showKeyboardShortcuts());
|
||||
keyboardHandler.on("+", () => goToAddSubscription());
|
||||
keyboardHandler.on("#", () => unsubscribeFromFeed());
|
||||
keyboardHandler.on("/", (e) => setFocusToSearchInput(e));
|
||||
keyboardHandler.on("Escape", () => ModalHandler.close());
|
||||
|
|
Loading…
Reference in a new issue