diff --git a/browser_tests/tests/dialog.spec.ts b/browser_tests/tests/dialog.spec.ts index 9ccd4cd67..269df3387 100644 --- a/browser_tests/tests/dialog.spec.ts +++ b/browser_tests/tests/dialog.spec.ts @@ -88,6 +88,10 @@ test.describe('Missing models warning', () => { const downloadButton = missingModelsWarning.getByLabel('Download') await expect(downloadButton).toBeVisible() + + // Check that the copy URL button is also visible for Desktop environment + const copyUrlButton = missingModelsWarning.getByLabel('Copy URL') + await expect(copyUrlButton).toBeVisible() }) test('Should display a warning when missing models are found in node properties', async ({ @@ -101,6 +105,10 @@ test.describe('Missing models warning', () => { const downloadButton = missingModelsWarning.getByLabel('Download') await expect(downloadButton).toBeVisible() + + // Check that the copy URL button is also visible for Desktop environment + const copyUrlButton = missingModelsWarning.getByLabel('Copy URL') + await expect(copyUrlButton).toBeVisible() }) test('Should not display a warning when no missing models are found', async ({ diff --git a/src/components/common/ElectronFileDownload.vue b/src/components/common/ElectronFileDownload.vue index e09dce0d0..6a8ab11cb 100644 --- a/src/components/common/ElectronFileDownload.vue +++ b/src/components/common/ElectronFileDownload.vue @@ -12,7 +12,7 @@ -
+
(null) const fileSize = computed(() => download.fileSize.value ? formatSize(download.fileSize.value) : '?' ) +const { copyToClipboard } = useCopyToClipboard() const electronDownloadStore = useElectronDownloadStore() // @ts-expect-error fixme ts strict error const [savePath, filename] = props.label.split('/') @@ -126,4 +135,8 @@ const triggerDownload = async () => { const triggerCancelDownload = () => electronDownloadStore.cancel(props.url) const triggerPauseDownload = () => electronDownloadStore.pause(props.url) const triggerResumeDownload = () => electronDownloadStore.resume(props.url) + +const copyURL = async () => { + await copyToClipboard(props.url) +}