mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-21 16:33:48 +01:00
Add option to always expand CWs, resolves #137
This commit is contained in:
parent
1348d6e1d0
commit
206e81da10
@ -2135,3 +2135,4 @@ _cwStyle:
|
||||
modern: "Modern"
|
||||
classic: "Classic (Misskey/Foundkey-like)"
|
||||
alternative: "Alternative (Firefish-like)"
|
||||
alwaysExpandCws: "Always expand posts with content warnings"
|
||||
|
@ -47,6 +47,7 @@ import MkButton from "@/components/MkButton.vue";
|
||||
import * as os from "@/os";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import { i18n } from "@/i18n";
|
||||
import { defaultStore } from "@/store";
|
||||
|
||||
const props = defineProps<{
|
||||
noteId: string;
|
||||
@ -56,7 +57,7 @@ let note = $ref<null | misskey.entities.Note>();
|
||||
let error = $ref();
|
||||
let isRenote = $ref(false);
|
||||
let appearNote = $ref<null | misskey.entities.Note>();
|
||||
let expandAllCws = $ref(false);
|
||||
let expandAllCws = $ref(defaultStore.state.alwaysExpandCws);
|
||||
|
||||
const prevPagination = {
|
||||
endpoint: "users/notes" as const,
|
||||
|
@ -197,6 +197,9 @@
|
||||
class="_formBlock"
|
||||
>{{ i18n.ts.showAdminUpdates }}</FormSwitch
|
||||
>
|
||||
<FormSwitch v-model="alwaysExpandCws" class="_formBlock">{{
|
||||
i18n.ts.alwaysExpandCws
|
||||
}}</FormSwitch>
|
||||
|
||||
<FormSelect v-model="cwStyle" class="_formBlock">
|
||||
<template #label>{{ i18n.ts.cwStyle }}</template>
|
||||
@ -331,6 +334,9 @@ const expandOnNoteClick = computed(
|
||||
const showFixedPostForm = computed(
|
||||
defaultStore.makeGetterSetter("showFixedPostForm"),
|
||||
);
|
||||
const alwaysExpandCws = computed(
|
||||
defaultStore.makeGetterSetter("alwaysExpandCws"),
|
||||
);
|
||||
const numberOfPageCache = computed(
|
||||
defaultStore.makeGetterSetter("numberOfPageCache"),
|
||||
);
|
||||
|
@ -338,6 +338,10 @@ export const defaultStore = markRaw(
|
||||
where: "device",
|
||||
default: "modern" as "modern" | "classic" | "alternative",
|
||||
},
|
||||
alwaysExpandCws: {
|
||||
where: "device",
|
||||
default: false,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user