From 74a0cc6a119f64ff368945523260408323b364e8 Mon Sep 17 00:00:00 2001 From: Ondřej Hruška Date: Sat, 22 Jul 2017 19:51:34 +0200 Subject: Added settings toggle to move the navbar at the bottom in mobile view (#93) --- app/javascript/glitch/components/local_settings/page/index.js | 8 ++++++++ app/javascript/glitch/locales/en.json | 1 + app/javascript/glitch/reducers/local_settings.js | 1 + 3 files changed, 10 insertions(+) (limited to 'app/javascript/glitch') diff --git a/app/javascript/glitch/components/local_settings/page/index.js b/app/javascript/glitch/components/local_settings/page/index.js index 8635b604f..cb041c0b8 100644 --- a/app/javascript/glitch/components/local_settings/page/index.js +++ b/app/javascript/glitch/components/local_settings/page/index.js @@ -53,6 +53,14 @@ export default class LocalSettingsPage extends React.PureComponent { > + + + ), ({ onChange, settings }) => ( diff --git a/app/javascript/glitch/locales/en.json b/app/javascript/glitch/locales/en.json index d202d9c33..21616f556 100644 --- a/app/javascript/glitch/locales/en.json +++ b/app/javascript/glitch/locales/en.json @@ -26,6 +26,7 @@ "settings.media_fullwidth": "Full-width media previews", "settings.preferences": "User preferences", "settings.wide_view": "Wide view (Desktop mode only)", + "settings.navbar_under": "Navbar at the bottom (Mobile only)", "status.collapse": "Collapse", "status.uncollapse": "Uncollapse", "notification.markForDeletion": "Mark for deletion" diff --git a/app/javascript/glitch/reducers/local_settings.js b/app/javascript/glitch/reducers/local_settings.js index 35a8e065b..386d59ceb 100644 --- a/app/javascript/glitch/reducers/local_settings.js +++ b/app/javascript/glitch/reducers/local_settings.js @@ -51,6 +51,7 @@ These are only used if no previously-saved values exist. const initialState = ImmutableMap({ layout : 'auto', stretch : true, + navbar_under : false, collapsed : ImmutableMap({ enabled : true, auto : ImmutableMap({ -- cgit