improve user dialog ui

This commit is contained in:
pa
2025-10-30 15:04:15 +09:00
committed by Natsumi
parent 0fdcd6d0b2
commit 6de8d7467e
6 changed files with 203 additions and 147 deletions

View File

@@ -1,13 +1,13 @@
<template>
<div @click="confirm" class="avatar-info">
<span style="margin-right: 5px">{{ avatarName }}</span>
<span v-if="avatarType" :class="color" style="margin-right: 5px">{{ avatarType }}</span>
<span v-if="avatarType" :class="color" style="margin-right: 5px"><i :class="avatarTypeIcons" /></span>
<span v-if="avatarTags" style="color: #909399; font-family: monospace; font-size: 12px">{{ avatarTags }}</span>
</div>
</template>
<script setup>
import { ref, watch } from 'vue';
import { computed, ref, watch } from 'vue';
import { useAvatarStore } from '../stores';
@@ -27,6 +27,14 @@
const color = ref('');
let ownerId = '';
const avatarTypeIcons = computed(() => {
return avatarType.value === '(own)'
? 'ri-lock-line'
: avatarType.value === '(public)'
? 'ri-lock-unlock-line'
: '';
});
const parse = async () => {
ownerId = '';
avatarName.value = '';
@@ -35,7 +43,7 @@
avatarTags.value = '';
if (!props.imageurl) {
avatarName.value = '-';
avatarName.value = '';
} else if (props.hintownerid) {
avatarName.value = props.hintavatarname;
ownerId = props.hintownerid;