[devdocsgjs/main: 1388/1867] Use `app.settings.get('arrowScroll')`
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 1388/1867] Use `app.settings.get('arrowScroll')`
- Date: Fri, 19 Nov 2021 23:47:56 +0000 (UTC)
commit 5318bb4b29b5cd521a6e4fb20899aa1fd680c27c
Author: Simon Legner <Simon Legner gmail com>
Date: Tue Dec 15 17:31:18 2020 +0100
Use `app.settings.get('arrowScroll')`
assets/javascripts/templates/pages/help_tmpl.coffee | 7 ++++---
assets/javascripts/templates/tip_tmpl.coffee | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/assets/javascripts/templates/pages/help_tmpl.coffee
b/assets/javascripts/templates/pages/help_tmpl.coffee
index 530f9435..daca8d46 100644
--- a/assets/javascripts/templates/pages/help_tmpl.coffee
+++ b/assets/javascripts/templates/pages/help_tmpl.coffee
@@ -1,6 +1,7 @@
app.templates.helpPage = ->
ctrlKey = if $.isMac() then 'cmd' else 'ctrl'
navKey = if $.isMac() then 'cmd' else 'alt'
+ arrowScroll = app.settings.get('arrowScroll')
aliases_one = {}
aliases_two = {}
@@ -66,12 +67,12 @@ app.templates.helpPage = ->
<h3 class="_shortcuts-title">Sidebar</h3>
<dl class="_shortcuts-dl">
<dt class="_shortcuts-dt">
- #{if app.settings.cache.arrowScroll then '<code class="_shortcut-code">shift</code> + ' else ''}
+ #{if arrowScroll then '<code class="_shortcut-code">shift</code> + ' else ''}
<code class="_shortcut-code">↓</code>
<code class="_shortcut-code">↑</code>
<dd class="_shortcuts-dd">Move selection
<dt class="_shortcuts-dt">
- #{if app.settings.cache.arrowScroll then '<code class="_shortcut-code">shift</code> + ' else ''}
+ #{if arrowScroll then '<code class="_shortcut-code">shift</code> + ' else ''}
<code class="_shortcut-code">→</code>
<code class="_shortcut-code">←</code>
<dd class="_shortcuts-dd">Show/hide sub-list
@@ -92,7 +93,7 @@ app.templates.helpPage = ->
<code class="_shortcut-code">#{navKey} + →</code>
<dd class="_shortcuts-dd">Go back/forward
<dt class="_shortcuts-dt">
- #{if app.settings.cache.arrowScroll
+ #{if arrowScroll
'<code class="_shortcut-code">↓</code> ' +
'<code class="_shortcut-code">↑</code>'
else
diff --git a/assets/javascripts/templates/tip_tmpl.coffee b/assets/javascripts/templates/tip_tmpl.coffee
index 227ebf5d..55979fa4 100644
--- a/assets/javascripts/templates/tip_tmpl.coffee
+++ b/assets/javascripts/templates/tip_tmpl.coffee
@@ -3,8 +3,8 @@ app.templates.tipKeyNav = () -> """
<strong>ProTip</strong>
<span class="_notif-info">(click to dismiss)</span>
<p class="_notif-text">
- Hit #{if app.settings.cache.arrowScroll then '<code class="_label">shift</code> +' else ''} <code
class="_label">↓</code> <code class="_label">↑</code> <code class="_label">←</code> <code
class="_label">→</code> to navigate the sidebar.<br>
- Hit <code class="_label">space / shift space</code>#{if app.settings.cache.arrowScroll then ' or <code
class="_label">↓/↑</code>' else ', <code class="_label">alt ↓/↑</code> or <code
class="_label">shift ↓/↑</code>'} to scroll the page.
+ Hit #{if app.settings.get('arrowScroll') then '<code class="_label">shift</code> +' else ''} <code
class="_label">↓</code> <code class="_label">↑</code> <code class="_label">←</code> <code
class="_label">→</code> to navigate the sidebar.<br>
+ Hit <code class="_label">space / shift space</code>#{if app.settings.get('arrowScroll') then ' or <code
class="_label">↓/↑</code>' else ', <code class="_label">alt ↓/↑</code> or <code
class="_label">shift ↓/↑</code>'} to scroll the page.
<p class="_notif-text">
<a href="/help#shortcuts" class="_notif-link">See all keyboard shortcuts</a>
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]