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 | |
parent | 3c8cc0b2b69c8de7343dfbec0e22934c954487df (diff) |
Add option to enable/disable keyboard shortcuts
Diffstat (limited to 'template')
-rw-r--r-- | template/common.go | 6 | ||||
-rw-r--r-- | template/html/common/layout.html | 4 | ||||
-rw-r--r-- | template/html/settings.html | 2 | ||||
-rw-r--r-- | template/views.go | 4 |
4 files changed, 12 insertions, 4 deletions
diff --git a/template/common.go b/template/common.go index 379f7f9..94ccd04 100644 --- a/template/common.go +++ b/template/common.go @@ -112,7 +112,9 @@ var templateCommonMap = map[string]string{ <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> @@ -245,6 +247,6 @@ var templateCommonMap = map[string]string{ var templateCommonMapChecksums = map[string]string{ "entry_pagination": "4faa91e2eae150c5e4eab4d258e039dfdd413bab7602f0009360e6d52898e353", "item_meta": "34deb081a054f2948ad808bdb2c8603d6ab00c58f2f50c4ead0b47ae092888eb", - "layout": "4a5339267f67b5999a22ece7584df4c75785bc3bf95d44e1891da763aaea7991", + "layout": "838fb8ec4df4120ff63168c15d900e3734f52e4b7473fb1d45695e6b27540d11", "pagination": "3386e90c6e1230311459e9a484629bc5d5bf39514a75ef2e73bbbc61142f7abb", } 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> diff --git a/template/views.go b/template/views.go index 3d71d9d..e237d19 100644 --- a/template/views.go +++ b/template/views.go @@ -1282,6 +1282,8 @@ var templateViewsMap = map[string]string{ <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> @@ -1437,7 +1439,7 @@ var templateViewsMapChecksums = map[string]string{ "login": "2e72d2d4b9786641b696bedbed5e10b04bdfd68254ddbbdb0a53cca621d200c7", "search_entries": "d71849a4f2b0573c7c76ad0ea941812009e9f022de60895987a781d3e6f08a01", "sessions": "1b3ec0970a4111b81f86d6ed187bb410f88972e2ede6723b9febcc4c7e5fc921", - "settings": "bc04faf83dd977306825973375954600bd014619340188e1243fd9e2f5d5e1a9", + "settings": "152143e58d057ea6ab3bfd8dd947bfd70685843ca40e40542484b23849746df4", "unread_entries": "880018cbc59ec09b23dd800c4010fadad944d7023e0d36a3872c09b5d4952799", "users": "4b56cc76fbcc424e7c870d0efca93bb44dbfcc2a08b685cf799c773fbb8dfb2f", } |