diff options
| author | HJ <spam@hjkos.com> | 2018-12-11 20:35:19 +0000 |
|---|---|---|
| committer | HJ <spam@hjkos.com> | 2018-12-11 20:35:19 +0000 |
| commit | a8acba8cb2c639a3de3764df4226960458f996b8 (patch) | |
| tree | 50c4d353576cc419eeea4f45c4497309222cf360 /src/modules | |
| parent | fb5261b926adfb5b9bbe1bf55e36fe8b5f4eb57f (diff) | |
| parent | 8fcc4c67667b0951d6c0d28cec320bd4b2f8f107 (diff) | |
Merge branch 'feature/theming2' into 'develop'
Themes v2
See merge request pleroma/pleroma-fe!377
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/config.js | 6 | ||||
| -rw-r--r-- | src/modules/instance.js | 4 | ||||
| -rw-r--r-- | src/modules/interface.js | 6 |
3 files changed, 11 insertions, 5 deletions
diff --git a/src/modules/config.js b/src/modules/config.js index f23cacb7..45ac8f65 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -1,5 +1,5 @@ import { set, delete as del } from 'vue' -import StyleSetter from '../services/style_setter/style_setter.js' +import { setPreset, applyTheme } from '../services/style_setter/style_setter.js' const browserLocale = (window.navigator.language || 'en').split('-')[0] @@ -54,10 +54,10 @@ const config = { commit('setOption', {name, value}) switch (name) { case 'theme': - StyleSetter.setPreset(value, commit) + setPreset(value, commit) break case 'customTheme': - StyleSetter.setColors(value, commit) + applyTheme(value, commit) } } } diff --git a/src/modules/instance.js b/src/modules/instance.js index 641424b6..7c27d52a 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -1,5 +1,5 @@ import { set } from 'vue' -import StyleSetter from '../services/style_setter/style_setter.js' +import { setPreset } from '../services/style_setter/style_setter.js' const defaultState = { // Stuff from static/config.json and apiConfig @@ -60,7 +60,7 @@ const instance = { dispatch('setPageTitle') break case 'theme': - StyleSetter.setPreset(value, commit) + setPreset(value, commit) } } } diff --git a/src/modules/interface.js b/src/modules/interface.js index 07489685..132fb08d 100644 --- a/src/modules/interface.js +++ b/src/modules/interface.js @@ -4,6 +4,12 @@ const defaultState = { settings: { currentSaveStateNotice: null, noticeClearTimeout: null + }, + browserSupport: { + cssFilter: window.CSS && window.CSS.supports && ( + window.CSS.supports('filter', 'drop-shadow(0 0)') || + window.CSS.supports('-webkit-filter', 'drop-shadow(0 0)') + ) } } |
