local indicator

This commit is contained in:
Henry Jameson 2026-02-27 16:18:27 +02:00
commit 463cc2ef5c
29 changed files with 28 additions and 51 deletions

View file

@ -1,13 +1,11 @@
import { v4 as uuidv4 } from 'uuid'
import ProfileSettingIndicator from 'src/components/settings_modal/helpers/profile_setting_indicator.vue'
import localeService from '../../services/locale/locale.service.js'
import Select from '../select/select.vue'
export default {
components: {
Select,
ProfileSettingIndicator,
},
props: {
// List of languages (or just one language)

View file

@ -40,7 +40,7 @@
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<LocalSettingIndicator :is-local="isLocalSetting" />
</div>
<div v-if="!compact">{{ $t('settings.preview') }}</div>
<Attachment

View file

@ -18,7 +18,7 @@
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<LocalSettingIndicator :is-local="isLocalSetting" />
{{ ' ' }}
<template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel }}

View file

@ -9,7 +9,7 @@
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<LocalSettingIndicator :is-local="isLocalSetting" />
{{ ' ' }}
<template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel }}

View file

@ -32,7 +32,7 @@
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<LocalSettingIndicator :is-local="isLocalSetting" />
<DraftButtons v-if="!hideDraftButtons" />
<p
v-if="backendDescriptionDescription"

View file

@ -7,7 +7,7 @@
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<LocalSettingIndicator :is-local="isLocalSetting" />
<DraftButtons />
</span>
</template>

View file

@ -75,7 +75,7 @@
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<LocalSettingIndicator :is-local="isLocalSetting" />
<DraftButtons />
</div>
</template>

View file

@ -77,7 +77,6 @@
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<DraftButtons />
</div>
</template>

View file

@ -1,7 +1,7 @@
<template>
<span
v-if="isProfile"
class="ProfileSettingIndicator"
v-if="isLocal"
class="LocalSettingIndicator"
>
<Popover
trigger="hover"
@ -9,13 +9,13 @@
<template #trigger>
&nbsp;
<FAIcon
icon="server"
:aria-label="$t('settings.setting_server_side')"
icon="desktop"
:aria-label="$t('settings.setting_local_side')"
/>
</template>
<template #content>
<div class="profilesetting-tooltip">
{{ $t('settings.setting_server_side') }}
{{ $t('settings.setting_local_side') }}
</div>
</template>
</Popover>
@ -26,18 +26,18 @@
import Popover from 'src/components/popover/popover.vue'
import { library } from '@fortawesome/fontawesome-svg-core'
import { faServer } from '@fortawesome/free-solid-svg-icons'
import { faDesktop } from '@fortawesome/free-solid-svg-icons'
library.add(faServer)
library.add(faDesktop)
export default {
components: { Popover },
props: ['isProfile'],
props: ['isLocal'],
}
</script>
<style lang="scss">
.ProfileSettingIndicator {
.LocalSettingIndicator {
display: inline-block;
position: relative;
}

View file

@ -77,7 +77,7 @@
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<LocalSettingIndicator :is-local="isLocalSetting" />
<DraftButtons />
</div>
</template>

View file

@ -34,7 +34,7 @@
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<LocalSettingIndicator :is-local="isLocalSetting" />
<DraftButtons v-if="!hideDraftButtons" />
<p
v-if="backendDescriptionDescription"

View file

@ -44,7 +44,6 @@
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<DraftButtons v-if="!hideDraftButtons" />
<p
v-if="backendDescriptionDescription"

View file

@ -11,7 +11,6 @@
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
{{ ' ' }}
<template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel + ' ' }}

View file

@ -11,7 +11,7 @@
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<LocalSettingIndicator :is-local="isLocalSetting" />
{{ ' ' }}
<template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel + ' ' }}

View file

