mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-13 23:25:41 +02:00
wip
This commit is contained in:
@@ -63,6 +63,7 @@ import { camelToKebab } from '@/world/utility.js';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { prefer } from '@/preferences.js';
|
||||
import { deepClone } from '@/utility/clone.js';
|
||||
import { store } from '@/store.js';
|
||||
|
||||
// TODO: instanceのidと紛らわしいのでid -> typeにする
|
||||
|
||||
@@ -121,10 +122,19 @@ function updateObjectOption(k: string, v: any) {
|
||||
|
||||
function ok() {
|
||||
if (selectedId.value == null) return;
|
||||
|
||||
const recentlyUsed = store.s.recentlyUsedRoomObjects;
|
||||
if (!recentlyUsed.includes(selectedId.value)) {
|
||||
recentlyUsed.unshift(selectedId.value);
|
||||
if (recentlyUsed.length > 30) recentlyUsed.pop();
|
||||
store.set('recentlyUsedRoomObjects', recentlyUsed);
|
||||
}
|
||||
|
||||
emit('ok', {
|
||||
id: selectedId.value,
|
||||
options: deepClone(selectedObjectOptionsState.value),
|
||||
});
|
||||
|
||||
dialog.value?.close();
|
||||
}
|
||||
|
||||
|
||||
@@ -119,6 +119,11 @@ export const store = markRaw(new Pizzax('base', {
|
||||
default: true,
|
||||
},
|
||||
|
||||
recentlyUsedRoomObjects: {
|
||||
where: 'device',
|
||||
default: [] as string[],
|
||||
},
|
||||
|
||||
//#region TODO: そのうち消す (preferに移行済み)
|
||||
defaultWithReplies: {
|
||||
where: 'account',
|
||||
|
||||
Reference in New Issue
Block a user