feat: add locked for account

This commit is contained in:
三咲智子 Kevin Deng 2023-07-03 01:55:18 +08:00
parent 338e203b6f
commit d5856b83c6
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
6 changed files with 45 additions and 8 deletions

View file

@ -165,8 +165,9 @@ const personalNoteMaxLength = 2000
</div>
</div>
<div flex="~ col gap1" pt2>
<div flex justify-between>
<div flex gap2 items-center>
<AccountDisplayName :account="account" font-bold sm:text-2xl text-xl />
<AccountLockIndicator v-if="account.locked" show-label />
<AccountBotIndicator v-if="account.bot" show-label />
</div>
<AccountHandle :account="account" overflow-unset line-clamp-unset />

View file

@ -23,6 +23,7 @@ const { account, as = 'div' } = defineProps<{
<div flex="~ col" shrink pt-1 h-full overflow-hidden justify-center leading-none select-none>
<div flex="~" gap-2>
<AccountDisplayName :account="account" font-bold line-clamp-1 ws-pre-wrap break-all text-lg />
<AccountLockIndicator v-if="account.bot" text-xs />
<AccountBotIndicator v-if="account.bot" text-xs />
</div>
<AccountHandle :account="account" text-secondary-light />

View file

@ -0,0 +1,21 @@
<script setup lang="ts">
defineProps<{
showLabel?: boolean
}>()
</script>
<template>
<div
flex="~ gap1" items-center
:class="{ 'border border-base rounded-md px-1': showLabel }"
text-secondary-light
>
<slot name="prepend" />
<CommonTooltip no-auto-focus content="Lock" :disabled="showLabel">
<div i-ri:lock-line />
</CommonTooltip>
<div v-if="showLabel">
Lock
</div>
</div>
</template>