localOnly
This commit is contained in:
parent
78a34d3de3
commit
0eacd5e1f7
3 changed files with 27 additions and 1 deletions
|
|
@ -208,6 +208,7 @@ const showAddMfmFunction = ref(defaultStore.state.enableQuickAddMfmFunction);
|
|||
watch(showAddMfmFunction, () => defaultStore.set('enableQuickAddMfmFunction', showAddMfmFunction.value));
|
||||
const cw = ref<string | null>(props.initialCw ?? null);
|
||||
const localOnly = ref<boolean>(props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly);
|
||||
|
||||
const visibility = ref(props.initialVisibility ?? (defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility) as typeof Misskey.noteVisibilities[number]);
|
||||
const visibleUsers = ref<Misskey.entities.UserDetailed[]>([]);
|
||||
if (props.initialVisibleUsers) {
|
||||
|
|
@ -290,6 +291,19 @@ watch(text, () => {
|
|||
}, { immediate: true });
|
||||
|
||||
watch(visibility, () => {
|
||||
|
||||
switch (visibility.value) {
|
||||
case 'public':
|
||||
localOnly.value = props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly;
|
||||
break;
|
||||
case 'home':
|
||||
localOnly.value = props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultHomeNoteLocalOnly;
|
||||
break;
|
||||
case 'followers':
|
||||
localOnly.value = props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultFollowersNoteLocalOnly;
|
||||
break;
|
||||
}
|
||||
|
||||
checkMissingMention();
|
||||
}, { immediate: true });
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue