fix(frontend): サイレンス状態で公開範囲のパブリックを選択できてしまう問題を修正 (#12224) (#12225)

* fix(frontend): サイレンス状態で公開範囲のパブリックを選択できてしまう問題を修正 (#12224)

* docs: update changelog

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
ozelot 2023-11-03 17:52:31 +09:00 committed by GitHub
parent 470a1c30e8
commit c31d2e2563
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View file

@ -56,6 +56,7 @@
- Fix: 個人カードのemojiがバッテリーになっている問題を修正 - Fix: 個人カードのemojiがバッテリーになっている問題を修正
- Fix: 標準テーマと同じIDを使用してインストールできてしまう問題を修正 - Fix: 標準テーマと同じIDを使用してインストールできてしまう問題を修正
- Fix: 絵文字ピッカーでバッテリーの絵文字が複数表示される問題を修正 #12197 - Fix: 絵文字ピッカーでバッテリーの絵文字が複数表示される問題を修正 #12197
- Fix: サイレンス状態で公開範囲のパブリックを選択できてしまう問題を修正 #12224
- Fix: In deck layout, replies option is not saved after refresh - Fix: In deck layout, replies option is not saved after refresh
### Server ### Server

View file

@ -299,6 +299,10 @@ if (props.reply && props.reply.text != null) {
} }
} }
if ($i?.isSilenced && visibility === 'public') {
visibility = 'home';
}
if (props.channel) { if (props.channel) {
visibility = 'public'; visibility = 'public';
localOnly = true; // TODO: localOnly = true; // TODO:
@ -448,6 +452,7 @@ function setVisibility() {
os.popup(defineAsyncComponent(() => import('@/components/MkVisibilityPicker.vue')), { os.popup(defineAsyncComponent(() => import('@/components/MkVisibilityPicker.vue')), {
currentVisibility: visibility, currentVisibility: visibility,
isSilenced: $i?.isSilenced,
localOnly: localOnly, localOnly: localOnly,
src: visibilityButton, src: visibilityButton,
}, { }, {

View file

@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<div :class="[$style.label, $style.item]"> <div :class="[$style.label, $style.item]">
{{ i18n.ts.visibility }} {{ i18n.ts.visibility }}
</div> </div>
<button key="public" class="_button" :class="[$style.item, { [$style.active]: v === 'public' }]" data-index="1" @click="choose('public')"> <button key="public" :disabled="isSilenced" class="_button" :class="[$style.item, { [$style.active]: v === 'public' }]" data-index="1" @click="choose('public')">
<div :class="$style.icon"><i class="ti ti-world"></i></div> <div :class="$style.icon"><i class="ti ti-world"></i></div>
<div :class="$style.body"> <div :class="$style.body">
<span :class="$style.itemTitle">{{ i18n.ts._visibility.public }}</span> <span :class="$style.itemTitle">{{ i18n.ts._visibility.public }}</span>
@ -51,6 +51,7 @@ const modal = $shallowRef<InstanceType<typeof MkModal>>();
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
currentVisibility: typeof Misskey.noteVisibilities[number]; currentVisibility: typeof Misskey.noteVisibilities[number];
isSilenced: boolean;
localOnly: boolean; localOnly: boolean;
src?: HTMLElement; src?: HTMLElement;
}>(), { }>(), {