This commit is contained in:
@@ -16,6 +16,7 @@ import { computed, ref, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import { publishTasksApi, tenantAccountsApi } from '@/lib/api'
|
||||
import { copyTextToClipboard } from '@/lib/clipboard'
|
||||
import { formatDateTime } from '@/lib/display'
|
||||
import { formatError } from '@/lib/errors'
|
||||
import { resolvePlatformLogoUrl } from '@/lib/publish-account-cards'
|
||||
@@ -473,23 +474,6 @@ function rowClassName(record: PublishTaskItem): string {
|
||||
return isPendingStatus(record.status) ? 'publish-management-row--pending' : ''
|
||||
}
|
||||
|
||||
async function copyTextToClipboard(text: string): Promise<void> {
|
||||
if (navigator.clipboard?.writeText) {
|
||||
await navigator.clipboard.writeText(text)
|
||||
return
|
||||
}
|
||||
|
||||
const textarea = document.createElement('textarea')
|
||||
textarea.value = text
|
||||
textarea.setAttribute('readonly', 'true')
|
||||
textarea.style.position = 'fixed'
|
||||
textarea.style.left = '-9999px'
|
||||
document.body.appendChild(textarea)
|
||||
textarea.select()
|
||||
document.execCommand('copy')
|
||||
document.body.removeChild(textarea)
|
||||
}
|
||||
|
||||
async function copyErrorMessage(record: PublishTaskItem): Promise<void> {
|
||||
if (!record.errorMessage) {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user