replace el-tag with Badge

This commit is contained in:
pa
2026-01-07 17:41:33 +09:00
committed by Natsumi
parent 02e221e307
commit f819a3f500
16 changed files with 272 additions and 414 deletions

View File

@@ -44,91 +44,60 @@
v-text="currentInstanceWorld.ref.authorName"></span>
</div>
<div style="margin-top: 5px">
<el-tag
v-if="currentInstanceWorld.ref.$isLabs"
type="primary"
effect="plain"
size="small"
style="margin-right: 5px"
>{{ t('dialog.world.tags.labs') }}</el-tag
>
<el-tag
<Badge v-if="currentInstanceWorld.ref.$isLabs" variant="outline" style="margin-right: 5px">
{{ t('dialog.world.tags.labs') }}
</Badge>
<Badge
v-else-if="currentInstanceWorld.ref.releaseStatus === 'public'"
type="success"
effect="plain"
size="small"
style="margin-right: 5px"
>{{ t('dialog.world.tags.public') }}</el-tag
>
<el-tag
variant="outline"
style="margin-right: 5px">
{{ t('dialog.world.tags.public') }}
</Badge>
<Badge
v-else-if="currentInstanceWorld.ref.releaseStatus === 'private'"
type="danger"
effect="plain"
size="small"
style="margin-right: 5px"
>{{ t('dialog.world.tags.private') }}</el-tag
>
variant="outline"
style="margin-right: 5px">
{{ t('dialog.world.tags.private') }}
</Badge>
<TooltipWrapper v-if="currentInstanceWorld.isPC" side="top" content="PC">
<el-tag
class="x-tag-platform-pc"
type="info"
effect="plain"
size="small"
style="margin-right: 5px"
<Badge class="x-tag-platform-pc" variant="outline" style="margin-right: 5px"
><i class="ri-computer-line"></i>
<span
v-if="currentInstanceWorld.bundleSizes['standalonewindows']"
:class="['x-grey', 'x-tag-platform-pc', 'x-tag-border-left']"
>{{ currentInstanceWorld.bundleSizes['standalonewindows'].fileSize }}</span
>
</el-tag>
</Badge>
</TooltipWrapper>
<TooltipWrapper v-if="currentInstanceWorld.isQuest" side="top" content="Android">
<el-tag
class="x-tag-platform-quest"
type="info"
effect="plain"
size="small"
style="margin-right: 5px"
<Badge class="x-tag-platform-quest" variant="outline" style="margin-right: 5px"
><i class="ri-android-line"></i>
<span
v-if="currentInstanceWorld.bundleSizes['android']"
:class="['x-grey', 'x-tag-platform-quest', 'x-tag-border-left']"
>{{ currentInstanceWorld.bundleSizes['android'].fileSize }}</span
>
</el-tag>
</Badge>
</TooltipWrapper>
<TooltipWrapper v-if="currentInstanceWorld.isIos" side="top" content="iOS">
<el-tag
class="x-tag-platform-ios"
type="info"
effect="plain"
size="small"
style="margin-right: 5px"
<Badge class="x-tag-platform-ios" variant="outline" style="margin-right: 5px"
><i class="ri-apple-line"></i>
<span
v-if="currentInstanceWorld.bundleSizes['ios']"
:class="['x-grey', 'x-tag-platform-ios', 'x-tag-border-left']"
>{{ currentInstanceWorld.bundleSizes['ios'].fileSize }}</span
>
</el-tag>
</Badge>
</TooltipWrapper>
<el-tag
<Badge
v-if="currentInstanceWorld.avatarScalingDisabled"
type="warning"
effect="plain"
size="small"
style="margin-right: 5px; margin-top: 5px"
>{{ t('dialog.world.tags.avatar_scaling_disabled') }}</el-tag
>
<el-tag
v-if="currentInstanceWorld.inCache"
type="info"
effect="plain"
size="small"
style="margin-right: 5px">
variant="outline"
style="margin-right: 5px; margin-top: 5px">
{{ t('dialog.world.tags.avatar_scaling_disabled') }}
</Badge>
<Badge v-if="currentInstanceWorld.inCache" variant="outline" style="margin-right: 5px">
<span>{{ currentInstanceWorld.cacheSize }} {{ t('dialog.world.tags.cache') }}</span>
</el-tag>
</Badge>
</div>
<div style="margin-top: 5px">
<LocationWorld :locationobject="currentInstanceLocation" :currentuserid="currentUser.id" />
@@ -215,6 +184,7 @@
useWorldStore
} from '../../stores';
import { commaNumber, formatDateFilter } from '../../shared/utils';
import { Badge } from '../../components/ui/badge';
import { DataTableLayout } from '../../components/ui/data-table';
import { createColumns } from './columns.jsx';
import { useDataTableScrollHeight } from '../../composables/useDataTableScrollHeight';

View File

@@ -28,16 +28,28 @@
</el-button>
<br />
<h2>{{ t('dialog.chatbox_blacklist.user_blacklist') }}</h2>
<el-tag
<Badge
v-for="user in chatboxUserBlacklist"
:key="user[0]"
type="info"
disable-transitions
style="margin-right: 5px; margin-top: 5px"
closable
@close="deleteChatboxUserBlacklist(user[0])">
variant="outline"
style="margin-right: 5px; margin-top: 5px">
<span>{{ user[1] }}</span>
</el-tag>
<button
type="button"
style="
margin-left: 6px;
border: none;
background: transparent;
padding: 0;
display: inline-flex;
align-items: center;
color: inherit;
cursor: pointer;
"
@click="deleteChatboxUserBlacklist(user[0])">
<i class="ri-close-line" style="font-size: 12px; line-height: 1"></i>
</button>
</Badge>
</div>
</el-dialog>
</template>
@@ -47,6 +59,7 @@
import { storeToRefs } from 'pinia';
import { useI18n } from 'vue-i18n';
import { Badge } from '../../../components/ui/badge';
import { usePhotonStore } from '../../../stores';
const { t } = useI18n();
@@ -64,7 +77,6 @@
const emit = defineEmits(['deleteChatboxUserBlacklist']);
function deleteChatboxUserBlacklist(userId) {
emit('deleteChatboxUserBlacklist', userId);
}