[devdocsgjs/main: 946/1867] Don't add auto-hide layout based on current location
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 946/1867] Don't add auto-hide layout based on current location
- Date: Fri, 19 Nov 2021 23:47:36 +0000 (UTC)
commit e0e158c8d707eb59d141bc484ef5657416e8ac0d
Author: Stefan Selent <stefan selent sap com>
Date: Mon Oct 7 20:56:53 2019 -0700
Don't add auto-hide layout based on current location
...instead of just by layout name
assets/javascripts/app/router.coffee | 3 +++
assets/javascripts/app/settings.coffee | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/assets/javascripts/app/router.coffee b/assets/javascripts/app/router.coffee
index 38617f12..ba25148a 100644
--- a/assets/javascripts/app/router.coffee
+++ b/assets/javascripts/app/router.coffee
@@ -124,6 +124,9 @@ class app.Router
isIndex: ->
@context?.path is '/' or (app.isSingleDoc() and @context?.entry?.isIndex())
+ isSettings: ->
+ @context?.path is '/settings'
+
setInitialPath: ->
# Remove superfluous forward slashes at the beginning of the path
if (path = location.pathname.replace /^\/{2,}/g, '/') isnt location.pathname
diff --git a/assets/javascripts/app/settings.coffee b/assets/javascripts/app/settings.coffee
index 350a08c0..8a4c2b72 100644
--- a/assets/javascripts/app/settings.coffee
+++ b/assets/javascripts/app/settings.coffee
@@ -129,7 +129,7 @@ class app.Settings
toggleLayout: (layout, enable) ->
classList = document.body.classList
- classList.toggle(layout, enable) unless layout is '_sidebar-hidden'
+ classList.toggle(layout, enable) unless app.router?.isSettings
classList.toggle('_overlay-scrollbars', $.overlayScrollbarsEnabled())
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]