Save current Favorites tab

This commit is contained in:
Natsumi
2025-10-22 19:37:48 +11:00
parent df9c062092
commit 6adef06a0d
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ const favoriteReq = {
/**
*
* @param {{ type: string, group: string, displayName: string, visibility: string }} params group is a name
* @param {{ type: string, group: string, displayName?: string, visibility?: string }} params group is a name
* @return { Promise<{json: any, params}> }
*/
saveFavoriteGroup(params) {
+3
View File
@@ -34,6 +34,8 @@ export const useFavoriteStore = defineStore('Favorite', () => {
let cachedFavorites = new Map();
const currentFavoriteTab = ref('friend');
const cachedFavoriteGroups = ref(new Map());
const cachedFavoriteGroupsByTypeName = ref(new Map());
@@ -1609,6 +1611,7 @@ export const useFavoriteStore = defineStore('Favorite', () => {
cachedFavoritesByObjectId,
localWorldFavoriteGroups,
groupedByGroupKeyFavoriteFriends,
currentFavoriteTab,
initFavorites,
applyFavorite,
+4 -4
View File
@@ -36,7 +36,7 @@
"></el-button>
</el-tooltip>
</div>
<el-tabs v-model="currentTabName" v-loading="isFavoriteLoading" type="card" style="height: 100%">
<el-tabs v-model="currentFavoriteTab" v-loading="isFavoriteLoading" type="card" style="height: 100%">
<el-tab-pane name="friend" :label="t('view.favorite.friends.header')">
<FavoritesFriendTab
:edit-favorites-mode="editFavoritesMode"
@@ -86,7 +86,8 @@
localWorldFavoritesList,
avatarImportDialogInput,
worldImportDialogInput,
friendImportDialogInput
friendImportDialogInput,
currentFavoriteTab
} = storeToRefs(useFavoriteStore());
const {
refreshFavorites,
@@ -102,7 +103,6 @@
const editFavoritesMode = ref(false);
const refreshingLocalFavorites = ref(false);
const currentTabName = ref('friend');
function showBulkUnfavoriteSelectionConfirm() {
const elementsTicked = [];
@@ -192,7 +192,7 @@
function handleBulkCopyFavoriteSelection() {
let idList = '';
switch (currentTabName.value) {
switch (currentFavoriteTab.value) {
case 'friend':
for (const ctx of favoriteFriends.value) {
if (ctx.$selected) {