From f030bd10d97442092a4f1c8d6704d86ca9103da9 Mon Sep 17 00:00:00 2001 From: Natsumi Date: Sun, 24 Dec 2023 08:11:53 +1300 Subject: [PATCH] Avatar platform tags --- html/src/app.js | 42 +++++++++++++++++++++++++++++++----------- html/src/index.pug | 3 +++ 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index d63fc236..e6739d9c 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -7749,10 +7749,20 @@ speechSynthesis.getVoices(); this.logout(); } else { $app.relogin(user).then(() => { - new Noty({ - type: 'success', - text: 'Automatically logged in.' - }).show(); + if (this.errorNoty) { + this.errorNoty.close(); + } + if (!navigator.onLine) { + this.errorNoty = new Noty({ + type: 'error', + text: 'You are offline.' + }).show(); + } else { + this.errorNoty = new Noty({ + type: 'success', + text: 'Automatically logged in.' + }).show(); + } }); } } @@ -12692,15 +12702,14 @@ speechSynthesis.getVoices(); appId = '939473404808007731'; bigIcon = 'zuwa_zuwa_dance'; } else if ( - L.worldId === 'wrld_1b68f7a8-8aea-4900-b7a2-3fc4139ac817' || + L.worldId === 'wrld_74970324-58e8-4239-a17b-2c59dfdf00db' || L.worldId === 'wrld_db9d878f-6e76-4776-8bf2-15bcdd7fc445' || L.worldId === 'wrld_435bbf25-f34f-4b8b-82c6-cd809057eb8e' ) { appId = '968292722391785512'; bigIcon = 'ls_media'; } else if ( - L.worldId === 'wrld_791ebf58-54ce-4d3a-a0a0-39f10e1b20b2' || - L.worldId === 'wrld_86a09fce-a34e-4deb-81be-53c843f97e98' + L.worldId === 'wrld_266523e8-9161-40da-acd0-6bd82e075833' ) { appId = '1095440531821170820'; bigIcon = 'movie_and_chill'; @@ -15177,13 +15186,12 @@ speechSynthesis.getVoices(); 'wrld_dd6d2888-dbdc-47c2-bc98-3d631b2acd7c', 'wrld_52bdcdab-11cd-4325-9655-0fb120846945', 'wrld_2d40da63-8f1f-4011-8a9e-414eb8530acd', - 'wrld_1b68f7a8-8aea-4900-b7a2-3fc4139ac817', 'wrld_10e5e467-fc65-42ed-8957-f02cace1398c', 'wrld_04899f23-e182-4a8d-b2c7-2c74c7c15534', - 'wrld_791ebf58-54ce-4d3a-a0a0-39f10e1b20b2', - 'wrld_86a09fce-a34e-4deb-81be-53c843f97e98', 'wrld_435bbf25-f34f-4b8b-82c6-cd809057eb8e', - 'wrld_db9d878f-6e76-4776-8bf2-15bcdd7fc445' + 'wrld_db9d878f-6e76-4776-8bf2-15bcdd7fc445', + 'wrld_74970324-58e8-4239-a17b-2c59dfdf00db', + 'wrld_266523e8-9161-40da-acd0-6bd82e075833' ]; var L = API.parseLocation(location); if (rpcWorlds.includes(L.worldId)) { @@ -18400,6 +18408,9 @@ speechSynthesis.getVoices(); isBlocked: false, isQuestFallback: false, hasImposter: false, + isPC: false, + isQuest: false, + isIos: false, treeData: [], fileSize: '', inCache: false, @@ -18458,6 +18469,9 @@ speechSynthesis.getVoices(); D.cacheLocked = false; D.cachePath = ''; D.isQuestFallback = false; + D.isPC = false; + D.isQuest = false; + D.isIos = false; D.hasImposter = false; D.isFavorite = API.cachedFavoritesByObjectId.has(avatarId); D.isBlocked = API.cachedAvatarModerations.has(avatarId); @@ -18489,6 +18503,12 @@ speechSynthesis.getVoices(); if (/quest/.test(ref.tags)) { D.isQuestFallback = true; } + var { isPC, isQuest, isIos } = this.getAvailablePlatforms( + args.ref.unityPackages + ); + D.isPC = isPC; + D.isQuest = isQuest; + D.isIos = isIos; var assetUrl = ''; for (let i = ref.unityPackages.length - 1; i > -1; i--) { var unityPackage = ref.unityPackages[i]; diff --git a/html/src/index.pug b/html/src/index.pug index a432a7a4..df242651 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -819,6 +819,9 @@ html div el-tag(v-if="avatarDialog.ref.releaseStatus === 'public'" type="success" effect="plain" size="mini" style="margin-right:5px;margin-top:5px") {{ $t('dialog.avatar.tags.public') }} el-tag(v-else type="danger" effect="plain" size="mini" style="margin-right:5px;margin-top:5px") {{ $t('dialog.avatar.tags.private') }} + el-tag.x-tag-platform-pc(v-if="avatarDialog.isPC" type="info" effect="plain" size="mini" style="margin-right:5px;margin-top:5px") PC + el-tag.x-tag-platform-quest(v-if="avatarDialog.isQuest" type="info" effect="plain" size="mini" style="margin-right:5px;margin-top:5px") Android + el-tag.x-tag-platform-ios(v-if="avatarDialog.isIos" type="info" effect="plain" size="mini" style="margin-right:5px;margin-top:5px") iOS el-tag(v-if="avatarDialog.isQuestFallback" type="info" effect="plain" size="mini" style="margin-right:5px;margin-top:5px") {{ $t('dialog.avatar.tags.fallback') }} el-tag(v-if="avatarDialog.hasImposter" type="info" effect="plain" size="mini" style="margin-right:5px;margin-top:5px") {{ $t('dialog.avatar.tags.impostor') }} el-tag(v-if="avatarDialog.ref.unityPackageUrl" type="success" effect="plain" size="mini" style="margin-right:5px;margin-top:5px") {{ $t('dialog.avatar.tags.future_proofing') }}