Retain dialog data when reopening same dialog

This commit is contained in:
Natsumi
2026-01-31 05:56:32 +13:00
committed by pa
parent 5ff078e351
commit bf687a2405
8 changed files with 76 additions and 46 deletions
+7 -3
View File
@@ -65,7 +65,8 @@ export const useAvatarStore = defineStore('Avatar', () => {
cacheSize: '',
cacheLocked: false,
cachePath: '',
fileAnalysis: {}
fileAnalysis: {},
timeSpent: 0
});
const avatarHistory = ref([]);
@@ -183,7 +184,11 @@ export const useAvatarStore = defineStore('Avatar', () => {
id: avatarId,
skipBreadcrumb: options.skipBreadcrumb
});
D.visible = true;
if (D.id === avatarId) {
uiStore.setDialogCrumbLabel('avatar', D.id, D.ref?.name || D.id);
return;
}
D.loading = true;
D.id = avatarId;
D.inCache = false;
@@ -220,7 +225,6 @@ export const useAvatarStore = defineStore('Avatar', () => {
return;
}
}
D.visible = true;
avatarRequest
.getAvatar({ avatarId })
.then((args) => {
+4
View File
@@ -142,6 +142,10 @@ export const useGroupStore = defineStore('Group', () => {
});
const D = groupDialog.value;
D.visible = true;
if (D.id === groupId) {
uiStore.setDialogCrumbLabel('group', D.id, D.ref?.name || D.id);
return;
}
D.loading = true;
D.id = groupId;
D.inGroup = false;
+15
View File
@@ -216,6 +216,13 @@ export const useUserStore = defineStore('User', () => {
isFavoriteWorldsLoading: false,
isAvatarsLoading: false,
isGroupsLoading: false,
userFavoriteWorlds: [],
userGroups: {
groups: [],
ownGroups: [],
mutualGroups: [],
remainingGroups: []
},
worldSorting: {
name: 'dialog.user.worlds.sorting.updated',
@@ -771,6 +778,14 @@ export const useUserStore = defineStore('User', () => {
});
const D = userDialog.value;
D.visible = true;
if (D.id === userId) {
uiStore.setDialogCrumbLabel(
'user',
D.id,
D.ref?.displayName || D.id
);
return;
}
D.id = userId;
D.memo = '';
D.note = '';
+4
View File
@@ -90,6 +90,10 @@ export const useWorldStore = defineStore('World', () => {
skipBreadcrumb: options.skipBreadcrumb
});
D.visible = true;
if (D.id === L.worldId) {
uiStore.setDialogCrumbLabel('world', D.id, D.ref?.name || D.id);
return;
}
L.shortName = shortName;
D.id = L.worldId;
D.$location = L;