feat(publish): support visibility

This commit is contained in:
三咲智子 2022-11-24 17:15:58 +08:00
parent dbf4362d8b
commit ad3d5efb11
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
5 changed files with 86 additions and 4 deletions

View file

@ -1,6 +1,34 @@
import type { Ref } from 'vue'
import type { Account, Relationship, Status } from 'masto'
// @unocss-include
export const STATUS_VISIBILITIES = [
{
value: 'public',
label: 'Public',
icon: 'i-ri:global-line',
description: 'Visible for all',
},
{
value: 'unlisted',
label: 'Unlisted',
icon: 'i-ri:lock-unlock-line',
description: 'Visible for all, but opted-out of discovery features',
},
{
value: 'private',
label: 'Followers only',
icon: 'i-ri:lock-line',
description: 'Visible for followers only',
},
{
value: 'direct',
label: 'Mentioned people only',
icon: 'i-ri:at-line',
description: 'Visible for mentioned users only',
},
] as const
export function getDisplayName(account: Account) {
return account.displayName || account.username
}