Skip to content

Commit

Permalink
Avatar platform tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Natsumi-sama committed Dec 23, 2023
1 parent ebf27cb commit f030bd1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 11 deletions.
42 changes: 31 additions & 11 deletions html/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
});
}
}
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -18400,6 +18408,9 @@ speechSynthesis.getVoices();
isBlocked: false,
isQuestFallback: false,
hasImposter: false,
isPC: false,
isQuest: false,
isIos: false,
treeData: [],
fileSize: '',
inCache: false,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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];
Expand Down
3 changes: 3 additions & 0 deletions html/src/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down

0 comments on commit f030bd1

Please sign in to comment.