refactor: tidy masto icons

This commit is contained in:
三咲智子 2023-01-03 20:03:46 +08:00
parent ef417f3ccf
commit b14add8c83
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
6 changed files with 26 additions and 23 deletions

View file

@ -13,26 +13,6 @@ export const onMastoInit = (cb: () => unknown) => {
}, { immediate: isMastoInitialised.value })
}
// @unocss-include
export const STATUS_VISIBILITIES = [
{
value: 'public',
icon: 'i-ri:global-line',
},
{
value: 'unlisted',
icon: 'i-ri:lock-unlock-line',
},
{
value: 'private',
icon: 'i-ri:lock-line',
},
{
value: 'direct',
icon: 'i-ri:at-line',
},
] as const
export function getDisplayName(account?: Account, options?: { rich?: boolean }) {
const displayName = account?.displayName || account?.username || ''
if (options?.rich)

View file

@ -52,3 +52,22 @@ export const getAccountFieldIcon = (value: string) => {
const name = value.trim().toLowerCase()
return accountFieldIconsLowercase[name] || undefined
}
export const statusVisibilities = [
{
value: 'public',
icon: 'i-ri:global-line',
},
{
value: 'unlisted',
icon: 'i-ri:lock-unlock-line',
},
{
value: 'private',
icon: 'i-ri:lock-line',
},
{
value: 'direct',
icon: 'i-ri:at-line',
},
] as const