mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
ui: fix files link & title (#773)
This commit is contained in:
1 parent
b540412382
commit
64c858cdf7
2 files changed
+4
-1
No files matched your search
@@ -376,6 +376,7 @@ homework_detail_problem_submit: 递交作业题目
|
||||
homework_detail_problem: 题目详情
|
||||
homework_detail: 作业详情
|
||||
homework_edit: 编辑作业
|
||||
homework_files: 作业文件
|
||||
homework_main: 作业
|
||||
homework_scoreboard: 作业成绩表
|
||||
homework_status: 作业成绩表
|
||||
@@ -816,6 +817,7 @@ Training requirement is not satisfied.: 不满足训练条件。
|
||||
training_create: 创建训练
|
||||
training_detail: 训练详情
|
||||
training_edit: 编辑训练
|
||||
training_files: 训练文件
|
||||
training_main: 训练
|
||||
Training: 训练
|
||||
Trainings per page: 每页展示的训练数量
|
||||
|
||||
@@ -46,7 +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('contest/.*/file')
|
||||
const url = !(window.location.href.endsWith('file') || window.location.href.endsWith('files'))
|
||||
|| window.location.href.match('homework/.*/file') || window.location.href.match('training/.*/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!`)));
|
||||
|
||||
Reference in new issue
Block a user