mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-05 14:26:06 +02:00
use ref to replace reactive
This commit is contained in:
Generated
+2
-2
@@ -78,8 +78,8 @@
|
||||
"zod": "^3.25.76"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=24.13.0",
|
||||
"npm": ">=11.9.0"
|
||||
"node": ">=24.10.0",
|
||||
"npm": ">=11.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
|
||||
+6
-6
@@ -1,4 +1,4 @@
|
||||
import { computed, nextTick, reactive, ref, shallowReactive, watch } from 'vue';
|
||||
import { computed, reactive, ref, shallowReactive, watch } from 'vue';
|
||||
import { defineStore } from 'pinia';
|
||||
import { toast } from 'vue-sonner';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
@@ -484,7 +484,7 @@ export const useUserStore = defineStore('User', () => {
|
||||
delete json.currentAvatarThumbnailImageUrl;
|
||||
}
|
||||
if (typeof ref === 'undefined') {
|
||||
ref = reactive({
|
||||
ref = {
|
||||
ageVerificationStatus: '',
|
||||
ageVerified: false,
|
||||
allowAvatarCopying: false,
|
||||
@@ -553,7 +553,7 @@ export const useUserStore = defineStore('User', () => {
|
||||
$moderations: {},
|
||||
//
|
||||
...json
|
||||
});
|
||||
};
|
||||
if (locationStore.lastLocation.playerList.has(json.id)) {
|
||||
// update $location_at from instance join time
|
||||
const player = locationStore.lastLocation.playerList.get(
|
||||
@@ -644,12 +644,12 @@ export const useUserStore = defineStore('User', () => {
|
||||
if (ref.location === 'traveling') {
|
||||
ref.$location = parseLocation(ref.travelingToLocation);
|
||||
if (!currentTravelers.has(ref.id) && ref.travelingToLocation) {
|
||||
const travelRef = reactive({
|
||||
const travelRef = ref({
|
||||
created_at: new Date().toJSON(),
|
||||
...ref
|
||||
});
|
||||
currentTravelers.set(ref.id, travelRef);
|
||||
onPlayerTraveling(travelRef);
|
||||
currentTravelers.set(ref.id, travelRef.value);
|
||||
onPlayerTraveling(travelRef.value);
|
||||
}
|
||||
} else {
|
||||
ref.$location = parseLocation(ref.location);
|
||||
|
||||
Reference in New Issue
Block a user