Browse Source

fix: 调整病毒扫描设置界面样式 (#5713)

pull/5721/head
ssongliu 5 months ago committed by GitHub
parent
commit
047d49e0eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      frontend/src/api/modules/toolbox.ts
  2. 1
      frontend/src/lang/modules/en.ts
  3. 1
      frontend/src/lang/modules/tw.ts
  4. 1
      frontend/src/lang/modules/zh.ts
  5. 2
      frontend/src/views/toolbox/clam/index.vue
  6. 19
      frontend/src/views/toolbox/clam/setting/index.vue

2
frontend/src/api/modules/toolbox.ts

@ -121,7 +121,7 @@ export const searchClamFile = (name: string, tail: string) => {
return http.post<string>(`/toolbox/clam/file/search`, { name: name, tail: tail });
};
export const updateClamFile = (name: string, file: string) => {
return http.post(`/toolbox/clam/file/update`, { name: name, file: file });
return http.post(`/toolbox/clam/file/update`, { name: name, file: file }, TimeoutEnum.T_60S);
};
export const searchClamBaseInfo = () => {
return http.post<Toolbox.ClamBaseInfo>(`/toolbox/clam/base`);

1
frontend/src/lang/modules/en.ts

@ -1099,6 +1099,7 @@ const message = {
infectedDir: 'Infected Directory',
scanDate: 'Scan Date',
scanResult: 'Scan log tail',
tail: 'Lines',
scanTime: 'Time Taken',
infectedFiles: 'Infected Files',
log: 'Details',

1
frontend/src/lang/modules/tw.ts

@ -1040,6 +1040,7 @@ const message = {
infectedDir: '隔離目錄',
scanDate: '掃描時間',
scanResult: '掃描報告條數',
tail: '日誌顯示行數',
scanTime: '耗時',
infectedFiles: '感染文件數',
log: '詳情',

1
frontend/src/lang/modules/zh.ts

@ -1042,6 +1042,7 @@ const message = {
infectedDir: '隔离目录',
scanDate: '扫描时间',
scanResult: '扫描报告条数',
tail: '日志显示行数',
scanTime: '耗时',
infectedFiles: '感染文件数',
log: '详情',

2
frontend/src/views/toolbox/clam/index.vue

@ -82,12 +82,14 @@
>
<template #default="{ row }">
<el-button
v-if="row.infectedStrategy === 'copy' || row.infectedStrategy === 'move'"
link
type="primary"
@click="toFolder(row.infectedDir + '/1panel-infected/' + row.name)"
>
{{ row.infectedDir + '/1panel-infected/' + row.name }}
</el-button>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column

19
frontend/src/views/toolbox/clam/setting/index.vue

@ -29,8 +29,13 @@
<template #main>
<div>
<el-select style="width: 20%" @change="search" v-model.number="tail">
<template #prefix>{{ $t('toolbox.clam.scanResult') }}</template>
<el-select
v-if="!canUpdate()"
style="width: 20%"
@change="search(activeName)"
v-model.number="tail"
>
<template #prefix>{{ $t('toolbox.clam.tail') }}</template>
<el-option :value="0" :label="$t('commons.table.all')" />
<el-option :value="10" :label="10" />
<el-option :value="100" :label="100" />
@ -51,9 +56,9 @@
@ready="handleReady"
:extensions="extensions"
v-model="content"
:disabled="canUpdate()"
:disabled="!canUpdate()"
/>
<el-button type="primary" style="margin-top: 10px" v-if="!canUpdate()" @click="onSave">
<el-button type="primary" style="margin-top: 10px" v-if="canUpdate()" @click="onSave">
{{ $t('commons.button.save') }}
</el-button>
</div>
@ -89,15 +94,15 @@ const content = ref();
const confirmRef = ref();
const loadHeight = () => {
let height = globalStore.openMenuTabs ? '425px' : '395px';
if (canUpdate()) {
let height = globalStore.openMenuTabs ? '405px' : '375px';
if (!canUpdate()) {
height = globalStore.openMenuTabs ? '383px' : '353px';
}
return height;
};
const canUpdate = () => {
return activeName.value.indexOf('-log') !== -1;
return activeName.value.indexOf('-log') === -1;
};
const search = async (itemName: string) => {

Loading…
Cancel
Save