mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-23 08:43:50 +02:00
Allow users to reorder favorite friend groups in the sidebar
This commit is contained in:
@@ -78,6 +78,7 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
const isHideFriendsInSameInstance = ref(false);
|
||||
const isSidebarDivideByFriendGroup = ref(false);
|
||||
const sidebarFavoriteGroups = ref([]);
|
||||
const sidebarFavoriteGroupOrder = ref([]);
|
||||
const hideUserNotes = ref(false);
|
||||
const hideUserMemos = ref(false);
|
||||
const hideUnfriends = ref(false);
|
||||
@@ -152,6 +153,7 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
isHideFriendsInSameInstanceConfig,
|
||||
isSidebarDivideByFriendGroupConfig,
|
||||
sidebarFavoriteGroupsConfig,
|
||||
sidebarFavoriteGroupOrderConfig,
|
||||
hideUserNotesConfig,
|
||||
hideUserMemosConfig,
|
||||
hideUnfriendsConfig,
|
||||
@@ -208,6 +210,10 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
true
|
||||
),
|
||||
configRepository.getString('VRCX_sidebarFavoriteGroups', '[]'),
|
||||
configRepository.getString(
|
||||
'VRCX_sidebarFavoriteGroupOrder',
|
||||
'[]'
|
||||
),
|
||||
configRepository.getBool('VRCX_hideUserNotes', false),
|
||||
configRepository.getBool('VRCX_hideUserMemos', false),
|
||||
configRepository.getBool('VRCX_hideUnfriends', false),
|
||||
@@ -299,6 +305,9 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
sidebarFavoriteGroups.value = JSON.parse(
|
||||
sidebarFavoriteGroupsConfig
|
||||
);
|
||||
sidebarFavoriteGroupOrder.value = JSON.parse(
|
||||
sidebarFavoriteGroupOrderConfig
|
||||
);
|
||||
hideUserNotes.value = hideUserNotesConfig;
|
||||
hideUserMemos.value = hideUserMemosConfig;
|
||||
hideUnfriends.value = hideUnfriendsConfig;
|
||||
@@ -717,6 +726,16 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
JSON.stringify(value)
|
||||
);
|
||||
}
|
||||
/**
|
||||
* @param {string[]} value
|
||||
*/
|
||||
function setSidebarFavoriteGroupOrder(value) {
|
||||
sidebarFavoriteGroupOrder.value = value;
|
||||
configRepository.setString(
|
||||
'VRCX_sidebarFavoriteGroupOrder',
|
||||
JSON.stringify(value)
|
||||
);
|
||||
}
|
||||
function setHideUserNotes() {
|
||||
hideUserNotes.value = !hideUserNotes.value;
|
||||
configRepository.setBool('VRCX_hideUserNotes', hideUserNotes.value);
|
||||
@@ -975,6 +994,7 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
isHideFriendsInSameInstance,
|
||||
isSidebarDivideByFriendGroup,
|
||||
sidebarFavoriteGroups,
|
||||
sidebarFavoriteGroupOrder,
|
||||
hideUserNotes,
|
||||
hideUserMemos,
|
||||
hideUnfriends,
|
||||
@@ -1013,6 +1033,7 @@ export const useAppearanceSettingsStore = defineStore(
|
||||
setIsHideFriendsInSameInstance,
|
||||
setIsSidebarDivideByFriendGroup,
|
||||
setSidebarFavoriteGroups,
|
||||
setSidebarFavoriteGroupOrder,
|
||||
setHideUserNotes,
|
||||
setHideUserMemos,
|
||||
setHideUnfriends,
|
||||
|
||||
Reference in New Issue
Block a user