diff --git a/src/api/image.js b/src/api/image.js index 57701eb2..24321f4b 100644 --- a/src/api/image.js +++ b/src/api/image.js @@ -21,7 +21,7 @@ const imageReq = { } catch (error) { console.error('Failed to cleanup avatar upload:', error); } - avatarStore.avatarDialog.loading = false; + avatarStore.setAvatarDialogLoading(false); }, async uploadAvatarImage(params, fileId) { @@ -154,7 +154,7 @@ const imageReq = { } catch (error) { console.error('Failed to cleanup world upload:', error); } - worldStore.worldDialog.loading = false; + worldStore.setWorldDialogLoading(false); }, async uploadWorldImage(params, fileId) { diff --git a/src/components/GlobalSearchSync.vue b/src/components/GlobalSearchSync.vue index d466fc6f..56fe5ddc 100644 --- a/src/components/GlobalSearchSync.vue +++ b/src/components/GlobalSearchSync.vue @@ -17,7 +17,7 @@ watch( () => filterState.search, async (value) => { - globalSearchStore.query = value; + globalSearchStore.setQuery(value); // When query < 2 chars, override the built-in filter // so all items (hint categories) stay visible diff --git a/src/service/request.js b/src/service/request.js index 4fc3ad93..bdfd28ea 100644 --- a/src/service/request.js +++ b/src/service/request.js @@ -167,7 +167,7 @@ export function request(endpoint, options) { parsed.status === 429 && init.url.endsWith('/instances/groups') ) { - updateLoopStore.nextGroupInstanceRefresh = 120; // 1min + updateLoopStore.setNextGroupInstanceRefresh(120); // 1min $throw(429, t('api.status_code.429'), endpoint); } if (parsed.status === 504 || parsed.status === 502) { diff --git a/src/service/websocket.js b/src/service/websocket.js index 860ebe27..46f49045 100644 --- a/src/service/websocket.js +++ b/src/service/websocket.js @@ -564,7 +564,7 @@ function handlePipeline(args) { uiStore.notifyMenu('notification'); } notificationStore.queueNotificationNoty(noty); - notificationStore.notificationTable.data.push(noty); + notificationStore.appendNotificationTableEntry(noty); sharedFeedStore.addEntry(noty); break; diff --git a/src/shared/utils/memos.js b/src/shared/utils/memos.js index 83d8141c..7de5974e 100644 --- a/src/shared/utils/memos.js +++ b/src/shared/utils/memos.js @@ -62,7 +62,7 @@ async function saveUserMemo(id, memo) { } else { ref.$nickName = ''; } - userStore.userDialog.memo = memo; + userStore.setUserDialogMemo(memo); } } diff --git a/src/stores/avatar.js b/src/stores/avatar.js index 04a88b26..21ec1deb 100644 --- a/src/stores/avatar.js +++ b/src/stores/avatar.js @@ -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 diff --git a/src/stores/globalSearch.js b/src/stores/globalSearch.js index ca13e06e..1829396b 100644 --- a/src/stores/globalSearch.js +++ b/src/stores/globalSearch.js @@ -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 }; }); diff --git a/src/stores/notification/index.js b/src/stores/notification/index.js index a61104ac..8911c28b 100644 --- a/src/stores/notification/index.js +++ b/src/stores/notification/index.js @@ -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 }; }); diff --git a/src/stores/updateLoop.js b/src/stores/updateLoop.js index 6eb06620..d6a9fe90 100644 --- a/src/stores/updateLoop.js +++ b/src/stores/updateLoop.js @@ -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 }; }); diff --git a/src/stores/user.js b/src/stores/user.js index 20bff090..21ea25d9 100644 --- a/src/stores/user.js +++ b/src/stores/user.js @@ -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 diff --git a/src/stores/vrcx.js b/src/stores/vrcx.js index 5a336e8a..37350749 100644 --- a/src/stores/vrcx.js +++ b/src/stores/vrcx.js @@ -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, diff --git a/src/stores/world.js b/src/stores/world.js index ef71c259..c1980260 100644 --- a/src/stores/world.js +++ b/src/stores/world.js @@ -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 diff --git a/src/views/Login/Dialog/LoginSettingsDialog.vue b/src/views/Login/Dialog/LoginSettingsDialog.vue index 59d274b2..32970983 100644 --- a/src/views/Login/Dialog/LoginSettingsDialog.vue +++ b/src/views/Login/Dialog/LoginSettingsDialog.vue @@ -102,7 +102,7 @@ } async function saveProxy() { - vrcxStore.proxyServer = proxyServerLocal.value; + vrcxStore.setProxyServer(proxyServerLocal.value); await VRCXStorage.Set('VRCX_ProxyServer', vrcxStore.proxyServer); await VRCXStorage.Save(); }