mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-26 16:03:02 +00:00
localOnlyを記憶できるように
This commit is contained in:
parent
5ce2bdf117
commit
55cbf2c66e
3 changed files with 17 additions and 3 deletions
|
@ -177,6 +177,12 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
localOnly() {
|
||||||
|
this.$store.commit('device/setLocalOnly', this.localOnly);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.initialText) {
|
if (this.initialText) {
|
||||||
this.text = this.initialText;
|
this.text = this.initialText;
|
||||||
|
@ -209,7 +215,9 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
// デフォルト公開範囲
|
// デフォルト公開範囲
|
||||||
this.applyVisibility(this.$store.state.settings.rememberNoteVisibility ? (this.$store.state.device.visibility || this.$store.state.settings.defaultNoteVisibility) : this.$store.state.settings.defaultNoteVisibility);
|
this.applyVisibility(this.$store.state.settings.rememberNoteVisibility ? this.$store.state.device.visibility : this.$store.state.settings.defaultNoteVisibility);
|
||||||
|
|
||||||
|
this.localOnly = this.$store.state.settings.rememberNoteVisibility ? this.$store.state.device.localOnly : false;
|
||||||
|
|
||||||
// 公開以外へのリプライ時は元の公開範囲を引き継ぐ
|
// 公開以外へのリプライ時は元の公開範囲を引き継ぐ
|
||||||
if (this.reply && ['home', 'followers', 'specified'].includes(this.reply.visibility)) {
|
if (this.reply && ['home', 'followers', 'specified'].includes(this.reply.visibility)) {
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
<mk-switch v-model="autoAcceptFollowed" :disabled="!isLocked" @change="save()">{{ $t('autoAcceptFollowed') }}</mk-switch>
|
<mk-switch v-model="autoAcceptFollowed" :disabled="!isLocked" @change="save()">{{ $t('autoAcceptFollowed') }}</mk-switch>
|
||||||
</div>
|
</div>
|
||||||
<div class="_content">
|
<div class="_content">
|
||||||
<mk-select v-model="defaultNoteVisibility" style="margin-top: 8px;">
|
<mk-switch v-model="rememberNoteVisibility" @change="save()">{{ $t('rememberNoteVisibility') }}</mk-switch>
|
||||||
|
<mk-select v-model="defaultNoteVisibility" style="margin-bottom: 8px;" v-if="!rememberNoteVisibility">
|
||||||
<template #label>{{ $t('defaultNoteVisibility') }}</template>
|
<template #label>{{ $t('defaultNoteVisibility') }}</template>
|
||||||
<option value="public">{{ $t('_visibility.public') }}</option>
|
<option value="public">{{ $t('_visibility.public') }}</option>
|
||||||
<option value="followers">{{ $t('_visibility.followers') }}</option>
|
<option value="followers">{{ $t('_visibility.followers') }}</option>
|
||||||
<option value="specified">{{ $t('_visibility.specified') }}</option>
|
<option value="specified">{{ $t('_visibility.specified') }}</option>
|
||||||
</mk-select>
|
</mk-select>
|
||||||
<mk-switch v-model="rememberNoteVisibility" @change="save()">{{ $t('rememberNoteVisibility') }}</mk-switch>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -24,6 +24,8 @@ const defaultDeviceSettings = {
|
||||||
useOsDefaultEmojis: false,
|
useOsDefaultEmojis: false,
|
||||||
accounts: [],
|
accounts: [],
|
||||||
recentEmojis: [],
|
recentEmojis: [],
|
||||||
|
visibility: 'public',
|
||||||
|
localOnly: false,
|
||||||
themes: [],
|
themes: [],
|
||||||
theme: 'light',
|
theme: 'light',
|
||||||
};
|
};
|
||||||
|
@ -110,6 +112,10 @@ export default (os: MiOS) => new Vuex.Store({
|
||||||
setVisibility(state, visibility) {
|
setVisibility(state, visibility) {
|
||||||
state.visibility = visibility;
|
state.visibility = visibility;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setLocalOnly(state, localOnly) {
|
||||||
|
state.localOnly = localOnly;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue