diff options
author | Frédéric Guillot <fred@miniflux.net> | 2019-04-28 18:20:46 -0700 |
---|---|---|
committer | fguillot <fred@miniflux.net> | 2019-04-28 18:35:58 -0700 |
commit | 4295a86e55e765e3e396a03c090bd08be9e0a390 (patch) | |
tree | 77b388feb1ec345c3823b7c7338ab8d293ff3b77 /template/html | |
parent | 3c8cc0b2b69c8de7343dfbec0e22934c954487df (diff) |
Add option to enable/disable keyboard shortcuts
Diffstat (limited to 'template/html')
-rw-r--r-- | template/html/common/layout.html | 4 | ||||
-rw-r--r-- | template/html/settings.html | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/template/html/common/layout.html b/template/html/common/layout.html index 312c21f..695d177 100644 --- a/template/html/common/layout.html +++ b/template/html/common/layout.html @@ -38,7 +38,9 @@ <script type="text/javascript" src="{{ route "javascript" "name" "app" }}?{{ .app_js_checksum }}" defer></script> <script type="text/javascript" src="{{ route "javascript" "name" "sw" }}?{{ .sw_js_checksum }}" defer id="service-worker-script"></script> </head> -<body data-entries-status-url="{{ route "updateEntriesStatus" }}"> +<body + data-entries-status-url="{{ route "updateEntriesStatus" }}" + {{ if .user }}{{ if not .user.KeyboardShortcuts }}data-disable-keyboard-shortcuts="true"{{ end }}{{ end }}> {{ if .user }} <header class="header"> <nav> diff --git a/template/html/settings.html b/template/html/settings.html index 3b07871..dbaee71 100644 --- a/template/html/settings.html +++ b/template/html/settings.html @@ -64,6 +64,8 @@ <option value="desc" {{ if eq "desc" $.form.EntryDirection }}selected="selected"{{ end }}>{{ t "form.prefs.select.recent_first" }}</option> </select> + <label><input type="checkbox" name="keyboard_shortcuts" value="1" {{ if .form.KeyboardShortcuts }}checked{{ end }}> {{ t "form.prefs.label.keyboard_shortcuts" }}</label> + <div class="buttons"> <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button> </div> |