diff options
author | Phil Hughes <me@iamphill.com> | 2017-06-16 18:38:45 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-06-21 16:45:23 +0300 |
commit | 4e1591c035718f77a5e6617ff720f23d8fc3ab89 (patch) | |
tree | f6207c6d30535e6a55527583530f0f10a6a3ca5e /app/assets | |
parent | 1dafd67010c2e400e25daac7d3ab650826413ef6 (diff) |
added section to profile/preferences
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/images/new_nav.png | bin | 0 -> 23771 bytes | |||
-rw-r--r-- | app/assets/images/old_nav.png | bin | 0 -> 25617 bytes | |||
-rw-r--r-- | app/assets/javascripts/dispatcher.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/experimental_flags.js | 11 |
4 files changed, 15 insertions, 0 deletions
diff --git a/app/assets/images/new_nav.png b/app/assets/images/new_nav.png Binary files differnew file mode 100644 index 00000000000..8879d26d341 --- /dev/null +++ b/app/assets/images/new_nav.png diff --git a/app/assets/images/old_nav.png b/app/assets/images/old_nav.png Binary files differnew file mode 100644 index 00000000000..23fae7aa19e --- /dev/null +++ b/app/assets/images/old_nav.png diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 88b4b567fa9..31a86090242 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -55,6 +55,7 @@ import RefSelectDropdown from './ref_select_dropdown'; import GfmAutoComplete from './gfm_auto_complete'; import ShortcutsBlob from './shortcuts_blob'; import initSettingsPanels from './settings_panels'; +import initExperimentalFlags from './experimental_flags'; (function() { var Dispatcher; @@ -120,6 +121,9 @@ import initSettingsPanels from './settings_panels'; } switch (page) { + case 'profiles:preferences:show': + initExperimentalFlags(); + break; case 'sessions:new': new UsernameValidator(); new ActiveTabMemoizer(); diff --git a/app/assets/javascripts/experimental_flags.js b/app/assets/javascripts/experimental_flags.js new file mode 100644 index 00000000000..5564df25159 --- /dev/null +++ b/app/assets/javascripts/experimental_flags.js @@ -0,0 +1,11 @@ +import Cookies from 'js-cookie'; + +export default () => { + $('.js-expirement-feature-toggle').on('change', (e) => { + const el = e.target; + + Cookies.set(el.name, el.value, { + expires: 365 * 10, + }); + }); +}; |