1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-27 22:38:11 +09:00

refactor: add bot indicator icon

This commit is contained in:
三咲智子 2023-01-07 21:53:09 +08:00
parent 6944a74653
commit bbc1580010
No known key found for this signature in database
GPG Key ID: 69992F2250DFD93E
2 changed files with 18 additions and 3 deletions

View File

@ -1,5 +1,20 @@
<script setup lang="ts">
defineProps<{
showLabel?: boolean
}>()
</script>
<template>
<div flex="~" items-center border="~ base" text-secondary-light rounded-md px-1 text-xs my-auto>
<div
flex="~ gap1" items-center
:class="{ 'border border-base rounded-md px-1': showLabel }"
text-secondary-light text-xs
>
<CommonTooltip :content="$t('account.bot')" :disabled="showLabel">
<div i-ri:robot-line />
</CommonTooltip>
<div v-if="showLabel">
{{ $t('account.bot') }}
</div>
</div>
</template>

View File

@ -76,7 +76,7 @@ const isSelf = $computed(() => currentUser.value?.account.id === account.id)
<div flex="~ col gap1">
<div flex justify-between>
<AccountDisplayName :account="account" font-bold sm:text-2xl text-xl />
<AccountBotIndicator v-if="account.bot" />
<AccountBotIndicator v-if="account.bot" show-label />
</div>
<AccountHandle :account="account" />
</div>