feat(publish): support visibility
This commit is contained in:
parent
dbf4362d8b
commit
ad3d5efb11
5 changed files with 86 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import type { Attachment, CreateStatusParamsWithStatus } from 'masto'
|
||||
import { STORAGE_KEY_DRAFTS } from '~/constants'
|
||||
import type { Mutable } from '~/types/utils'
|
||||
|
||||
export type DraftMap = Record<string, {
|
||||
params: CreateStatusParamsWithStatus
|
||||
params: Mutable<CreateStatusParamsWithStatus>
|
||||
attachments: Attachment[]
|
||||
}>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue