feat: preview multiple images

This commit is contained in:
Anthony Fu 2022-11-30 11:27:19 +08:00
parent 568a333d7c
commit cf7cd1fd6c
7 changed files with 92 additions and 23 deletions

View file

@ -45,11 +45,21 @@ function getFieldNameIcon(fieldName: string) {
}
function previewHeader() {
openImagePreviewDialog({ src: account.header, alt: `${account.username}'s profile header` })
openMediaPreview([{
id: `${account.acct}:header`,
type: 'image',
previewUrl: account.header,
description: `${account.username}'s profile header`,
}])
}
function previewAvatar() {
openImagePreviewDialog({ src: account.avatar, alt: account.username })
openMediaPreview([{
id: `${account.acct}:avatar`,
type: 'image',
previewUrl: account.avatar,
description: `${account.username}'s avatar`,
}])
}
watchEffect(() => {