Browse Source

#2964 调整下载结果页签提示

tags/v1.22.11.1^2
chenshihai 3 years ago
parent
commit
18daf45fee
2 changed files with 14 additions and 4 deletions
  1. +12
    -4
      web_src/js/features/cloudbrainShow.js
  2. +2
    -0
      web_src/js/features/i18nVue.js

+ 12
- 4
web_src/js/features/cloudbrainShow.js View File

@@ -296,7 +296,7 @@ export default async function initCloudrainSow() {
$(`#dir_list${version_name}`).empty();
let url = `/api/v1/repos${path}?version_name=${version_name}&parentDir=${parents}`;
$.get(url, (data) => {
if (data.StatusOK == 0) { // 成功
if (data.StatusOK == 0) { // 成功 0
if (data.Dirs) {
renderDir(path, data, version_name, downloadFlag, gpuFlag);
}
@@ -323,7 +323,7 @@ export default async function initCloudrainSow() {
gpuFlag
);
}
} else if (data.StatusOK == 1) { // 处理中
} else if (data.StatusOK == 1) { // 处理中 1
$(`#file_breadcrumb${version_name}`).empty();
$(`#dir_list${version_name}`).html(`<div style="height:200px;display:flex;justify-content:center;align-items:center;font-size:14px;color:rgb(16, 16, 16);">
<style>
@@ -337,7 +337,7 @@ export default async function initCloudrainSow() {
</div>
<span>${i18n['file_sync_ing']}</span>
</div>`);
} else if (data.StatusOK == 2) { // 失败
} else if (data.StatusOK == 2) { // 失败 2
$(`#file_breadcrumb${version_name}`).empty();
$(`#dir_list${version_name}`).html(`<div style="height:200px;display:flex;justify-content:center;align-items:center;font-size:14px;color:rgb(16, 16, 16);">
<div style="display:flex;justify-content:center;align-items:center;height:24px;width:24px;margin-right:5px;">
@@ -345,7 +345,7 @@ export default async function initCloudrainSow() {
</div>
<span>${i18n['file_sync_fail']}</span>
</div>`);
} else if (data.StatusOK == 3) { // 无文件
} else if (data.StatusOK == 3) { // 无文件 3
$(`#file_breadcrumb${version_name}`).empty();
$(`#dir_list${version_name}`).html(`<div style="height:200px;display:flex;justify-content:center;align-items:center;font-size:14px;color:rgb(16, 16, 16);">
<div style="display:flex;justify-content:center;align-items:center;height:24px;width:24px;margin-right:5px;">
@@ -353,6 +353,14 @@ export default async function initCloudrainSow() {
</div>
<span>${i18n['no_file_to_download']}</span>
</div>`);
} else if (data.StatusOK == 4) { // 任务未结束 4
$(`#file_breadcrumb${version_name}`).empty();
$(`#dir_list${version_name}`).html(`<div style="height:200px;display:flex;justify-content:center;align-items:center;font-size:14px;color:rgb(16, 16, 16);">
<div style="display:flex;justify-content:center;align-items:center;height:24px;width:24px;margin-right:5px;">
<svg xmlns="http://www.w3.org/2000/svg" class="styles__StyledSVGIconPathComponent-sc-16fsqc8-0 iKfgJk svg-icon-path-icon fill" viewBox="0 0 32 32" width="16" height="16"><defs data-reactroot=""></defs><g><path d="M16 29.333c-7.364 0-13.333-5.969-13.333-13.333s5.969-13.333 13.333-13.333 13.333 5.969 13.333 13.333-5.969 13.333-13.333 13.333zM16 26.667c5.891 0 10.667-4.776 10.667-10.667s-4.776-10.667-10.667-10.667v0c-5.891 0-10.667 4.776-10.667 10.667s4.776 10.667 10.667 10.667v0zM17.333 16h5.333v2.667h-8v-9.333h2.667v6.667z"></path></g></svg>
</div>
<span>${i18n['task_not_finished']}</span>
</div>`);
}
}).fail(function (err) {
console.log(err, version_name);


+ 2
- 0
web_src/js/features/i18nVue.js View File

@@ -104,6 +104,7 @@ export const i18nVue = {
file_sync_ing:"文件同步中,请稍侯",
file_sync_fail:"文件同步失败",
no_file_to_download:"没有文件可以下载",
task_not_finished:"任务还未结束,稍后再来看看",
},
US: {
computer_vision: "computer vision",
@@ -214,5 +215,6 @@ export const i18nVue = {
file_sync_ing:"File synchronization in progress, please wait",
file_sync_fail:"File synchronization failed",
no_file_to_download:"No files can be downloaded",
task_not_finished:"Task not finished yet, please wait",
},
};

Loading…
Cancel
Save