링크와 비밀번호 복사에 파일 이름 추가
복사되는 공유 문구에 파일 이름을 넣는다. 파일이 하나면 그 이름, 여러 개면 "첫 파일 이름 외 N건"으로 표시한다. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6019c7df95
commit
d9425fff55
@ -199,7 +199,9 @@ const expiryText = computed(() => {
|
|||||||
});
|
});
|
||||||
function copyAll() {
|
function copyAll() {
|
||||||
const r = store.result;
|
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 }`);
|
if (r.password) lines.push(`${ t('sharePassword') }: ${ r.password }`);
|
||||||
lines.push(`${ t('shareExpires') }: ${ expiryText.value }`);
|
lines.push(`${ t('shareExpires') }: ${ expiryText.value }`);
|
||||||
copyText(lines.join('\n'), r.password ? t('linkAndPasswordCopied') : t('linkCopied'));
|
copyText(lines.join('\n'), r.password ? t('linkAndPasswordCopied') : t('linkCopied'));
|
||||||
|
|||||||
@ -299,6 +299,7 @@ export const useUpload = defineStore('upload', {
|
|||||||
const link = new URL(this.sid, document.baseURI).href;
|
const link = new URL(this.sid, document.baseURI).href;
|
||||||
this.result = {
|
this.result = {
|
||||||
link,
|
link,
|
||||||
|
names: this.files.map(f => f.name),
|
||||||
password: this.password.trim(),
|
password: this.password.trim(),
|
||||||
bypass: this.hasPassword && this.bypass && this.canBypass,
|
bypass: this.hasPassword && this.bypass && this.canBypass,
|
||||||
retention,
|
retention,
|
||||||
|
|||||||
@ -74,6 +74,8 @@ module.exports = {
|
|||||||
uploadCompletedHint: "Recipients can download the files with this link until it expires.",
|
uploadCompletedHint: "Recipients can download the files with this link until it expires.",
|
||||||
copyLinkAndPassword: "Copy link and password",
|
copyLinkAndPassword: "Copy link and password",
|
||||||
shareTitle: "{0} file share",
|
shareTitle: "{0} file share",
|
||||||
|
shareFiles: "Files",
|
||||||
|
fileNameMore: "{0} and {1} more",
|
||||||
shareLink: "Download link",
|
shareLink: "Download link",
|
||||||
sharePassword: "Password",
|
sharePassword: "Password",
|
||||||
shareExpires: "Expires",
|
shareExpires: "Expires",
|
||||||
|
|||||||
@ -74,6 +74,8 @@ module.exports = {
|
|||||||
uploadCompletedHint: "받는 사람은 만료 전까지 이 링크로 파일을 내려받을 수 있습니다.",
|
uploadCompletedHint: "받는 사람은 만료 전까지 이 링크로 파일을 내려받을 수 있습니다.",
|
||||||
copyLinkAndPassword: "링크와 비밀번호 복사",
|
copyLinkAndPassword: "링크와 비밀번호 복사",
|
||||||
shareTitle: "{0} 파일 공유",
|
shareTitle: "{0} 파일 공유",
|
||||||
|
shareFiles: "파일",
|
||||||
|
fileNameMore: "{0} 외 {1}건",
|
||||||
shareLink: "다운로드 링크",
|
shareLink: "다운로드 링크",
|
||||||
sharePassword: "비밀번호",
|
sharePassword: "비밀번호",
|
||||||
shareExpires: "만료",
|
shareExpires: "만료",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user