use cordis@4

This commit is contained in:
undefined committed 2025-02-19 05:28:12 +08:00
1 parent 085b6c9b4c
commit 9264f340cb
18 files changed
+284 -168

No files matched your search

@@ -46,8 +46,8 @@ const dialogAction = (id) => [
];
function bindCopyLink(id, src: string) {
const url = !(window.location.href.endsWith('file') || window.location.href.endsWith('files'))
|| window.location.href.match('homework/.*/file') || window.location.href.match('training/.*/file')
const url = !['file', 'files'].some((i) => window.location.href.endsWith(i))
|| ['homework', 'training'].some((i) => window.location.href.match(`${i}/.*/file`))
? `file://${src.substring(src.lastIndexOf('/') + 1)}` : src;
const clip = new Clipboard(`#copy-${id}`, { text: () => `${url}` });
clip.on('success', () => Notification.success(i18n(`${url.startsWith('file://') ? 'Reference' : 'Download'} link copied to clipboard!`)));