mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
Save current Favorites tab
This commit is contained in:
+1
-1
@@ -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}> }
|
* @return { Promise<{json: any, params}> }
|
||||||
*/
|
*/
|
||||||
saveFavoriteGroup(params) {
|
saveFavoriteGroup(params) {
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ export const useFavoriteStore = defineStore('Favorite', () => {
|
|||||||
|
|
||||||
let cachedFavorites = new Map();
|
let cachedFavorites = new Map();
|
||||||
|
|
||||||
|
const currentFavoriteTab = ref('friend');
|
||||||
|
|
||||||
const cachedFavoriteGroups = ref(new Map());
|
const cachedFavoriteGroups = ref(new Map());
|
||||||
const cachedFavoriteGroupsByTypeName = ref(new Map());
|
const cachedFavoriteGroupsByTypeName = ref(new Map());
|
||||||
|
|
||||||
@@ -1609,6 +1611,7 @@ export const useFavoriteStore = defineStore('Favorite', () => {
|
|||||||
cachedFavoritesByObjectId,
|
cachedFavoritesByObjectId,
|
||||||
localWorldFavoriteGroups,
|
localWorldFavoriteGroups,
|
||||||
groupedByGroupKeyFavoriteFriends,
|
groupedByGroupKeyFavoriteFriends,
|
||||||
|
currentFavoriteTab,
|
||||||
|
|
||||||
initFavorites,
|
initFavorites,
|
||||||
applyFavorite,
|
applyFavorite,
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
"></el-button>
|
"></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</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')">
|
<el-tab-pane name="friend" :label="t('view.favorite.friends.header')">
|
||||||
<FavoritesFriendTab
|
<FavoritesFriendTab
|
||||||
:edit-favorites-mode="editFavoritesMode"
|
:edit-favorites-mode="editFavoritesMode"
|
||||||
@@ -86,7 +86,8 @@
|
|||||||
localWorldFavoritesList,
|
localWorldFavoritesList,
|
||||||
avatarImportDialogInput,
|
avatarImportDialogInput,
|
||||||
worldImportDialogInput,
|
worldImportDialogInput,
|
||||||
friendImportDialogInput
|
friendImportDialogInput,
|
||||||
|
currentFavoriteTab
|
||||||
} = storeToRefs(useFavoriteStore());
|
} = storeToRefs(useFavoriteStore());
|
||||||
const {
|
const {
|
||||||
refreshFavorites,
|
refreshFavorites,
|
||||||
@@ -102,7 +103,6 @@
|
|||||||
|
|
||||||
const editFavoritesMode = ref(false);
|
const editFavoritesMode = ref(false);
|
||||||
const refreshingLocalFavorites = ref(false);
|
const refreshingLocalFavorites = ref(false);
|
||||||
const currentTabName = ref('friend');
|
|
||||||
|
|
||||||
function showBulkUnfavoriteSelectionConfirm() {
|
function showBulkUnfavoriteSelectionConfirm() {
|
||||||
const elementsTicked = [];
|
const elementsTicked = [];
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
|
|
||||||
function handleBulkCopyFavoriteSelection() {
|
function handleBulkCopyFavoriteSelection() {
|
||||||
let idList = '';
|
let idList = '';
|
||||||
switch (currentTabName.value) {
|
switch (currentFavoriteTab.value) {
|
||||||
case 'friend':
|
case 'friend':
|
||||||
for (const ctx of favoriteFriends.value) {
|
for (const ctx of favoriteFriends.value) {
|
||||||
if (ctx.$selected) {
|
if (ctx.$selected) {
|
||||||
|
|||||||
Reference in New Issue
Block a user