diff --git a/app/src/pages/UploadPage.vue b/app/src/pages/UploadPage.vue index d12bc6a..e09c293 100644 --- a/app/src/pages/UploadPage.vue +++ b/app/src/pages/UploadPage.vue @@ -199,7 +199,9 @@ const expiryText = computed(() => { }); function copyAll() { const r = store.result; - const lines = [t('shareTitle', brand.name), `${ t('shareLink') }: ${ r.link }`]; + // one file: its name, several: "first name and N more" + const fileText = r.names.length > 1 ? t('fileNameMore', r.names[0], r.names.length - 1) : r.names[0]; + const lines = [t('shareTitle', brand.name), `${ t('shareFiles') }: ${ fileText }`, `${ t('shareLink') }: ${ r.link }`]; if (r.password) lines.push(`${ t('sharePassword') }: ${ r.password }`); lines.push(`${ t('shareExpires') }: ${ expiryText.value }`); copyText(lines.join('\n'), r.password ? t('linkAndPasswordCopied') : t('linkCopied')); diff --git a/app/src/stores/upload.js b/app/src/stores/upload.js index 55ed4c5..80eb474 100644 --- a/app/src/stores/upload.js +++ b/app/src/stores/upload.js @@ -299,6 +299,7 @@ export const useUpload = defineStore('upload', { const link = new URL(this.sid, document.baseURI).href; this.result = { link, + names: this.files.map(f => f.name), password: this.password.trim(), bypass: this.hasPassword && this.bypass && this.canBypass, retention, diff --git a/lang/en.js b/lang/en.js index 55fb771..0ecbc89 100644 --- a/lang/en.js +++ b/lang/en.js @@ -74,6 +74,8 @@ module.exports = { uploadCompletedHint: "Recipients can download the files with this link until it expires.", copyLinkAndPassword: "Copy link and password", shareTitle: "{0} file share", + shareFiles: "Files", + fileNameMore: "{0} and {1} more", shareLink: "Download link", sharePassword: "Password", shareExpires: "Expires", diff --git a/lang/ko.js b/lang/ko.js index 1ea18a7..c3f6049 100644 --- a/lang/ko.js +++ b/lang/ko.js @@ -74,6 +74,8 @@ module.exports = { uploadCompletedHint: "받는 사람은 만료 전까지 이 링크로 파일을 내려받을 수 있습니다.", copyLinkAndPassword: "링크와 비밀번호 복사", shareTitle: "{0} 파일 공유", + shareFiles: "파일", + fileNameMore: "{0} 외 {1}건", shareLink: "다운로드 링크", sharePassword: "비밀번호", shareExpires: "만료",