From 109753b3fd15eb4c7e2467386d437bd192a871bf Mon Sep 17 00:00:00 2001 From: Natsumi Date: Thu, 12 Dec 2024 16:03:51 +1300 Subject: [PATCH] Fix PR conflicts, moderation actions, export local favorites --- html/src/app.js | 28 +++++++++++++-------------- html/src/classes/apiRequestHandler.js | 6 +++--- html/src/classes/gameLog.js | 1 + html/src/localization/en/en.json | 8 ++++---- html/src/localization/ja/en.json | 6 +++--- html/src/localization/zh-CN/en.json | 6 +++--- 6 files changed, 28 insertions(+), 27 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index f7bd33ad..dbcf20c9 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -10628,49 +10628,49 @@ speechSynthesis.getVoices(); userId }); break; - case 'Unblock': + case 'Moderation Unblock': API.deletePlayerModeration({ moderated: userId, type: 'block' }); break; - case 'Block': + case 'Moderation Block': API.sendPlayerModeration({ moderated: userId, type: 'block' }); break; - case 'Unmute': + case 'Moderation Unmute': API.deletePlayerModeration({ moderated: userId, type: 'mute' }); break; - case 'Mute': + case 'Moderation Mute': API.sendPlayerModeration({ moderated: userId, type: 'mute' }); break; - case 'Enable Avatar Interaction': + case 'Moderation Enable Avatar Interaction': API.deletePlayerModeration({ moderated: userId, type: 'interactOff' }); break; - case 'Disable Avatar Interaction': + case 'Moderation Disable Avatar Interaction': API.sendPlayerModeration({ moderated: userId, type: 'interactOff' }); break; - case 'Unmute Chatbox': + case 'Moderation Enable Chatbox': API.deletePlayerModeration({ moderated: userId, type: 'muteChat' }); break; - case 'Mute Chatbox': + case 'Moderation Disable Chatbox': API.sendPlayerModeration({ moderated: userId, type: 'muteChat' @@ -19641,7 +19641,7 @@ speechSynthesis.getVoices(); function resText(ref) { let resArr = []; propsForQuery.forEach((e) => { - resArr.push(formatter(ref.ref?.[e])); + resArr.push(formatter(ref?.[e])); }); return resArr.join(','); } @@ -19658,7 +19658,7 @@ speechSynthesis.getVoices(); if (this.worldExportFavoriteGroup === group) { $app.favoriteWorlds.forEach((ref) => { if (group.key === ref.groupKey) { - lines.push(resText(ref)); + lines.push(resText(ref.ref)); } }); } @@ -19676,7 +19676,7 @@ speechSynthesis.getVoices(); } else { // export all this.favoriteWorlds.forEach((ref) => { - lines.push(resText(ref)); + lines.push(resText(ref.ref)); }); for (let i = 0; i < this.localWorldFavoritesList.length; ++i) { const worldId = this.localWorldFavoritesList[i]; @@ -19910,7 +19910,7 @@ speechSynthesis.getVoices(); function resText(ref) { let resArr = []; propsForQuery.forEach((e) => { - resArr.push(formatter(ref.ref?.[e])); + resArr.push(formatter(ref?.[e])); }); return resArr.join(','); } @@ -19930,7 +19930,7 @@ speechSynthesis.getVoices(); ) { $app.favoriteAvatars.forEach((ref) => { if (group.key === ref.groupKey) { - lines.push(resText(ref)); + lines.push(resText(ref.ref)); } }); } @@ -19948,7 +19948,7 @@ speechSynthesis.getVoices(); } else { // export all this.favoriteAvatars.forEach((ref) => { - lines.push(resText(ref)); + lines.push(resText(ref.ref)); }); for (let i = 0; i < this.localAvatarFavoritesList.length; ++i) { const avatarId = this.localAvatarFavoritesList[i]; diff --git a/html/src/classes/apiRequestHandler.js b/html/src/classes/apiRequestHandler.js index ae2ba731..dae10058 100644 --- a/html/src/classes/apiRequestHandler.js +++ b/html/src/classes/apiRequestHandler.js @@ -165,7 +165,7 @@ export default class extends baseClass { ) { $app.$message({ message: $t( - 'api.error.message.avatar_private_or_deleted' + 'message.api_handler.avatar_private_or_deleted' ), type: 'error' }); @@ -254,12 +254,12 @@ export default class extends baseClass { } if (typeof error !== 'undefined') { text.push( - `${$t('api.error.message.error_message')}${typeof error === 'string' ? error : JSON.stringify(error)}` + `${$t('api.error.message.error_message')}: ${typeof error === 'string' ? error : JSON.stringify(error)}` ); } if (typeof endpoint !== 'undefined') { text.push( - `${$t('api.error.message.endpoint')}"${typeof endpoint === 'string' ? endpoint : JSON.stringify(endpoint)}"` + `${$t('api.error.message.endpoint')}: "${typeof endpoint === 'string' ? endpoint : JSON.stringify(endpoint)}"` ); } text = text.map((s) => $app.escapeTag(s)).join('
'); diff --git a/html/src/classes/gameLog.js b/html/src/classes/gameLog.js index fd839dd5..ebabf3ee 100644 --- a/html/src/classes/gameLog.js +++ b/html/src/classes/gameLog.js @@ -457,6 +457,7 @@ export default class extends baseClass { !this.localFavoriteFriends.has(entry.userId) && (entry.type === 'OnPlayerJoined' || entry.type === 'OnPlayerLeft' || + entry.type === 'VideoPlay' || entry.type === 'PortalSpawn' || entry.type === 'External') ) { diff --git a/html/src/localization/en/en.json b/html/src/localization/en/en.json index f51b8773..3eb9f0ae 100644 --- a/html/src/localization/en/en.json +++ b/html/src/localization/en/en.json @@ -1454,7 +1454,7 @@ "vrcx_updater": { "failed": "Failed to check for update, {message}" }, - "api_headler": { + "api_handler": { "avatar_private_or_deleted": "Avatar is private or deleted" }, "badge": { @@ -1924,8 +1924,8 @@ }, "error": { "message": { - "error_message": "Error Message: ", - "endpoint": "Endpoint: ", + "error_message": "Error Message", + "endpoint": "Endpoint", "missing_credentials": "Missing Credentials", "avatar_private_or_deleted": "Avatar private or deleted", "vpn_in_use": "VRChat currently blocks most VPNs. Please disable any connected VPNs and try again.", @@ -1935,4 +1935,4 @@ } } } -} \ No newline at end of file +} diff --git a/html/src/localization/ja/en.json b/html/src/localization/ja/en.json index 127975b5..648b2b85 100644 --- a/html/src/localization/ja/en.json +++ b/html/src/localization/ja/en.json @@ -1907,8 +1907,8 @@ }, "error": { "message": { - "error_message": "エラーメッセージ:", - "endpoint": "エンドポイント:", + "error_message": "エラーメッセージ", + "endpoint": "エンドポイント", "missing_credentials": "認証情報不足", "avatar_private_or_deleted": "アバターは非公開または削除されました", "vpn_in_use": "VRChatは現在ほとんどのVPNをブロックしています。接続中のVPNを無効にして、もう一度お試しください。", @@ -1918,4 +1918,4 @@ } } } -} \ No newline at end of file +} diff --git a/html/src/localization/zh-CN/en.json b/html/src/localization/zh-CN/en.json index cd98e892..437c88ee 100644 --- a/html/src/localization/zh-CN/en.json +++ b/html/src/localization/zh-CN/en.json @@ -1910,8 +1910,8 @@ }, "error": { "message": { - "error_message": "错误信息:", - "endpoint": "接口地址:", + "error_message": "错误信息", + "endpoint": "接口地址", "missing_credentials": "访问凭据缺失", "avatar_private_or_deleted": "模型是私密的或已被删除", "vpn_in_use": "VRChat 目前屏蔽了大多数的 VPN。请断开所有已连接的 VPN 后重试。", @@ -1921,4 +1921,4 @@ } } } -} \ No newline at end of file +}