mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-14 04:13:52 +02:00
clean
This commit is contained in:
@@ -664,7 +664,7 @@ const groupReq = {
|
||||
method: 'GET',
|
||||
params
|
||||
}).then((json) => {
|
||||
var args = {
|
||||
const args = {
|
||||
json,
|
||||
params
|
||||
};
|
||||
|
||||
@@ -1250,9 +1250,9 @@
|
||||
if (action === 'confirm' && instance.inputValue !== world.ref.previewYoutubeId) {
|
||||
if (instance.inputValue.length > 11) {
|
||||
try {
|
||||
var url = new URL(instance.inputValue);
|
||||
var id1 = url.pathname;
|
||||
var id2 = url.searchParams.get('v');
|
||||
const url = new URL(instance.inputValue);
|
||||
const id1 = url.pathname;
|
||||
const id2 = url.searchParams.get('v');
|
||||
if (id1 && id1.length === 12) {
|
||||
instance.inputValue = id1.substring(1, 12);
|
||||
}
|
||||
|
||||
@@ -6,11 +6,11 @@ import { useFriendStore } from '../../stores';
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async function migrateMemos() {
|
||||
var json = JSON.parse(await VRCXStorage.GetAll());
|
||||
for (var line in json) {
|
||||
const json = JSON.parse(await VRCXStorage.GetAll());
|
||||
for (const line in json) {
|
||||
if (line.substring(0, 8) === 'memo_usr') {
|
||||
var userId = line.substring(5);
|
||||
var memo = json[line];
|
||||
const userId = line.substring(5);
|
||||
const memo = json[line];
|
||||
if (memo) {
|
||||
await saveUserMemo(userId, memo);
|
||||
VRCXStorage.Remove(`memo_${userId}`);
|
||||
@@ -54,11 +54,11 @@ async function saveUserMemo(id, memo) {
|
||||
} else {
|
||||
await database.deleteUserMemo(id);
|
||||
}
|
||||
var ref = friends.value.get(id);
|
||||
const ref = friends.value.get(id);
|
||||
if (ref) {
|
||||
ref.memo = String(memo || '');
|
||||
if (memo) {
|
||||
var array = memo.split('\n');
|
||||
const array = memo.split('\n');
|
||||
ref.$nickName = array[0];
|
||||
} else {
|
||||
ref.$nickName = '';
|
||||
@@ -72,14 +72,14 @@ async function saveUserMemo(id, memo) {
|
||||
async function getAllUserMemos() {
|
||||
const friendStore = useFriendStore();
|
||||
const { friends } = storeToRefs(friendStore);
|
||||
var memos = await database.getAllUserMemos();
|
||||
const memos = await database.getAllUserMemos();
|
||||
memos.forEach((memo) => {
|
||||
var ref = friends.value.get(memo.userId);
|
||||
const ref = friends.value.get(memo.userId);
|
||||
if (typeof ref !== 'undefined') {
|
||||
ref.memo = memo.memo;
|
||||
ref.$nickName = '';
|
||||
if (memo.memo) {
|
||||
var array = memo.memo.split('\n');
|
||||
const array = memo.memo.split('\n');
|
||||
ref.$nickName = array[0];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -762,7 +762,7 @@ export const useNotificationStore = defineStore('Notification', () => {
|
||||
);
|
||||
break;
|
||||
case 'Online':
|
||||
var locationName = '';
|
||||
let locationName = '';
|
||||
if (noty.worldName) {
|
||||
locationName = ` to ${displayLocation(
|
||||
noty.location,
|
||||
@@ -2238,7 +2238,7 @@ export const useNotificationStore = defineStore('Notification', () => {
|
||||
noty.isFriend = friendStore.friends.has(noty.userId);
|
||||
noty.isFavorite = friendStore.localFavoriteFriends.has(noty.userId);
|
||||
} else if (noty.displayName) {
|
||||
for (var ref of userStore.cachedUsers.values()) {
|
||||
for (const ref of userStore.cachedUsers.values()) {
|
||||
if (ref.displayName === noty.displayName) {
|
||||
noty.isFriend = friendStore.friends.has(ref.id);
|
||||
noty.isFavorite = friendStore.localFavoriteFriends.has(
|
||||
|
||||
1
src/types/globals.d.ts
vendored
1
src/types/globals.d.ts
vendored
@@ -6,7 +6,6 @@ declare global {
|
||||
|
||||
interface Window {
|
||||
$app: any;
|
||||
API: API;
|
||||
AppApi: AppApi;
|
||||
WebApi: WebApi;
|
||||
VRCXStorage: VRCXStorage;
|
||||
|
||||
Reference in New Issue
Block a user