diff --git a/locales/index.d.ts b/locales/index.d.ts
index 5a6e9735c7..01e35cc8cd 100644
--- a/locales/index.d.ts
+++ b/locales/index.d.ts
@@ -4880,6 +4880,10 @@ export interface Locale extends ILocale {
* リノートを表示
*/
"showRenotes": string;
+ /**
+ * CWを非表示
+ */
+ "showCw": string;
/**
* 編集済み
*/
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index 5c801f43a5..171129e921 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -1216,6 +1216,7 @@ authentication: "認証"
authenticationRequiredToContinue: "続けるには認証を行ってください"
dateAndTime: "日時"
showRenotes: "リノートを表示"
+showCw: "CWを非表示"
edited: "編集済み"
notificationRecieveConfig: "通知の受信設定"
mutualFollow: "相互フォロー"
diff --git a/packages/frontend/src/components/MkNotes.vue b/packages/frontend/src/components/MkNotes.vue
index 0856c146ba..ef5ad766b1 100644
--- a/packages/frontend/src/components/MkNotes.vue
+++ b/packages/frontend/src/components/MkNotes.vue
@@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:ad="true"
:class="$style.notes"
>
-
+
@@ -43,6 +43,7 @@ const props = defineProps<{
pagination: Paging;
noGap?: boolean;
disableAutoLoad?: boolean;
+ withCw?: boolean;
}>();
const pagingComponent = shallowRef>();
diff --git a/packages/frontend/src/components/MkTimeline.vue b/packages/frontend/src/components/MkTimeline.vue
index 9ef20732d8..3a65406b1e 100644
--- a/packages/frontend/src/components/MkTimeline.vue
+++ b/packages/frontend/src/components/MkTimeline.vue
@@ -10,6 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
ref="tlComponent"
:pagination="paginationQuery"
:noGap="!defaultStore.state.showGapBetweenNotesInTimeline"
+ :withCw="props.withCw"
@queue="emit('queue', $event)"
@status="prComponent?.setDisabled($event)"
/>
@@ -38,11 +39,12 @@ const props = withDefaults(defineProps<{
withRenotes?: boolean;
withReplies?: boolean;
onlyFiles?: boolean;
-
+ withCw?: boolean;
}>(), {
withRenotes: true,
withReplies: false,
onlyFiles: false,
+ withCw: false,
});
const emit = defineEmits<{
diff --git a/packages/frontend/src/pages/about.vue b/packages/frontend/src/pages/about.vue
index 13e9b75639..efce980034 100644
--- a/packages/frontend/src/pages/about.vue
+++ b/packages/frontend/src/pages/about.vue
@@ -146,9 +146,8 @@ import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { claimAchievement } from '@/scripts/achievements.js';
import { instance } from '@/instance.js';
-import { bannerDark, bannerLight, defaultStore, iconDark, iconLight } from '@/store';
-import { signinRequired } from '@/account.js';
-import { $i } from '@/account.js';
+import { bannerDark, bannerLight, defaultStore, iconDark, iconLight } from '@/store.js';
+
const props = withDefaults(defineProps<{
initialTab?: string;
}>(), {
@@ -166,6 +165,7 @@ watch(tab, () => {
let bannerUrl = ref(defaultStore.state.bannerUrl);
let iconUrl = ref(defaultStore.state.iconUrl);
const darkMode = computed(defaultStore.makeGetterSetter('darkMode'));
+
if (darkMode.value) {
bannerUrl.value = bannerDark;
iconUrl.value = iconDark;
@@ -173,6 +173,7 @@ if (darkMode.value) {
bannerUrl.value = bannerLight;
iconUrl.value = iconLight;
}
+
watch(darkMode, () => {
if (darkMode.value) {
bannerUrl.value = bannerDark;
@@ -182,6 +183,7 @@ watch(darkMode, () => {
iconUrl.value = iconLight;
}
});
+
const initStats = () => misskeyApi('stats', {
}).then((res) => {
stats.value = res;
diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue
index 26dbfe9040..24f95ee35b 100644
--- a/packages/frontend/src/pages/timeline.vue
+++ b/packages/frontend/src/pages/timeline.vue
@@ -24,6 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:withRenotes="withRenotes"
:withReplies="withReplies"
:onlyFiles="onlyFiles"
+ :withCw="withCw"
:sound="true"
@queue="queueUpdated"
/>
@@ -76,6 +77,10 @@ const withRenotes = computed({
get: () => defaultStore.reactiveState.tl.value.filter.withRenotes,
set: (x) => saveTlFilter('withRenotes', x),
});
+const withCw = computed({
+ get: () => defaultStore.reactiveState.tl.value.filter.withCw,
+ set: (x) => saveTlFilter('withCw', x),
+});
// computed内での無限ループを防ぐためのフラグ
const localSocialTLFilterSwitchStore = ref<'withReplies' | 'onlyFiles' | false>('withReplies');
@@ -254,14 +259,17 @@ function closeTutorial(): void {
const headerActions = computed(() => {
const tmp = [
- { icon: 'ti ti-dots',
+ { icon: 'ti ti-dots',
text: i18n.ts.options,
handler: (ev) => {
os.popupMenu([{
type: 'switch',
text: i18n.ts.showRenotes,
-
ref: withRenotes,
+ }, {
+ type: 'switch',
+ text: i18n.ts.showCw,
+ ref: withCw,
}, src.value === 'local' || src.value === 'social' ? {
type: 'switch',
text: i18n.ts.showRepliesToOthersInTimeline,
diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts
index 62d210f89b..f81e54cfd8 100644
--- a/packages/frontend/src/store.ts
+++ b/packages/frontend/src/store.ts
@@ -273,6 +273,7 @@ export const defaultStore = markRaw(new Storage('base', {
withRenotes: true,
withSensitive: true,
onlyFiles: false,
+ withCw: true,
},
},
},