feat: auto note removal
This commit is contained in:
parent
ee6d918d99
commit
82a7cdb204
10 changed files with 166 additions and 14 deletions
|
@ -67,6 +67,31 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkSwitch v-model="keepCw">{{ i18n.ts.keepCw }}</MkSwitch>
|
||||
</div>
|
||||
</FormSection>
|
||||
|
||||
<MkFolder>
|
||||
<template #label>{{ i18n.ts.autoRemoval }}</template>
|
||||
|
||||
<div class="_gaps_m">
|
||||
<MkSwitch v-model="autoRemoval">{{ i18n.ts._autoRemoval.use }}</MkSwitch>
|
||||
|
||||
<template v-if="autoRemoval">
|
||||
<MkInput v-model="deleteAfter" :placeholder="7">
|
||||
<template #label>{{ i18n.ts._autoRemoval.deleteAfter }}</template>
|
||||
<template #caption>{{ i18n.ts._autoRemoval.deleteAfterDescription }}</template>
|
||||
</MkInput>
|
||||
|
||||
<MkSwitch v-model="noPiningNotes">
|
||||
<template #label>{{ i18n.ts._autoRemoval.noPiningNotes }}</template>
|
||||
<template #caption>{{ i18n.ts._autoRemoval.noPiningNotesDescription }}</template>
|
||||
</MkSwitch>
|
||||
|
||||
<MkSwitch v-model="noSpecifiedNotes">
|
||||
<template #label>{{ i18n.ts._autoRemoval.noSpecifiedNotes }}</template>
|
||||
<template #caption>{{ i18n.ts._autoRemoval.noSpecifiedNotesDescription }}</template>
|
||||
</MkSwitch>
|
||||
</template>
|
||||
</div>
|
||||
</MkFolder>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -93,6 +118,10 @@ const hideOnlineStatus = ref($i.hideOnlineStatus);
|
|||
const publicReactions = ref($i.publicReactions);
|
||||
const followingVisibility = ref($i.followingVisibility);
|
||||
const followersVisibility = ref($i.followersVisibility);
|
||||
const autoRemoval = ref($i.autoRemoval);
|
||||
const deleteAfter = ref($i.autoRemovalCondition.deleteAfter);
|
||||
const noPiningNotes = ref($i.autoRemovalCondition.noPiningNotes);
|
||||
const noSpecifiedNotes = ref($i.autoRemovalCondition.noSpecifiedNotes);
|
||||
|
||||
const defaultNoteVisibility = computed(defaultStore.makeGetterSetter('defaultNoteVisibility'));
|
||||
const defaultNoteLocalOnly = computed(defaultStore.makeGetterSetter('defaultNoteLocalOnly'));
|
||||
|
@ -111,6 +140,12 @@ function save() {
|
|||
followingVisibility: followingVisibility.value,
|
||||
followersVisibility: followersVisibility.value,
|
||||
});
|
||||
misskeyApi('i/update-removal-condition', {
|
||||
active: autoRemoval.value,
|
||||
deleteAfter: deleteAfter.value,
|
||||
noPiningNotes: noPiningNotes.value,
|
||||
noSpecifiedNotes: noSpecifiedNotes.value,
|
||||
});
|
||||
}
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue