This commit is contained in:
pa
2025-07-14 21:28:13 +09:00
committed by Natsumi
parent f53eed46cd
commit b5b962b198
5 changed files with 15 additions and 16 deletions

View File

@@ -664,7 +664,7 @@ const groupReq = {
method: 'GET', method: 'GET',
params params
}).then((json) => { }).then((json) => {
var args = { const args = {
json, json,
params params
}; };

View File

@@ -1250,9 +1250,9 @@
if (action === 'confirm' && instance.inputValue !== world.ref.previewYoutubeId) { if (action === 'confirm' && instance.inputValue !== world.ref.previewYoutubeId) {
if (instance.inputValue.length > 11) { if (instance.inputValue.length > 11) {
try { try {
var url = new URL(instance.inputValue); const url = new URL(instance.inputValue);
var id1 = url.pathname; const id1 = url.pathname;
var id2 = url.searchParams.get('v'); const id2 = url.searchParams.get('v');
if (id1 && id1.length === 12) { if (id1 && id1.length === 12) {
instance.inputValue = id1.substring(1, 12); instance.inputValue = id1.substring(1, 12);
} }

View File

@@ -6,11 +6,11 @@ import { useFriendStore } from '../../stores';
* @returns {Promise<void>} * @returns {Promise<void>}
*/ */
async function migrateMemos() { async function migrateMemos() {
var json = JSON.parse(await VRCXStorage.GetAll()); const json = JSON.parse(await VRCXStorage.GetAll());
for (var line in json) { for (const line in json) {
if (line.substring(0, 8) === 'memo_usr') { if (line.substring(0, 8) === 'memo_usr') {
var userId = line.substring(5); const userId = line.substring(5);
var memo = json[line]; const memo = json[line];
if (memo) { if (memo) {
await saveUserMemo(userId, memo); await saveUserMemo(userId, memo);
VRCXStorage.Remove(`memo_${userId}`); VRCXStorage.Remove(`memo_${userId}`);
@@ -54,11 +54,11 @@ async function saveUserMemo(id, memo) {
} else { } else {
await database.deleteUserMemo(id); await database.deleteUserMemo(id);
} }
var ref = friends.value.get(id); const ref = friends.value.get(id);
if (ref) { if (ref) {
ref.memo = String(memo || ''); ref.memo = String(memo || '');
if (memo) { if (memo) {
var array = memo.split('\n'); const array = memo.split('\n');
ref.$nickName = array[0]; ref.$nickName = array[0];
} else { } else {
ref.$nickName = ''; ref.$nickName = '';
@@ -72,14 +72,14 @@ async function saveUserMemo(id, memo) {
async function getAllUserMemos() { async function getAllUserMemos() {
const friendStore = useFriendStore(); const friendStore = useFriendStore();
const { friends } = storeToRefs(friendStore); const { friends } = storeToRefs(friendStore);
var memos = await database.getAllUserMemos(); const memos = await database.getAllUserMemos();
memos.forEach((memo) => { memos.forEach((memo) => {
var ref = friends.value.get(memo.userId); const ref = friends.value.get(memo.userId);
if (typeof ref !== 'undefined') { if (typeof ref !== 'undefined') {
ref.memo = memo.memo; ref.memo = memo.memo;
ref.$nickName = ''; ref.$nickName = '';
if (memo.memo) { if (memo.memo) {
var array = memo.memo.split('\n'); const array = memo.memo.split('\n');
ref.$nickName = array[0]; ref.$nickName = array[0];
} }
} }

View File

@@ -762,7 +762,7 @@ export const useNotificationStore = defineStore('Notification', () => {
); );
break; break;
case 'Online': case 'Online':
var locationName = ''; let locationName = '';
if (noty.worldName) { if (noty.worldName) {
locationName = ` to ${displayLocation( locationName = ` to ${displayLocation(
noty.location, noty.location,
@@ -2238,7 +2238,7 @@ export const useNotificationStore = defineStore('Notification', () => {
noty.isFriend = friendStore.friends.has(noty.userId); noty.isFriend = friendStore.friends.has(noty.userId);
noty.isFavorite = friendStore.localFavoriteFriends.has(noty.userId); noty.isFavorite = friendStore.localFavoriteFriends.has(noty.userId);
} else if (noty.displayName) { } else if (noty.displayName) {
for (var ref of userStore.cachedUsers.values()) { for (const ref of userStore.cachedUsers.values()) {
if (ref.displayName === noty.displayName) { if (ref.displayName === noty.displayName) {
noty.isFriend = friendStore.friends.has(ref.id); noty.isFriend = friendStore.friends.has(ref.id);
noty.isFavorite = friendStore.localFavoriteFriends.has( noty.isFavorite = friendStore.localFavoriteFriends.has(

View File

@@ -6,7 +6,6 @@ declare global {
interface Window { interface Window {
$app: any; $app: any;
API: API;
AppApi: AppApi; AppApi: AppApi;
WebApi: WebApi; WebApi: WebApi;
VRCXStorage: VRCXStorage; VRCXStorage: VRCXStorage;