Browse Source

fix issue

tags/v1.22.11.2^2
zhoupzh 3 years ago
parent
commit
ff7df68b61
9 changed files with 104 additions and 19356 deletions
  1. +22
    -19346
      package-lock.json
  2. +1
    -0
      package.json
  3. +1
    -1
      templates/custom/max_log.tmpl
  4. +1
    -0
      templates/repo/modelsafety/show.tmpl
  5. +40
    -1
      templates/repo/view_file.tmpl
  6. +6
    -6
      web_src/js/components/images/Images.vue
  7. +2
    -2
      web_src/js/components/images/adminImages.vue
  8. +30
    -0
      web_src/js/index.js
  9. +1
    -0
      web_src/less/index.less

+ 22
- 19346
package-lock.json
File diff suppressed because it is too large
View File


+ 1
- 0
package.json View File

@@ -10,6 +10,7 @@
"@babel/plugin-transform-runtime": "7.9.6",
"@babel/preset-env": "7.9.6",
"@babel/runtime": "7.9.6",
"@fancyapps/ui": "4.0.31",
"@primer/octicons": "9.6.0",
"axios": "0.21.1",
"babel-loader": "8.1.0",


+ 1
- 1
templates/custom/max_log.tmpl View File

@@ -29,7 +29,7 @@
<div class="ui message message-max{{.VersionName}}" style="display: none;">
<div id="header"></div>
</div>
<div class="log-scroll-max" id="log-max{{.VersionName}}" data-version="{{.VersionName}}" style="overflow: auto;max-height: 100%;">
<div class="log-scroll-max" id="log-max{{.VersionName}}" data-version="{{.VersionName}}" style="overflow: auto;max-height: 100%;height: 100%">
<div class="ui inverted active dimmer">
<div class="ui loader"></div>
</div>


+ 1
- 0
templates/repo/modelsafety/show.tmpl View File

@@ -863,6 +863,7 @@
}
var oLogHref = $('#-log-down').attr('href');
$('#-log-down').attr('href', oLogHref + `/${res.ID}/download_log_file`);
$('.full-log-dialog').attr('data-href', oLogHref + `/${res.ID}/download_log_file`);
if (res.ResultJson) {
try {
resultData = JSON.parse(res.ResultJson);


+ 40
- 1
templates/repo/view_file.tmpl View File

@@ -1,4 +1,43 @@
<div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content">
<style>
img {
cursor: zoom-in;
}

.fancybox__container {
--fancybox-bg: rgba(193, 201, 210, 0.7);
}

.fancybox-zoomOut {
animation: 0.2s ease-in-out fancybox-zoomOut both;
}

.fancybox-zoomIn {
animation: 0.25s ease-in-out fancybox-zoomIn both;
}

@keyframes fancybox-zoomIn {
from {
opacity: 0;
transform: scale3d(0.8, 0.8, 0.8);
}

100% {
opacity: 1;
}
}

@keyframes fancybox-zoomOut {
from {
opacity: 1;
}

to {
opacity: 0;
transform: scale3d(0.8, 0.8, 0.8);
}
}
</style>
<div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content gallery">
<h4 class="file-header ui top attached header">
<div class="file-header-left">
{{if .ReadmeInList}}


+ 6
- 6
web_src/js/components/images/Images.vue View File

@@ -120,13 +120,13 @@
</template>
</el-table-column>
<el-table-column
prop="createdUnix"
prop="updatedUnix"
label="创建时间"
align="center"
min-width="14%"
>
<template slot-scope="scope">
{{ scope.row.createdUnix | transformTimestamp }}
{{ scope.row.updatedUnix | transformTimestamp }}
</template>
</el-table-column>
<el-table-column align="center" min-width="21%" label="操作">
@@ -369,13 +369,13 @@
</template>
</el-table-column>
<el-table-column
prop="createdUnix"
prop="updatedUnix"
label="创建时间"
align="center"
min-width="14%"
>
<template slot-scope="scope">
{{ scope.row.createdUnix | transformTimestamp }}
{{ scope.row.updatedUnix | transformTimestamp }}
</template>
</el-table-column>
<el-table-column align="center" min-width="21%" label="操作">
@@ -595,13 +595,13 @@
</template>
</el-table-column>
<el-table-column
prop="createdUnix"
prop="updatedUnix"
label="创建时间"
align="center"
min-width="14%"
>
<template slot-scope="scope">
{{ scope.row.createdUnix | transformTimestamp }}
{{ scope.row.updatedUnix | transformTimestamp }}
</template>
</el-table-column>
<el-table-column align="center" min-width="21%" label="操作">


+ 2
- 2
web_src/js/components/images/adminImages.vue View File

@@ -75,9 +75,9 @@
</a>
</template>
</el-table-column>
<el-table-column prop="createdUnix" label="创建时间" align="center" min-width="13%">
<el-table-column prop="updatedUnix" label="创建时间" align="center" min-width="13%">
<template slot-scope="scope">
{{scope.row.createdUnix | transformTimestamp}}
{{scope.row.updatedUnix | transformTimestamp}}
</template>
</el-table-column>
<el-table-column align="center" min-width="23%" label="操作">


+ 30
- 0
web_src/js/index.js View File

@@ -53,6 +53,8 @@ import { Message } from "element-ui";

import { i18nVue } from "./features/i18nVue.js";
import './features/ad.js';
import { Fancybox } from "@fancyapps/ui";


Vue.use(ElementUI);
Vue.prototype.$axios = axios;
@@ -5177,3 +5179,31 @@ function initChartsNpu() {
}

initChartsNpu();

Fancybox.bind('.gallery img', {
// Do not create a gallery
groupAttr: null,

// Do not hide page scrollbars
hideScrollbar: false,

// Disable drag to close guesture
dragToClose: false,

// Hide close button
closeButton: false,

// Disable toolbar
Toolbar: false,

// Disable zoom animation; close on click and wheel events
Image: {
zoom: false,
click: "close",
wheel: "close",
},

// Custom animations
showClass: "fancybox-zoomIn",
hideClass: "fancybox-zoomOut",
});

+ 1
- 0
web_src/less/index.less View File

@@ -18,3 +18,4 @@
@import "_explore";
@import "_review";
@import "openi";
@import "@fancyapps/ui/dist/fancybox.css";

Loading…
Cancel
Save