Upgrade to Vue3 and Element Plus (#1374)

* Update Vue devtools

* upgrade vue pinia element-plus vue-i18n, add vite

* fix: i18n

* global components

* change v-deep

* upgrade vue-lazyload

* data table

* update enlint and safe-dialog

* package.json and vite.config.js

* el-icon

* el-message

* vue 2 -> vue3 migration changes

* $pinia

* dialog

* el-popover slot

* lint

* chore

* slot

* scss

* remote state access

* misc

* jsconfig

* el-button size mini -> small

* :model-value

* ElMessageBox

* datatable

* remove v-lazyload

* template #dropdown

* mini -> small

* css

* byebye hideTooltips

* use sass-embedded

* Update SQLite, remove unneeded libraries

* Fix shift remove local avatar favorites

* Electron arm64

* arm64 support

* bye pug

* f-word vite hah

* misc

* remove safe dialog component

* Add self invite to launch dialog

* Fix errors

* Icons 1

* improve localfavorite loading performance

* improve favorites world item performance

* dialog visibility changes for Element Plus

* clear element plus error

* import performance

* revert App.vue hah

* hah

* Revert "Add self invite to launch dialog"

This reverts commit 4801cfad58.

* Toggle self invite/open in-game

* Self invite on launch dialog

* el-button icon

* el-icon

* fix user dialog tab switching logic

* fix PlayerList

* Formatting changes

* More icons

* Fix friend log table

* loading margin

* fix markdown

* fix world dialog tab switching issue

* Fixes and formatting

* fix: global i18n.t export

* fix favorites world tab not working

* Create instance, displayName

* Remove group members sort by userId

* Fix loading dialog tabs on swtich

* Star

* charts console.warn

* wip: fix charts

* wip: fix charts

* wip: charts composables

* fix favorite item tooltip warning

* Fixes and formatting

* Clean up image dialogs

* Remove unused method

* Fix platform/size border

* Fix platform/size border

* $vr

* fix friendExportDialogVisible binding

* ElMessageBox and Settings

* Login formatting

* Rename VR overlay query

* Fix image popover and userdialog badges

* Formatting

* Big buttons

* Fixes, update Cef

* Fix gameLog table nav buttons jumping around while using nav buttons

* Fix z-index

* vr overlay

* vite input add theme

* defineAsyncComponent

* ISO 639-1

* fix i18n

* clean t

* Formatting, fix calendar, rotate arrows

* Show user status when user is offline

* Fix VR overlay

* fix theme and clean up

* split InstanceActivity

* tweak

* Fix VR overlay formatting

* fix scss var

* AppDebug hahahaha

* Years

* remove reactive

* improve perf

* state hah…

* fix user rendering poblems when user object is not yet loaded

* improve perf

* Update avatar/world image uploader, licenses, remove previous images dialog (old images are now deleted)

* improve perf 1

* Suppress stray errors

* fix traveling location display issue

* Fix empty instance creator

* improve friend list refresh performance

* fix main charts

* fix chart

* Fix darkmode

* Fix avatar dialog tags

---------

Co-authored-by: pa <maplenagisa@gmail.com>
This commit is contained in:
Natsumi
2025-09-12 10:45:24 +12:00
committed by GitHub
parent b233bbc299
commit 3324d0d279
249 changed files with 12948 additions and 19815 deletions
+102 -86
View File
@@ -2,17 +2,19 @@
<div v-show="menuActiveIndex === 'playerList'" class="x-container" style="padding-top: 5px">
<div style="display: flex; flex-direction: column; height: 100%">
<div v-if="currentInstanceWorld.ref.id" style="display: flex">
<el-popover placement="right" width="500px" trigger="click" style="height: 120px">
<el-popover placement="right" :width="500" trigger="click" style="height: 120px">
<template #reference>
<img
:src="currentInstanceWorld.ref.thumbnailImageUrl"
class="x-link"
style="flex: none; width: 160px; height: 120px; border-radius: 4px"
loading="lazy" />
</template>
<img
slot="reference"
v-lazy="currentInstanceWorld.ref.thumbnailImageUrl"
class="x-link"
style="flex: none; width: 160px; height: 120px; border-radius: 4px" />
<img
v-lazy="currentInstanceWorld.ref.imageUrl"
class="x-link"
style="width: 500px; height: 375px"
@click="showFullscreenImageDialog(currentInstanceWorld.ref.imageUrl)" />
:src="currentInstanceWorld.ref.imageUrl"
:class="['x-link', 'x-popover-image']"
@click="showFullscreenImageDialog(currentInstanceWorld.ref.imageUrl)"
loading="lazy" />
</el-popover>
<div style="margin-left: 10px; display: flex; flex-direction: column; min-width: 320px; width: 100%">
<div>
@@ -24,16 +26,17 @@
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
line-clamp: 1;
"
@click="showWorldDialog(currentInstanceWorld.ref.id)">
<i
v-show="
<el-icon
v-if="
currentUser.$homeLocation &&
currentUser.$homeLocation.worldId === currentInstanceWorld.ref.id
"
class="el-icon-s-home"
style="margin-right: 5px"></i>
style="margin-right: 5px"
><HomeFilled
/></el-icon>
{{ currentInstanceWorld.ref.name }}
</span>
</div>
@@ -49,7 +52,7 @@
v-if="currentInstanceWorld.ref.$isLabs"
type="primary"
effect="plain"
size="mini"
size="small"
style="margin-right: 5px"
>{{ t('dialog.world.tags.labs') }}</el-tag
>
@@ -57,7 +60,7 @@
v-else-if="currentInstanceWorld.ref.releaseStatus === 'public'"
type="success"
effect="plain"
size="mini"
size="small"
style="margin-right: 5px"
>{{ t('dialog.world.tags.public') }}</el-tag
>
@@ -65,7 +68,7 @@
v-else-if="currentInstanceWorld.ref.releaseStatus === 'private'"
type="danger"
effect="plain"
size="mini"
size="small"
style="margin-right: 5px"
>{{ t('dialog.world.tags.private') }}</el-tag
>
@@ -74,13 +77,12 @@
class="x-tag-platform-pc"
type="info"
effect="plain"
size="mini"
size="small"
style="margin-right: 5px"
>PC
<span
v-if="currentInstanceWorld.bundleSizes['standalonewindows']"
class="x-grey"
style="margin-left: 5px; border-left: inherit; padding-left: 5px"
:class="['x-grey', 'x-tag-platform-pc', 'x-tag-border-left']"
>{{ currentInstanceWorld.bundleSizes['standalonewindows'].fileSize }}</span
>
</el-tag>
@@ -89,28 +91,26 @@
class="x-tag-platform-quest"
type="info"
effect="plain"
size="mini"
size="small"
style="margin-right: 5px"
>Android
<span
v-if="currentInstanceWorld.bundleSizes['android']"
class="x-grey"
style="margin-left: 5px; border-left: inherit; padding-left: 5px"
:class="['x-grey', 'x-tag-platform-quest', 'x-tag-border-left']"
>{{ currentInstanceWorld.bundleSizes['android'].fileSize }}</span
>
</el-tag>
<el-tag
v-if="currentInstanceWorld.isIOS"
v-if="currentInstanceWorld.isIos"
class="x-tag-platform-ios"
type="info"
effect="plain"
size="mini"
size="small"
style="margin-right: 5px"
>iOS
<span
v-if="currentInstanceWorld.bundleSizes['ios']"
class="x-grey"
style="margin-left: 5px; border-left: inherit; padding-left: 5px"
:class="['x-grey', 'x-tag-platform-ios', 'x-tag-border-left']"
>{{ currentInstanceWorld.bundleSizes['ios'].fileSize }}</span
>
</el-tag>
@@ -118,7 +118,7 @@
v-if="currentInstanceWorld.avatarScalingDisabled"
type="warning"
effect="plain"
size="mini"
size="small"
style="margin-right: 5px; margin-top: 5px"
>{{ t('dialog.world.tags.avatar_scaling_disabled') }}</el-tag
>
@@ -126,7 +126,7 @@
v-if="currentInstanceWorld.inCache"
type="info"
effect="plain"
size="mini"
size="small"
style="margin-right: 5px">
<span>{{ currentInstanceWorld.cacheSize }} {{ t('dialog.world.tags.cache') }}</span>
</el-tag>
@@ -160,7 +160,7 @@
!currentInstanceWorldDescriptionExpanded
"
type="text"
size="mini"
size="small"
@click="currentInstanceWorldDescriptionExpanded = true"
>{{ !currentInstanceWorldDescriptionExpanded && 'Show more' }}</el-button
>
@@ -219,10 +219,7 @@
<el-button style="margin-left: 10px" @click="showChatboxBlacklistDialog">{{
t('view.player_list.photon.chatbox_blacklist')
}}</el-button>
<el-tooltip
placement="bottom"
:content="t('view.player_list.photon.status_tooltip')"
:disabled="hideTooltips">
<el-tooltip placement="bottom" :content="t('view.player_list.photon.status_tooltip')">
<div
style="
display: inline-block;
@@ -239,7 +236,7 @@
</div>
<el-tabs type="card">
<el-tab-pane :label="t('view.player_list.photon.current')">
<data-tables v-bind="photonEventTable" style="margin-bottom: 10px">
<DataTable v-bind="photonEventTable" style="margin-bottom: 10px">
<el-table-column :label="t('table.playerList.date')" prop="created_at" width="120">
<template #default="scope">
<el-tooltip placement="right">
@@ -272,7 +269,7 @@
v-text="scope.row.avatar.name"></span>
&nbsp;
<span v-if="!scope.row.inCache" style="color: #aaa"
><i class="el-icon-download"></i>&nbsp;</span
><el-icon><Download /></el-icon>&nbsp;</span
>
<span
v-if="scope.row.avatar.releaseStatus === 'public'"
@@ -315,7 +312,7 @@
:class="statusClass(scope.row.previousStatus)"></i>
</el-tooltip>
<span>
<i class="el-icon-right"></i>
<el-icon><ArrowRight /></el-icon>
</span>
<el-tooltip placement="top">
<template #content>
@@ -357,7 +354,7 @@
@click="showGroupDialog(scope.row.previousGroupId)"
v-text="scope.row.previousGroupId"></span>
<span>
<i class="el-icon-right"></i>
<el-icon><ArrowRight /></el-icon>
</span>
<span
v-if="scope.row.groupName"
@@ -401,7 +398,7 @@
v-text="scope.row.avatar.name"></span>
&nbsp;
<span v-if="!scope.row.inCache" style="color: #aaa"
><i class="el-icon-download"></i>&nbsp;</span
><el-icon><Download /></el-icon>&nbsp;</span
>
<span
v-if="scope.row.avatar.releaseStatus === 'public'"
@@ -419,10 +416,11 @@
<el-tooltip placement="right">
<template #content>
<img
v-lazy="scope.row.imageUrl"
:src="scope.row.imageUrl"
class="friends-list-avatar"
style="height: 500px; cursor: pointer"
@click="showFullscreenImageDialog(scope.row.imageUrl)" />
@click="showFullscreenImageDialog(scope.row.imageUrl)"
loading="lazy" />
</template>
<span v-text="scope.row.fileId"></span>
</el-tooltip>
@@ -436,10 +434,10 @@
<span v-else v-text="scope.row.text"></span>
</template>
</el-table-column>
</data-tables>
</DataTable>
</el-tab-pane>
<el-tab-pane :label="t('view.player_list.photon.previous')">
<data-tables v-bind="photonEventTablePrevious" style="margin-bottom: 10px">
<DataTable v-bind="photonEventTablePrevious" style="margin-bottom: 10px">
<el-table-column :label="t('table.playerList.date')" prop="created_at" width="120">
<template #default="scope">
<el-tooltip placement="right">
@@ -472,7 +470,7 @@
v-text="scope.row.avatar.name"></span>
&nbsp;
<span v-if="!scope.row.inCache" style="color: #aaa"
><i class="el-icon-download"></i>&nbsp;</span
><el-icon><Download /></el-icon>&nbsp;</span
>
<span
v-if="scope.row.avatar.releaseStatus === 'public'"
@@ -515,7 +513,7 @@
:class="statusClass(scope.row.previousStatus)"></i>
</el-tooltip>
<span>
<i class="el-icon-right"></i>
<el-icon><ArrowRight /></el-icon>
</span>
<el-tooltip placement="top">
<template #content>
@@ -557,7 +555,7 @@
@click="showGroupDialog(scope.row.previousGroupId)"
v-text="scope.row.previousGroupId"></span>
<span>
<i class="el-icon-right"></i>
<el-icon><ArrowRight /></el-icon>
</span>
<span
v-if="scope.row.groupName"
@@ -601,7 +599,7 @@
v-text="scope.row.avatar.name"></span>
&nbsp;
<span v-if="!scope.row.inCache" style="color: #aaa"
><i class="el-icon-download"></i>&nbsp;</span
><el-icon><Download /></el-icon>&nbsp;</span
>
<span
v-if="scope.row.avatar.releaseStatus === 'public'"
@@ -619,10 +617,11 @@
<el-tooltip placement="right">
<template #content>
<img
v-lazy="scope.row.imageUrl"
:src="scope.row.imageUrl"
class="friends-list-avatar"
style="height: 500px; cursor: pointer"
@click="showFullscreenImageDialog(scope.row.imageUrl)" />
@click="showFullscreenImageDialog(scope.row.imageUrl)"
loading="lazy" />
</template>
<span v-text="scope.row.fileId"></span>
</el-tooltip>
@@ -636,28 +635,31 @@
<span v-else v-text="scope.row.text"></span>
</template>
</el-table-column>
</data-tables>
</DataTable>
</el-tab-pane>
</el-tabs>
</div>
<div class="current-instance-table">
<data-tables
<DataTable
v-bind="currentInstanceWorld.ref.id ? currentInstanceUserList : {}"
style="margin-top: 10px; cursor: pointer"
@row-click="selectCurrentInstanceRow">
<el-table-column :label="t('table.playerList.avatar')" width="70" prop="photo">
<template #default="scope">
<template v-if="userImage(scope.row.ref)">
<el-popover placement="right" height="500px" trigger="hover">
<el-popover placement="right" :width="500" trigger="hover">
<template #reference>
<img
:src="userImage(scope.row.ref)"
class="friends-list-avatar"
loading="lazy" />
</template>
<img
slot="reference"
v-lazy="userImage(scope.row.ref)"
class="friends-list-avatar" />
<img
v-lazy="userImageFull(scope.row.ref)"
class="friends-list-avatar"
style="height: 500px; cursor: pointer"
@click="showFullscreenImageDialog(userImageFull(scope.row.ref))" />
:src="userImageFull(scope.row.ref)"
:class="['friends-list-avatar', 'x-popover-image']"
style="cursor: pointer"
@click="showFullscreenImageDialog(userImageFull(scope.row.ref))"
loading="lazy" />
</el-popover>
</template>
</template>
@@ -678,8 +680,8 @@
<el-tooltip placement="left" content="Unblock chatbox messages">
<el-button
type="text"
icon="el-icon-turn-off-microphone"
size="mini"
:icon="Mute"
size="small"
style="color: red; margin-right: 5px"
@click.stop="deleteChatboxUserBlacklist(scope.row.ref.id)"></el-button>
</el-tooltip>
@@ -688,8 +690,8 @@
<el-tooltip placement="left" content="Block chatbox messages">
<el-button
type="text"
icon="el-icon-microphone"
size="mini"
:icon="Microphone"
size="small"
style="margin-right: 5px"
@click.stop="addChatboxUserBlacklist(scope.row.ref)"></el-button>
</el-tooltip>
@@ -700,7 +702,7 @@
<el-table-column
:label="t('table.playerList.icon')"
prop="isMaster"
width="80"
width="90"
align="center"
sortable
:sort-method="sortInstanceIcon">
@@ -708,34 +710,35 @@
<el-tooltip v-if="scope.row.isMaster" placement="left" content="Instance Master">
<span>👑</span>
</el-tooltip>
<el-tooltip v-if="scope.row.isModerator" placement="left" content="Moderator">
<el-tooltip v-else-if="scope.row.isModerator" placement="left" content="Moderator">
<span>⚔️</span>
</el-tooltip>
<el-tooltip v-if="scope.row.isFriend" placement="left" content="Friend">
<el-tooltip v-else-if="scope.row.isFriend" placement="left" content="Friend">
<span>💚</span>
</el-tooltip>
<el-tooltip v-if="scope.row.isBlocked" placement="left" content="Blocked">
<i class="el-icon el-icon-circle-close" style="color: red"></i>
<el-tooltip v-else-if="scope.row.isBlocked" placement="left" content="Blocked">
<el-icon style="color: red"><CircleClose /></el-icon>
</el-tooltip>
<el-tooltip v-if="scope.row.isMuted" placement="left" content="Muted">
<i class="el-icon el-icon-turn-off-microphone" style="color: orange"></i>
<el-tooltip v-else-if="scope.row.isMuted" placement="left" content="Muted">
<el-icon style="color: orange"><Mute /></el-icon>
</el-tooltip>
<el-tooltip
v-if="scope.row.isAvatarInteractionDisabled"
v-else-if="scope.row.isAvatarInteractionDisabled"
placement="left"
content="Avatar Interaction Disabled
">
<i class="el-icon el-icon-thumb" style="color: orange"></i>
<el-icon style="color: orange"><Pointer /></el-icon>
</el-tooltip>
<el-tooltip v-if="scope.row.isChatBoxMuted" placement="left" content="Chatbox Muted">
<i class="el-icon el-icon-chat-line-round" style="color: orange"></i>
<el-tooltip v-else-if="scope.row.isChatBoxMuted" placement="left" content="Chatbox Muted">
<el-icon style="color: orange"><ChatLineRound /></el-icon>
</el-tooltip>
<el-tooltip v-if="scope.row.timeoutTime" placement="left" content="Timeout">
<el-tooltip v-else-if="scope.row.timeoutTime" placement="left" content="Timeout">
<span style="color: red">🔴{{ scope.row.timeoutTime }}s</span>
</el-tooltip>
<span v-else></span>
</template>
</el-table-column>
<el-table-column :label="t('table.playerList.platform')" prop="inVRMode" width="80">
<el-table-column :label="t('table.playerList.platform')" prop="inVRMode" width="90">
<template #default="scope">
<template v-if="scope.row.ref.$platform">
<span v-if="scope.row.ref.$platform === 'standalonewindows'" style="color: #409eff"
@@ -762,7 +765,7 @@
:label="t('table.playerList.displayName')"
min-width="140"
prop="displayName"
sortable="custom">
:sortable="true">
<template #default="scope">
<span
v-if="randomUserColours"
@@ -789,7 +792,7 @@
:label="t('table.playerList.rank')"
width="110"
prop="$trustSortNum"
sortable="custom">
:sortable="true">
<template #default="scope">
<span
class="name"
@@ -813,7 +816,9 @@
<el-table-column :label="t('table.playerList.bioLink')" width="100" prop="ref.bioLinks">
<template #default="scope">
<div style="display: flex; align-items: center">
<el-tooltip v-for="(link, index) in scope.row.ref.bioLinks" v-if="link" :key="index">
<el-tooltip
v-for="(link, index) in scope.row.ref.bioLinks?.filter(Boolean)"
:key="index">
<template #content>
<span v-text="link"></span>
</template>
@@ -826,7 +831,8 @@
margin-right: 5px;
cursor: pointer;
"
@click.stop="openExternalLink(link)" />
@click.stop="openExternalLink(link)"
loading="lazy" />
</el-tooltip>
</div>
</template>
@@ -836,7 +842,7 @@
<span v-text="scope.row.ref.note"></span>
</template>
</el-table-column>
</data-tables>
</DataTable>
</div>
</div>
<ChatboxBlacklistDialog
@@ -846,9 +852,19 @@
</template>
<script setup>
import {
Mute,
Microphone,
Download,
ArrowRight,
HomeFilled,
CircleClose,
Pointer,
ChatLineRound
} from '@element-plus/icons-vue';
import { storeToRefs } from 'pinia';
import { ref } from 'vue';
import { useI18n } from 'vue-i18n-bridge';
import { useI18n } from 'vue-i18n';
import {
languageClass,
getFaviconUrl,
@@ -873,9 +889,9 @@
useVrcxStore
} from '../../stores';
import ChatboxBlacklistDialog from './dialogs/ChatboxBlacklistDialog.vue';
import { photonEventTableTypeFilterList } from '../../shared/constants';
import { photonEventTableTypeFilterList } from '../../shared/constants/photon';
const { hideTooltips, randomUserColours } = storeToRefs(useAppearanceSettingsStore());
const { randomUserColours } = storeToRefs(useAppearanceSettingsStore());
const {
photonLoggingEnabled,
photonEventIcon,