components
This commit is contained in:
parent
c9dede920e
commit
dbc9bd9c46
46 changed files with 247 additions and 160 deletions
|
|
@ -54,7 +54,7 @@
|
|||
:key="style.key"
|
||||
:data-theme-key="style.key"
|
||||
class="button-default theme-preview"
|
||||
:class="{ toggled: isThemeActive(style.key), disabled: switchInProgress }"
|
||||
:class="{ toggled: isStyleActive(style.key), disabled: switchInProgress }"
|
||||
:disabled="switchInProgress"
|
||||
@click="style.version === 'v2' ? setTheme(style.key) : setStyle(style.key)"
|
||||
>
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
class="btn button-default palette-entry"
|
||||
:class="{ toggled: isPaletteActive(p.key), disabled: switchInProgress }"
|
||||
:disabled="switchInProgress"
|
||||
@click="() => setPalette(p.key, p)"
|
||||
@click="() => setLocalPalette(p.key, p)"
|
||||
>
|
||||
<div class="palette-label">
|
||||
<label>
|
||||
|
|
@ -113,7 +113,7 @@
|
|||
class="btn button-default palette-entry"
|
||||
:class="{ toggled: isPaletteActive(p.key), disabled: switchInProgress }"
|
||||
:disabled="switchInProgress"
|
||||
@click="() => setPalette(p.key, p)"
|
||||
@click="() => setLocalPalette(p.key, p)"
|
||||
>
|
||||
<div class="palette-label">
|
||||
<label>
|
||||
|
|
@ -143,7 +143,7 @@
|
|||
:compact="true"
|
||||
:apply="true"
|
||||
:disabled="switchInProgress"
|
||||
@apply-palette="data => setPaletteCustom(data)"
|
||||
@apply-palette="data => setLocalPaletteCustom(data)"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="customThemeVersion === 'v2'">
|
||||
|
|
|
|||
|
|
@ -19,9 +19,7 @@
|
|||
</BooleanSetting>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path="hideUserStats"
|
||||
>
|
||||
<BooleanSetting path="hideUserStats">
|
||||
{{ $t('settings.hide_user_stats') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|||
import UnitSetting from '../helpers/unit_setting.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import localeService from 'src/services/locale/locale.service.js'
|
||||
import { cacheKey, clearCache, emojiCacheKey } from 'src/services/sw/sw.js'
|
||||
|
|
@ -116,7 +117,7 @@ const ComposingTab = {
|
|||
},
|
||||
language: {
|
||||
get: function () {
|
||||
return this.$store.getters.mergedConfig.interfaceLanguage
|
||||
return useSyncConfigStore().mergedConfig.interfaceLanguage
|
||||
},
|
||||
set: function (val) {
|
||||
this.$store.dispatch('setOption', {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import UnitSetting from '../helpers/unit_setting.vue'
|
|||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import localeService from 'src/services/locale/locale.service.js'
|
||||
|
||||
|
|
@ -37,7 +38,7 @@ const GeneralTab = {
|
|||
computed: {
|
||||
language: {
|
||||
get: function () {
|
||||
return this.$store.getters.mergedConfig.interfaceLanguage
|
||||
return useSyncConfigStore().mergedConfig.interfaceLanguage
|
||||
},
|
||||
set: function (val) {
|
||||
this.$store.dispatch('setOption', {
|
||||
|
|
@ -48,6 +49,9 @@ const GeneralTab = {
|
|||
},
|
||||
...SharedComputedObject(),
|
||||
...mapState(useInstanceCapabilitiesStore, ['blockExpiration']),
|
||||
...mapState(useSyncConfigStore, {
|
||||
theme3hacks: (store) => store.mergedConfig.theme3hacks,
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
updateProfile() {
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<FontControl
|
||||
:model-value="mergedConfig.theme3hacks.fonts.interface"
|
||||
:model-value="theme3hacks.fonts.interface"
|
||||
name="ui"
|
||||
:label="$t('settings.style.fonts.components_inline.interface')"
|
||||
:fallback="{ family: 'sans-serif' }"
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<FontControl
|
||||
:model-value="mergedConfig.theme3hacks.fonts.input"
|
||||
:model-value="theme3hacks.fonts.input"
|
||||
name="input"
|
||||
:fallback="{ family: 'inherit' }"
|
||||
:label="$t('settings.style.fonts.components_inline.input')"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import SharedComputedObject from '../helpers/shared_computed_object.js'
|
|||
import UnitSetting from '../helpers/unit_setting.vue'
|
||||
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
const GeneralTab = {
|
||||
data() {
|
||||
|
|
@ -32,12 +33,12 @@ const GeneralTab = {
|
|||
'suggestionsEnabled',
|
||||
]),
|
||||
columns() {
|
||||
const mode = this.$store.getters.mergedConfig.thirdColumnMode
|
||||
const mode = useSyncConfigStore().mergedConfig.thirdColumnMode
|
||||
|
||||
const notif = mode === 'none' ? [] : ['notifs']
|
||||
|
||||
if (
|
||||
this.$store.getters.mergedConfig.sidebarRight ||
|
||||
useSyncConfigStore().mergedConfig.sidebarRight ||
|
||||
mode === 'postform'
|
||||
) {
|
||||
return [...notif, 'content', 'sidebar']
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import Preview from './theme_preview.vue'
|
|||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInterfaceStore } from 'src/stores/interface.js'
|
||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||
|
||||
import {
|
||||
getContrastRatioLayers,
|
||||
|
|
@ -81,7 +82,7 @@ export default {
|
|||
}),
|
||||
availableStyles: [],
|
||||
selected: '',
|
||||
selectedTheme: this.$store.getters.mergedConfig.theme,
|
||||
selectedTheme: useSyncConfigStore().mergedConfig.theme,
|
||||
themeWarning: undefined,
|
||||
tempImportFile: undefined,
|
||||
engineVersion: 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue