feat(file-browser): add context-aware copy submenu (#517)

* feat(file-browser): add context-aware copy submenu

* refactor(file-browser): address code review feedback for copy submenu

* fix(webui): align submenu trigger text and widen file context menu

* test(e2e): guard clipboard permissions in copy-menu spec for cross-browser support
This commit is contained in:
Yiling-J
2026-11-05 09:57:34 +08:00
committed by GitHub
parent 2ecbd49d18
commit 0dc0bbeb03
30 changed files with 2285 additions and 106 deletions
+9
View File
@@ -360,6 +360,7 @@ export interface S3Service {
) => Promise<{ url: string }>
abortMultipartUpload: (bucket: string, key: string, uploadId: string) => Promise<void>
resolveInput: (bucket: string, key: string) => Promise<string>
getStoragePath: (bucket: string, key: string) => string
}
export class S3StorageService implements S3Service {
@@ -760,6 +761,10 @@ export class S3StorageService implements S3Service {
async resolveInput(bucket: string, key: string): Promise<string> {
return this.presign(bucket, key, 'GET', false, undefined, true)
}
getStoragePath(bucket: string, key: string): string {
return `s3://${bucket}/${key}`
}
}
export class LocalStorageService implements S3Service {
@@ -1049,6 +1054,10 @@ export class LocalStorageService implements S3Service {
}
return this.presign(bucket, key, 'GET')
}
getStoragePath(bucket: string, key: string): string {
return this.getFilePath(bucket, key)
}
}
export function getStorageBackend(): 's3' | 'local' {