@ -2,7 +2,7 @@ import { cloneDeep, get, isEqual, set } from 'lodash'
import DraftButtons from './draft_buttons.vue'
import ModifiedIndicator from './modified_indicator.vue'
import ProfileSettingIndicator from './profile_setting_indicator.vue'
import LocalSettingIndicator from './local_setting_indicator.vue'
import { useInstanceStore } from 'src/stores/instance.js'
import { useInterfaceStore } from 'src/stores/interface.js'
@ -13,7 +13,7 @@ export default {
components: {
ModifiedIndicator,
DraftButtons,
ProfileSettingIndicator,
LocalSettingIndicator,
},
props: {
modelValue: {
@ -326,6 +326,9 @@ export default {
isProfileSetting() {
return this.realSource === 'profile'
},
isLocalSetting() {
return this.local
},
isChanged() {
if (this.path == null) return false
switch (this.realSource) {

View file

@ -13,7 +13,7 @@
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<LocalSettingIndicator :is-local="isLocalSetting" />
{{ ' ' }}
<template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel + ' ' }}

View file

@ -13,7 +13,7 @@
:changed="isChanged"
:onclick="reset"
/>
<ProfileSettingIndicator :is-profile="isProfileSetting" />
<LocalSettingIndicator :is-local="isLocalSetting" />
{{ ' ' }}
<template v-if="backendDescriptionLabel">
{{ backendDescriptionLabel + ' ' }}

View file

@ -7,6 +7,7 @@
:for="path"
class="setting-label size-label"
>
<LocalSettingIndicator :is-local="isLocalSetting" />
<ModifiedIndicator
:changed="isChanged"
:onclick="reset"

View file

@ -73,7 +73,7 @@
}
.ModifiedIndicator,
.ProfileSettingIndicator {
.LocalSettingIndicator {
grid-area: indicator;
}

View file

@ -6,7 +6,6 @@ import BooleanSetting from '../helpers/boolean_setting.vue'
import ChoiceSetting from '../helpers/choice_setting.vue'
import FloatSetting from '../helpers/float_setting.vue'
import IntegerSetting from '../helpers/integer_setting.vue'
import ProfileSettingIndicator from '../helpers/profile_setting_indicator.vue'
import SharedComputedObject from '../helpers/shared_computed_object.js'
import UnitSetting from '../helpers/unit_setting.vue'
import Preview from './old_theme_tab/theme_preview.vue'
@ -77,7 +76,6 @@ const AppearanceTab = {
IntegerSetting,
FloatSetting,
UnitSetting,
ProfileSettingIndicator,
Preview,
PaletteEditor,
},

View file

@ -8,7 +8,6 @@ import BooleanSetting from '../helpers/boolean_setting.vue'
import ChoiceSetting from '../helpers/choice_setting.vue'
import FloatSetting from '../helpers/float_setting.vue'
import IntegerSetting from '../helpers/integer_setting.vue'
import ProfileSettingIndicator from '../helpers/profile_setting_indicator.vue'
import SharedComputedObject from '../helpers/shared_computed_object.js'
import UnitSetting from '../helpers/unit_setting.vue'
@ -99,7 +98,6 @@ const ComposingTab = {
FloatSetting,
UnitSetting,
InterfaceLanguageSwitcher,
ProfileSettingIndicator,
ScopeSelector,
Select,
FontControl,

View file

@ -8,10 +8,6 @@
class="setting-item "
for="default-vis"
>
<span class="setting-label">
<ProfileSettingIndicator :is-profile="true" />
{{ $t('settings.default_vis') }}
</span>
<ScopeSelector
class="scope-selector setting-control"
:show-all="true"
@ -19,7 +15,6 @@
:initial-scope="$store.state.profileConfig.defaultScope"
:on-scope-change="changeDefaultScope"
:unstyled="false"
uns
/>
</label>
</li>

View file

@ -5,7 +5,6 @@ import InterfaceLanguageSwitcher from 'src/components/interface_language_switche
import BooleanSetting from '../helpers/boolean_setting.vue'
import ChoiceSetting from '../helpers/choice_setting.vue'
import FloatSetting from '../helpers/float_setting.vue'
import ProfileSettingIndicator from '../helpers/profile_setting_indicator.vue'
import SharedComputedObject from '../helpers/shared_computed_object.js'
import UnitSetting from '../helpers/unit_setting.vue'
@ -33,7 +32,6 @@ const GeneralTab = {
FloatSetting,
FontControl,
InterfaceLanguageSwitcher,
ProfileSettingIndicator,
},
computed: {
language: {

View file

@ -9,11 +9,6 @@
class="lang-selector"
@update="val => language = val"
/>
<h4>
{{ $t('settings.email_language') }}
{{ ' ' }}
<ProfileSettingIndicator :is-profile="true" />
</h4>
<interface-language-switcher
v-model="emailLanguage"
class="lang-selector"

View file

@ -2,7 +2,6 @@ import { mapState } from 'pinia'
import BooleanSetting from '../helpers/boolean_setting.vue'
import ChoiceSetting from '../helpers/choice_setting.vue'
import ProfileSettingIndicator from '../helpers/profile_setting_indicator.vue'
import SharedComputedObject from '../helpers/shared_computed_object.js'
import UnitSetting from '../helpers/unit_setting.vue'
@ -25,7 +24,6 @@ const GeneralTab = {
BooleanSetting,
ChoiceSetting,
UnitSetting,
ProfileSettingIndicator,
},
computed: {
...mapState(useInstanceCapabilitiesStore, [

View file

@ -2,7 +2,6 @@ import FontControl from 'src/components/font_control/font_control.vue'
import BooleanSetting from '../helpers/boolean_setting.vue'
import ChoiceSetting from '../helpers/choice_setting.vue'
import IntegerSetting from '../helpers/integer_setting.vue'
import ProfileSettingIndicator from '../helpers/profile_setting_indicator.vue'
import SharedComputedObject from '../helpers/shared_computed_object.js'
import { useSyncConfigStore } from 'src/stores/sync_config.js'
@ -62,7 +61,6 @@ const GeneralTab = {
ChoiceSetting,
IntegerSetting,
FontControl,
ProfileSettingIndicator,
},
computed: {
...SharedComputedObject(),

View file

@ -1,7 +1,6 @@
import Checkbox from 'src/components/checkbox/checkbox.vue'
import UserCard from 'src/components/user_card/user_card.vue'
import BooleanSetting from '../helpers/boolean_setting.vue'
import ProfileSettingIndicator from '../helpers/profile_setting_indicator.vue'
import SharedComputedObject from '../helpers/shared_computed_object.js'
import { library } from '@fortawesome/fontawesome-svg-core'
@ -24,7 +23,6 @@ const ProfileTab = {
UserCard,
Checkbox,
BooleanSetting,
ProfileSettingIndicator,
},
computed: {
user() {

View file

@ -16,7 +16,6 @@
v-model="locked"
class="setting-label setting-control custom-boolean-setting"
>
<ProfileSettingIndicator :is-profile="true" />
{{ $t('settings.lock_account_description') }}
</Checkbox>
</div>

View file

@ -402,6 +402,7 @@
"change_avatar": "Change avatar",
"setting_changed": "Setting is different from default",
"setting_server_side": "This setting is tied to your profile and affects all sessions and clients",
"setting_local_side": "This setting is tied to current session and doesn't affects other devices and browsers",
"enter_current_password_to_confirm": "Enter your current password to confirm your identity",
"post_look_feel": "Posts Look & Feel",
"posts": "Posts",