fix(frontend): デッキのタイムラインカラムでwithSensitiveが利用できない問題を修正 (#14772)
* fix(frontend): デッキのタイムラインカラムでwithSensitiveが利用できない問題を修正 * Update Changelog * Update Changelog * Update packages/frontend/src/ui/deck/tl-column.vue
This commit is contained in:
parent
5f12bc515d
commit
bc1fce9af6
6 changed files with 22 additions and 6 deletions
|
@ -11,6 +11,7 @@
|
||||||
- Fix: 通知の範囲指定の設定項目が必要ない通知設定でも範囲指定の設定がでている問題を修正
|
- Fix: 通知の範囲指定の設定項目が必要ない通知設定でも範囲指定の設定がでている問題を修正
|
||||||
- Fix: Turnstileが失敗・期限切れした際にも成功扱いとなってしまう問題を修正
|
- Fix: Turnstileが失敗・期限切れした際にも成功扱いとなってしまう問題を修正
|
||||||
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/768)
|
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/768)
|
||||||
|
- Fix: デッキのタイムラインカラムで「センシティブなファイルを含むノートを表示」設定が使用できなかった問題を修正
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
-
|
-
|
||||||
|
|
|
@ -227,6 +227,7 @@ const emit = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const inTimeline = inject<boolean>('inTimeline', false);
|
const inTimeline = inject<boolean>('inTimeline', false);
|
||||||
|
const tl_withSensitive = inject<Ref<boolean>>('tl_withSensitive', ref(false));
|
||||||
const inChannel = inject('inChannel', null);
|
const inChannel = inject('inChannel', null);
|
||||||
const currentClip = inject<Ref<Misskey.entities.Clip> | null>('currentClip', null);
|
const currentClip = inject<Ref<Misskey.entities.Clip> | null>('currentClip', null);
|
||||||
|
|
||||||
|
@ -299,7 +300,7 @@ function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string
|
||||||
|
|
||||||
if (checkOnly) return false;
|
if (checkOnly) return false;
|
||||||
|
|
||||||
if (inTimeline && !defaultStore.state.tl.filter.withSensitive && noteToCheck.files?.some((v) => v.isSensitive)) return 'sensitiveMute';
|
if (inTimeline && !tl_withSensitive.value && noteToCheck.files?.some((v) => v.isSensitive)) return 'sensitiveMute';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ const props = withDefaults(defineProps<{
|
||||||
sound?: boolean;
|
sound?: boolean;
|
||||||
withRenotes?: boolean;
|
withRenotes?: boolean;
|
||||||
withReplies?: boolean;
|
withReplies?: boolean;
|
||||||
|
withSensitive?: boolean;
|
||||||
onlyFiles?: boolean;
|
onlyFiles?: boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
withRenotes: true,
|
withRenotes: true,
|
||||||
|
@ -51,6 +52,7 @@ const emit = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
provide('inTimeline', true);
|
provide('inTimeline', true);
|
||||||
|
provide('tl_withSensitive', computed(() => props.withSensitive));
|
||||||
provide('inChannel', computed(() => props.src === 'channel'));
|
provide('inChannel', computed(() => props.src === 'channel'));
|
||||||
|
|
||||||
type TimelineQueryType = {
|
type TimelineQueryType = {
|
||||||
|
@ -248,6 +250,9 @@ function refreshEndpointAndChannel() {
|
||||||
// IDが切り替わったら切り替え先のTLを表示させたい
|
// IDが切り替わったら切り替え先のTLを表示させたい
|
||||||
watch(() => [props.list, props.antenna, props.channel, props.role, props.withRenotes], refreshEndpointAndChannel);
|
watch(() => [props.list, props.antenna, props.channel, props.role, props.withRenotes], refreshEndpointAndChannel);
|
||||||
|
|
||||||
|
// withSensitiveはクライアントで完結する処理のため、単にリロードするだけでOK
|
||||||
|
watch(() => props.withSensitive, reloadTimeline);
|
||||||
|
|
||||||
// 初回表示用
|
// 初回表示用
|
||||||
refreshEndpointAndChannel();
|
refreshEndpointAndChannel();
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
:list="src.split(':')[1]"
|
:list="src.split(':')[1]"
|
||||||
:withRenotes="withRenotes"
|
:withRenotes="withRenotes"
|
||||||
:withReplies="withReplies"
|
:withReplies="withReplies"
|
||||||
|
:withSensitive="withSensitive"
|
||||||
:onlyFiles="onlyFiles"
|
:onlyFiles="onlyFiles"
|
||||||
:sound="true"
|
:sound="true"
|
||||||
@queue="queueUpdated"
|
@queue="queueUpdated"
|
||||||
|
@ -121,11 +122,6 @@ watch(src, () => {
|
||||||
queue.value = 0;
|
queue.value = 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(withSensitive, () => {
|
|
||||||
// これだけはクライアント側で完結する処理なので手動でリロード
|
|
||||||
tlComponent.value?.reloadTimeline();
|
|
||||||
});
|
|
||||||
|
|
||||||
function queueUpdated(q: number): void {
|
function queueUpdated(q: number): void {
|
||||||
queue.value = q;
|
queue.value = q;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ export type Column = {
|
||||||
tl?: BasicTimelineType;
|
tl?: BasicTimelineType;
|
||||||
withRenotes?: boolean;
|
withRenotes?: boolean;
|
||||||
withReplies?: boolean;
|
withReplies?: boolean;
|
||||||
|
withSensitive?: boolean;
|
||||||
onlyFiles?: boolean;
|
onlyFiles?: boolean;
|
||||||
soundSetting: SoundStore;
|
soundSetting: SoundStore;
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,6 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
:src="column.tl"
|
:src="column.tl"
|
||||||
:withRenotes="withRenotes"
|
:withRenotes="withRenotes"
|
||||||
:withReplies="withReplies"
|
:withReplies="withReplies"
|
||||||
|
:withSensitive="withSensitive"
|
||||||
:onlyFiles="onlyFiles"
|
:onlyFiles="onlyFiles"
|
||||||
@note="onNote"
|
@note="onNote"
|
||||||
/>
|
/>
|
||||||
|
@ -54,6 +55,7 @@ const timeline = shallowRef<InstanceType<typeof MkTimeline>>();
|
||||||
const soundSetting = ref<SoundStore>(props.column.soundSetting ?? { type: null, volume: 1 });
|
const soundSetting = ref<SoundStore>(props.column.soundSetting ?? { type: null, volume: 1 });
|
||||||
const withRenotes = ref(props.column.withRenotes ?? true);
|
const withRenotes = ref(props.column.withRenotes ?? true);
|
||||||
const withReplies = ref(props.column.withReplies ?? false);
|
const withReplies = ref(props.column.withReplies ?? false);
|
||||||
|
const withSensitive = ref(props.column.withSensitive ?? true);
|
||||||
const onlyFiles = ref(props.column.onlyFiles ?? false);
|
const onlyFiles = ref(props.column.onlyFiles ?? false);
|
||||||
|
|
||||||
watch(withRenotes, v => {
|
watch(withRenotes, v => {
|
||||||
|
@ -68,6 +70,12 @@ watch(withReplies, v => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watch(withSensitive, v => {
|
||||||
|
updateColumn(props.column.id, {
|
||||||
|
withSensitive: v,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
watch(onlyFiles, v => {
|
watch(onlyFiles, v => {
|
||||||
updateColumn(props.column.id, {
|
updateColumn(props.column.id, {
|
||||||
onlyFiles: v,
|
onlyFiles: v,
|
||||||
|
@ -144,6 +152,10 @@ const menu = computed<MenuItem[]>(() => {
|
||||||
text: i18n.ts.fileAttachedOnly,
|
text: i18n.ts.fileAttachedOnly,
|
||||||
ref: onlyFiles,
|
ref: onlyFiles,
|
||||||
disabled: hasWithReplies(props.column.tl) ? withReplies : false,
|
disabled: hasWithReplies(props.column.tl) ? withReplies : false,
|
||||||
|
}, {
|
||||||
|
type: 'switch',
|
||||||
|
text: i18n.ts.withSensitive,
|
||||||
|
ref: withSensitive,
|
||||||
});
|
});
|
||||||
|
|
||||||
return menuItems;
|
return menuItems;
|
||||||
|
|
Loading…
Reference in a new issue