Skip to content

Commit faf2399

Browse files
committed
enhance(frontend): 連合なしが指定されているときに公開範囲を指名にできるように
Resolve #14760
1 parent 106fffd commit faf2399

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

packages/frontend/src/components/MkPostForm.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SPDX-License-Identifier: AGPL-3.0-only
3232
<span :class="$style.headerRightButtonText">{{ targetChannel.name }}</span>
3333
</button>
3434
</template>
35-
<button v-tooltip="i18n.ts._visibility.disableFederation" class="_button" :class="[$style.headerRightItem, { [$style.danger]: localOnly }]" :disabled="targetChannel != null || visibility === 'specified'" @click="toggleLocalOnly">
35+
<button v-if="visibility !== 'specified'" v-tooltip="i18n.ts._visibility.disableFederation" class="_button" :class="[$style.headerRightItem, { [$style.danger]: localOnly }]" :disabled="targetChannel != null" @click="toggleLocalOnly">
3636
<span v-if="!localOnly"><i class="ti ti-rocket"></i></span>
3737
<span v-else><i class="ti ti-rocket-off"></i></span>
3838
</button>
@@ -529,7 +529,6 @@ function setVisibility() {
529529
const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkVisibilityPicker.vue')), {
530530
currentVisibility: visibility.value,
531531
isSilenced: $i.isSilenced,
532-
localOnly: localOnly.value,
533532
anchorElement: visibilityButton.value,
534533
...(replyTargetNote.value ? { isReplyVisibilitySpecified: replyTargetNote.value.visibility === 'specified' } : {}),
535534
}, {
@@ -1023,7 +1022,7 @@ async function post(ev?: PointerEvent) {
10231022
channelId: targetChannel.value ? targetChannel.value.id : undefined,
10241023
poll: poll.value,
10251024
cw: useCw.value ? cw.value ?? '' : null,
1026-
localOnly: localOnly.value,
1025+
localOnly: visibility.value === 'specified' ? false : localOnly.value,
10271026
visibility: visibility.value,
10281027
visibleUserIds: visibility.value === 'specified' ? visibleUsers.value.map(u => u.id) : undefined,
10291028
reactionAcceptance: reactionAcceptance.value,

packages/frontend/src/components/MkVisibilityPicker.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ SPDX-License-Identifier: AGPL-3.0-only
3030
<span :class="$style.itemDescription">{{ i18n.ts._visibility.followersDescription }}</span>
3131
</div>
3232
</button>
33-
<button key="specified" :disabled="localOnly" class="_button" :class="[$style.item, { [$style.active]: v === 'specified' }]" data-index="4" @click="choose('specified')">
33+
<button key="specified" class="_button" :class="[$style.item, { [$style.active]: v === 'specified' }]" data-index="4" @click="choose('specified')">
3434
<div :class="$style.icon"><i class="ti ti-mail"></i></div>
3535
<div :class="$style.body">
3636
<span :class="$style.itemTitle">{{ i18n.ts._visibility.specified }}</span>
@@ -52,7 +52,6 @@ const modal = useTemplateRef('modal');
5252
const props = withDefaults(defineProps<{
5353
currentVisibility: typeof Misskey.noteVisibilities[number];
5454
isSilenced: boolean;
55-
localOnly: boolean;
5655
anchorElement?: HTMLElement | null;
5756
isReplyVisibilitySpecified?: boolean;
5857
}>(), {

0 commit comments

Comments
 (0)