more settings made local-only

This commit is contained in:
Henry Jameson 2026-03-06 13:33:28 +02:00
commit eb7cff467e
8 changed files with 24 additions and 3 deletions

View file

@ -1,6 +1,7 @@
import Checkbox from 'src/components/checkbox/checkbox.vue' import Checkbox from 'src/components/checkbox/checkbox.vue'
import Popover from 'src/components/popover/popover.vue' import Popover from 'src/components/popover/popover.vue'
import Select from '../select/select.vue' import Select from '../select/select.vue'
import LocalSettingIndicator from 'src/components/settings_modal/helpers/local_setting_indicator.vue'
import { useInterfaceStore } from 'src/stores/interface.js' import { useInterfaceStore } from 'src/stores/interface.js'
@ -18,8 +19,9 @@ export default {
Select, Select,
Checkbox, Checkbox,
Popover, Popover,
LocalSettingIndicator,
}, },
props: ['name', 'label', 'modelValue', 'fallback', 'options', 'no-inherit'], props: ['name', 'label', 'modelValue', 'fallback', 'options', 'no-inherit', 'isLocal'],
mounted() { mounted() {
useInterfaceStore().queryLocalFonts() useInterfaceStore().queryLocalFonts()
}, },

View file

@ -8,6 +8,8 @@
:model-value="present" :model-value="present"
@change="$emit('update:modelValue', typeof modelValue === 'undefined' ? fallback : undefined)" @change="$emit('update:modelValue', typeof modelValue === 'undefined' ? fallback : undefined)"
> >
<LocalSettingIndicator :is-local="isLocal" />
{{ ' ' }}
<i18n-t <i18n-t
scope="global" scope="global"
keypath="settings.style.fonts.override" keypath="settings.style.fonts.override"

View file

@ -28,13 +28,17 @@
<h3>{{ $t('settings.debug') }}</h3> <h3>{{ $t('settings.debug') }}</h3>
<ul class="setting-list"> <ul class="setting-list">
<li> <li>
<BooleanSetting path="virtualScrolling"> <BooleanSetting
:local="true"
path="virtualScrolling"
>
{{ $t('settings.virtual_scrolling') }} {{ $t('settings.virtual_scrolling') }}
</BooleanSetting> </BooleanSetting>
</li> </li>
<li> <li>
<BooleanSetting <BooleanSetting
path="themeDebug" path="themeDebug"
:local="true"
:expert="1" :expert="1"
> >
{{ $t('settings.theme_debug') }} {{ $t('settings.theme_debug') }}
@ -43,6 +47,7 @@
<li> <li>
<BooleanSetting <BooleanSetting
path="forceThemeRecompilation" path="forceThemeRecompilation"
:local="true"
:expert="1" :expert="1"
> >
{{ $t('settings.force_theme_recompilation_debug') }} {{ $t('settings.force_theme_recompilation_debug') }}

View file

@ -67,7 +67,7 @@ const GeneralTab = {
}) })
}, },
updateFont(key, value) { updateFont(key, value) {
useSyncConfigStore().setSimplePrefAndSave({ useLocalConfigStore().set({
path: 'theme3hacks', path: 'theme3hacks',
value: { value: {
...this.mergedConfig.theme3hacks, ...this.mergedConfig.theme3hacks,

View file

@ -68,6 +68,7 @@
name="ui" name="ui"
:label="$t('settings.style.fonts.components_inline.interface')" :label="$t('settings.style.fonts.components_inline.interface')"
:fallback="{ family: 'sans-serif' }" :fallback="{ family: 'sans-serif' }"
:is-local="true"
no-inherit="1" no-inherit="1"
@update:model-value="v => updateFont('interface', v)" @update:model-value="v => updateFont('interface', v)"
/> />
@ -76,6 +77,7 @@
<FontControl <FontControl
:model-value="theme3hacks.fonts.input" :model-value="theme3hacks.fonts.input"
name="input" name="input"
:is-local="true"
:fallback="{ family: 'inherit' }" :fallback="{ family: 'inherit' }"
:label="$t('settings.style.fonts.components_inline.input')" :label="$t('settings.style.fonts.components_inline.input')"
@update:model-value="v => updateFont('input', v)" @update:model-value="v => updateFont('input', v)"
@ -85,6 +87,7 @@
<UnitSetting <UnitSetting
path="emojiSize" path="emojiSize"
:step="0.1" :step="0.1"
:local="true"
:units="['px', 'rem']" :units="['px', 'rem']"
:reset-default="{ 'px': 32, 'rem': 2.2 }" :reset-default="{ 'px': 32, 'rem': 2.2 }"
> >
@ -124,6 +127,7 @@
<li> <li>
<BooleanSetting <BooleanSetting
path="useStreamingApi" path="useStreamingApi"
:local="true"
expert="1" expert="1"
> >
{{ $t('settings.useStreamingApi') }} {{ $t('settings.useStreamingApi') }}

View file

@ -50,6 +50,7 @@
<UnitSetting <UnitSetting
path="navbarSize" path="navbarSize"
:step="0.1" :step="0.1"
:local="true"
:units="['px', 'rem']" :units="['px', 'rem']"
:reset-default="{ 'px': 55, 'rem': 3.5 }" :reset-default="{ 'px': 55, 'rem': 3.5 }"
> >
@ -72,6 +73,7 @@
<li> <li>
<UnitSetting <UnitSetting
path="panelHeaderSize" path="panelHeaderSize"
:local="true"
:step="0.1" :step="0.1"
:units="['px', 'rem']" :units="['px', 'rem']"
:reset-default="{ 'px': 52, 'rem': 3.2 }" :reset-default="{ 'px': 52, 'rem': 3.2 }"
@ -105,6 +107,7 @@
<div class="column-settings"> <div class="column-settings">
<UnitSetting <UnitSetting
v-for="column in columns" v-for="column in columns"
:local="true"
:key="column" :key="column"
:path="column + 'ColumnWidth'" :path="column + 'ColumnWidth'"
:units="horizontalUnits" :units="horizontalUnits"

View file

@ -249,6 +249,7 @@
<li> <li>
<BooleanSetting <BooleanSetting
path="webPushNotifications" path="webPushNotifications"
:local="true"
expert="1" expert="1"
> >
{{ $t('settings.enable_web_push_notifications') }} {{ $t('settings.enable_web_push_notifications') }}
@ -257,6 +258,7 @@
<li> <li>
<BooleanSetting <BooleanSetting
path="webPushAlwaysShowNotifications" path="webPushAlwaysShowNotifications"
:local="true"
:disabled="!mergedConfig.webPushNotifications" :disabled="!mergedConfig.webPushNotifications"
> >
{{ $t('settings.enable_web_push_always_show') }} {{ $t('settings.enable_web_push_always_show') }}
@ -273,6 +275,7 @@
<li> <li>
<BooleanSetting <BooleanSetting
source="profile" source="profile"
:local="true"
path="webPushHideContents" path="webPushHideContents"
expert="1" expert="1"
> >

View file

@ -58,6 +58,7 @@
<FontControl <FontControl
:model-value="mergedConfig.theme3hacks.fonts.post" :model-value="mergedConfig.theme3hacks.fonts.post"
name="post" name="post"
:is-local="true"
:fallback="{ family: 'inherit' }" :fallback="{ family: 'inherit' }"
:label="$t('settings.style.fonts.components.post')" :label="$t('settings.style.fonts.components.post')"
@update:model-value="v => updateFont('post', v)" @update:model-value="v => updateFont('post', v)"
@ -66,6 +67,7 @@
<li> <li>
<FontControl <FontControl
:model-value="mergedConfig.theme3hacks.fonts.monospace" :model-value="mergedConfig.theme3hacks.fonts.monospace"
:is-local="true"
name="postCode" name="postCode"
:fallback="{ family: 'monospace' }" :fallback="{ family: 'monospace' }"
:label="$t('settings.style.fonts.components.monospace')" :label="$t('settings.style.fonts.components.monospace')"