feat(nginx): configure client max body size and update timeouts for API proxy
feat(clipboard): implement copyTextToClipboard utility function feat(desktop): add upload timeout for desktop client release API feat(k3s): add nginx config and update kustomization for ops-web
This commit is contained in:
@@ -357,6 +357,7 @@ import {
|
||||
type DesktopReleasePlatform,
|
||||
type DesktopReleaseSource,
|
||||
} from '@/lib/desktop-client-releases'
|
||||
import { copyTextToClipboard } from '@/lib/clipboard'
|
||||
import { showOpsError } from '@/lib/errors'
|
||||
|
||||
const enabledOptions = [
|
||||
@@ -763,19 +764,31 @@ async function deleteRelease(row: DesktopClientRelease) {
|
||||
}
|
||||
|
||||
async function copyDownloadURL(row: DesktopClientRelease) {
|
||||
let downloadURL = ''
|
||||
try {
|
||||
const result = await desktopClientReleaseApi.resolveDownloadURL(row.id)
|
||||
await navigator.clipboard.writeText(result.download_url)
|
||||
message.success('下载地址已复制')
|
||||
downloadURL = result.download_url
|
||||
} catch (error) {
|
||||
showOpsError(error)
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
await copyTextToClipboard(downloadURL)
|
||||
message.success('下载地址已复制')
|
||||
} catch {
|
||||
message.error('复制失败,请在接口返回中手动复制下载地址')
|
||||
}
|
||||
}
|
||||
|
||||
async function copyFormDownloadURL() {
|
||||
if (form.download_url) {
|
||||
await navigator.clipboard.writeText(form.download_url)
|
||||
message.success('下载地址已复制')
|
||||
try {
|
||||
await copyTextToClipboard(form.download_url)
|
||||
message.success('下载地址已复制')
|
||||
} catch {
|
||||
message.error('复制失败,请手动复制下载地址')
|
||||
}
|
||||
return
|
||||
}
|
||||
if (!editingRow.value?.id) return
|
||||
|
||||
Reference in New Issue
Block a user