are
This commit is contained in:
parent
d2a02da432
commit
d3016a4d6a
|
@ -4880,6 +4880,10 @@ export interface Locale extends ILocale {
|
|||
* リノートを表示
|
||||
*/
|
||||
"showRenotes": string;
|
||||
/**
|
||||
* CWを非表示
|
||||
*/
|
||||
"showCw": string;
|
||||
/**
|
||||
* 編集済み
|
||||
*/
|
||||
|
|
|
@ -1216,6 +1216,7 @@ authentication: "認証"
|
|||
authenticationRequiredToContinue: "続けるには認証を行ってください"
|
||||
dateAndTime: "日時"
|
||||
showRenotes: "リノートを表示"
|
||||
showCw: "CWを非表示"
|
||||
edited: "編集済み"
|
||||
notificationRecieveConfig: "通知の受信設定"
|
||||
mutualFollow: "相互フォロー"
|
||||
|
|
|
@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
:ad="true"
|
||||
:class="$style.notes"
|
||||
>
|
||||
<MkNote :key="note._featuredId_ || note._prId_ || note.id" :class="$style.note" :note="note" :withHardMute="true"/>
|
||||
<MkNote v-if="props.withCw && !note.cw || !props.withCw" :key="note._featuredId_ || note._prId_ || note.id" :class="$style.note" :note="note" :withHardMute="true" />
|
||||
</MkDateSeparatedList>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -43,6 +43,7 @@ const props = defineProps<{
|
|||
pagination: Paging;
|
||||
noGap?: boolean;
|
||||
disableAutoLoad?: boolean;
|
||||
withCw?: boolean;
|
||||
}>();
|
||||
|
||||
const pagingComponent = shallowRef<InstanceType<typeof MkPagination>>();
|
||||
|
|
|
@ -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<{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<boolean>({
|
|||
get: () => defaultStore.reactiveState.tl.value.filter.withRenotes,
|
||||
set: (x) => saveTlFilter('withRenotes', x),
|
||||
});
|
||||
const withCw = computed<boolean>({
|
||||
get: () => defaultStore.reactiveState.tl.value.filter.withCw,
|
||||
set: (x) => saveTlFilter('withCw', x),
|
||||
});
|
||||
|
||||
// computed内での無限ループを防ぐためのフラグ
|
||||
const localSocialTLFilterSwitchStore = ref<'withReplies' | 'onlyFiles' | false>('withReplies');
|
||||
|
@ -260,8 +265,11 @@ const headerActions = computed(() => {
|
|||
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,
|
||||
|
|
|
@ -273,6 +273,7 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
withRenotes: true,
|
||||
withSensitive: true,
|
||||
onlyFiles: false,
|
||||
withCw: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue