mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-03 05:26:05 +02:00
use action from store instead of directly modifying state in components
This commit is contained in:
@@ -242,6 +242,13 @@ export const useAvatarStore = defineStore('Avatar', () => {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {boolean} value
|
||||
*/
|
||||
function setAvatarDialogLoading(value) {
|
||||
avatarDialog.value.loading = value;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} avatarId
|
||||
@@ -800,6 +807,7 @@ export const useAvatarStore = defineStore('Avatar', () => {
|
||||
lookupAvatars,
|
||||
selectAvatarWithConfirmation,
|
||||
selectAvatarWithoutConfirmation,
|
||||
setAvatarDialogLoading,
|
||||
showAvatarAuthorDialog,
|
||||
addAvatarWearTime,
|
||||
preloadOwnAvatars
|
||||
|
||||
@@ -149,6 +149,13 @@ export const useGlobalSearchStore = defineStore('GlobalSearch', () => {
|
||||
isOpen.value = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
*/
|
||||
function setQuery(value) {
|
||||
query.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {{id: string, type: string}} item
|
||||
*/
|
||||
@@ -187,6 +194,7 @@ export const useGlobalSearchStore = defineStore('GlobalSearch', () => {
|
||||
|
||||
open,
|
||||
close,
|
||||
setQuery,
|
||||
selectResult
|
||||
};
|
||||
});
|
||||
|
||||
@@ -392,6 +392,13 @@ export const useNotificationStore = defineStore('Notification', () => {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {object} entry
|
||||
*/
|
||||
function appendNotificationTableEntry(entry) {
|
||||
notificationTable.value.data.push(entry);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param notificationId
|
||||
@@ -1474,6 +1481,7 @@ export const useNotificationStore = defineStore('Notification', () => {
|
||||
isNotificationExpired,
|
||||
openNotificationLink,
|
||||
queueMarkAsSeen,
|
||||
markAllAsSeen
|
||||
markAllAsSeen,
|
||||
appendNotificationTableEntry
|
||||
};
|
||||
});
|
||||
|
||||
@@ -151,6 +151,10 @@ export const useUpdateLoopStore = defineStore('UpdateLoop', () => {
|
||||
state.nextClearVRCXCacheCheck = value;
|
||||
}
|
||||
|
||||
function setNextGroupInstanceRefresh(value) {
|
||||
state.nextGroupInstanceRefresh = value;
|
||||
}
|
||||
|
||||
return {
|
||||
// state,
|
||||
|
||||
@@ -159,6 +163,7 @@ export const useUpdateLoopStore = defineStore('UpdateLoop', () => {
|
||||
nextDiscordUpdate,
|
||||
ipcTimeout,
|
||||
updateLoop,
|
||||
setNextGroupInstanceRefresh,
|
||||
setNextClearVRCXCacheCheck
|
||||
};
|
||||
});
|
||||
|
||||
@@ -1973,6 +1973,13 @@ export const useUserStore = defineStore('User', () => {
|
||||
sendBoopDialog.value.visible = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
*/
|
||||
function setUserDialogMemo(value) {
|
||||
userDialog.value.memo = value;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -2018,6 +2025,7 @@ export const useUserStore = defineStore('User', () => {
|
||||
getCurrentUser,
|
||||
handleConfig,
|
||||
showSendBoopDialog,
|
||||
setUserDialogMemo,
|
||||
checkNote,
|
||||
toggleSharedConnectionsOptOut,
|
||||
toggleDiscordFriendsOptOut
|
||||
|
||||
@@ -233,6 +233,13 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
*/
|
||||
function setProxyServer(value) {
|
||||
proxyServer.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -862,6 +869,7 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
||||
|
||||
appStartAt,
|
||||
proxyServer,
|
||||
setProxyServer,
|
||||
currentlyDroppingFile,
|
||||
isRegistryBackupDialogVisible,
|
||||
ipcEnabled,
|
||||
|
||||
@@ -207,6 +207,13 @@ export const useWorldStore = defineStore('World', () => {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {boolean} value
|
||||
*/
|
||||
function setWorldDialogLoading(value) {
|
||||
worldDialog.loading = value;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -316,6 +323,7 @@ export const useWorldStore = defineStore('World', () => {
|
||||
worldDialog,
|
||||
cachedWorlds,
|
||||
showWorldDialog,
|
||||
setWorldDialogLoading,
|
||||
updateVRChatWorldCache,
|
||||
applyWorld,
|
||||
preloadOwnWorlds
|
||||
|
||||
Reference in New Issue
Block a user