TLの絞り込み保存できるようにした

This commit is contained in:
mattyatea 2023-09-30 19:02:17 +09:00
parent 2d815c72cb
commit ac1367a0b9
5 changed files with 28 additions and 6 deletions

4
locales/index.d.ts vendored
View File

@ -13,7 +13,6 @@ export interface Locale {
"password": string; "password": string;
"forgotPassword": string; "forgotPassword": string;
"fetchingAsApObject": string; "fetchingAsApObject": string;
"fileAttachedOnly": string;
"ok": string; "ok": string;
"gotIt": string; "gotIt": string;
"cancel": string; "cancel": string;
@ -677,6 +676,7 @@ export interface Locale {
"forwardReport": string; "forwardReport": string;
"forwardReportIsAnonymous": string; "forwardReportIsAnonymous": string;
"send": string; "send": string;
"fileAttachedOnly": string;
"abuseMarkAsResolved": string; "abuseMarkAsResolved": string;
"openInNewTab": string; "openInNewTab": string;
"openInSideView": string; "openInSideView": string;
@ -709,6 +709,8 @@ export interface Locale {
"sentReactionsCount": string; "sentReactionsCount": string;
"receivedReactionsCount": string; "receivedReactionsCount": string;
"pollVotesCount": string; "pollVotesCount": string;
"onlyAndWithSave": string;
"onlyAndWithSaveInfo": string;
"pollVotedCount": string; "pollVotedCount": string;
"yes": string; "yes": string;
"no": string; "no": string;

View File

@ -706,6 +706,8 @@ followersCount: "フォロワー数"
sentReactionsCount: "リアクションした数" sentReactionsCount: "リアクションした数"
receivedReactionsCount: "リアクションされた数" receivedReactionsCount: "リアクションされた数"
pollVotesCount: "アンケートに投票した数" pollVotesCount: "アンケートに投票した数"
onlyAndWithSave: "タイムラインの絞り込みを保存する"
onlyAndWithSaveInfo: "ファイルのみ や リプライのみ などが保存されるようになります"
pollVotedCount: "アンケートに投票された数" pollVotedCount: "アンケートに投票された数"
yes: "はい" yes: "はい"
no: "いいえ" no: "いいえ"

View File

@ -139,7 +139,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSwitch v-model="enableUltimateDataSaverMode">{{ i18n.ts.UltimateDataSaver }}</MkSwitch> <MkSwitch v-model="enableUltimateDataSaverMode">{{ i18n.ts.UltimateDataSaver }}</MkSwitch>
<MkSwitch v-model="enableCellularWithUltimateDataSaver">{{ i18n.ts.cellularWithUltimateDataSaver }}</MkSwitch> <MkSwitch v-model="enableCellularWithUltimateDataSaver">{{ i18n.ts.cellularWithUltimateDataSaver }}</MkSwitch>
<MkSwitch v-model="enableGamingMode">{{ i18n.ts.gamingMode }} <template #caption>{{ i18n.ts.gamingModeInfo }} </template></MkSwitch> <MkSwitch v-model="enableGamingMode">{{ i18n.ts.gamingMode }} <template #caption>{{ i18n.ts.gamingModeInfo }} </template></MkSwitch>
<MkSwitch v-model="enableonlyAndWithSave">{{ i18n.ts.onlyAndWithSave}}<template #caption>{{ i18n.ts.onlyAndWithSaveInfo }} </template></MkSwitch>
</div> </div>
<div> <div>
<MkRadios v-model="emojiStyle"> <MkRadios v-model="emojiStyle">
@ -283,6 +283,7 @@ const notificationPosition = computed(defaultStore.makeGetterSetter('notificatio
const notificationStackAxis = computed(defaultStore.makeGetterSetter('notificationStackAxis')); const notificationStackAxis = computed(defaultStore.makeGetterSetter('notificationStackAxis'));
const keepScreenOn = computed(defaultStore.makeGetterSetter('keepScreenOn')); const keepScreenOn = computed(defaultStore.makeGetterSetter('keepScreenOn'));
const enableGamingMode = computed(defaultStore.makeGetterSetter('gamingMode')); const enableGamingMode = computed(defaultStore.makeGetterSetter('gamingMode'));
const enableonlyAndWithSave = computed(defaultStore.makeGetterSetter('onlyAndWithSave'));
const showMediaTimeline = computed(defaultStore.makeGetterSetter('showMediaTimeline')); const showMediaTimeline = computed(defaultStore.makeGetterSetter('showMediaTimeline'));
const showVisibilityColor = computed(defaultStore.makeGetterSetter('showVisibilityColor')) const showVisibilityColor = computed(defaultStore.makeGetterSetter('showVisibilityColor'))
watch(lang, () => { watch(lang, () => {
@ -345,6 +346,7 @@ watch([
keepScreenOn, keepScreenOn,
showMediaTimeline, showMediaTimeline,
showVisibilityColor, showVisibilityColor,
enableonlyAndWithSave,
], async () => { ], async () => {
await reloadAsk(); await reloadAsk();
}); });

View File

@ -63,10 +63,10 @@ const rootEl = $shallowRef<HTMLElement>();
let queue = $ref(0); let queue = $ref(0);
let srcWhenNotSignin = $ref(isLocalTimelineAvailable ? 'local' : 'global'); let srcWhenNotSignin = $ref(isLocalTimelineAvailable ? 'local' : 'global');
const src = $computed({ get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin), set: (x) => saveSrc(x) }); const src = $computed({ get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin), set: (x) => saveSrc(x) });
const withRenotes = $ref(true); const withRenotes = $ref(defaultStore.state.onlyAndWithSave ? computed(defaultStore.makeGetterSetter('withRenotes')) : true);
const withReplies = $ref(false); const withReplies = $ref(defaultStore.state.onlyAndWithSave ? computed(defaultStore.makeGetterSetter('withReplies')) : false);
const onlyFiles = $ref(false); const onlyFiles = $ref(defaultStore.state.onlyAndWithSave ? computed(defaultStore.makeGetterSetter('onlyFiles')) : false);
console.log(defaultStore.state.onlyAndWithSave)
watch($$(src), () => queue = 0); watch($$(src), () => queue = 0);
function queueUpdated(q: number): void { function queueUpdated(q: number): void {

View File

@ -364,6 +364,22 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'device', where: 'device',
default: 44, default: 44,
}, },
onlyAndWithSave:{
where: 'device',
default: true,
},
onlyFiles:{
where: 'device',
default: false,
},
withReplies:{
where: 'device',
default: false,
},
withRenotes:{
where: 'device',
default: true,
},
showNoteActionsOnlyHover: { showNoteActionsOnlyHover: {
where: 'device', where: 'device',
default: false, default: false,