Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix the issue of pagination errors in the backup list #7673

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion frontend/src/components/backup/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ const opRef = ref();

const data = ref();
const paginationConfig = reactive({
cacheSizeKey: 'backup-page-size',
currentPage: 1,
pageSize: 10,
total: 0,
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/upload/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
import { reactive, ref } from 'vue';
import { computeSize } from '@/utils/util';
import i18n from '@/lang';
import { UploadFile, UploadFiles, UploadInstance, genFileId } from 'element-plus';
import { UploadFile, UploadFiles, UploadInstance, UploadProps, UploadRawFile, genFileId } from 'element-plus';
import { File } from '@/api/interface/file';
import DrawerHeader from '@/components/drawer-header/index.vue';
import { BatchDeleteFile, CheckFile, ChunkUploadFileData, GetUploadList } from '@/api/modules/files';
Expand All @@ -156,7 +156,6 @@ const currentRow = ref();
const data = ref();
const title = ref();
const paginationConfig = reactive({
cacheSizeKey: 'upload-page-size',
currentPage: 1,
pageSize: 10,
total: 0,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to the code seem mostly correct, but there is a change regarding imports and types. The UploadProps, UploadRawFile types have been added to the import. These likely provide additional functionality such as handling file properties directly within the Vue component.

No other significant irregularities, potential issues, or optimizations were noted in this particular code snippet based on my analysis of its content.

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lang/modules/tw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ const message = {
perDayHelper: '每日 {0}:{1} 執行',
perHourHelper: '每小時 {0}分 執行',
perNDayHelper: '每 {0} 日 {1}:{2} 執行',
perNHourHelper: '每 {0}小時 {1} 執行',
perNHourHelper: '每 {0}小時 {1} 執行',
perNMinuteHelper: '每 {0}分 執行',
perNSecondHelper: '每 {0}秒 執行',
perMonth: '每月',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code difference you provided involves updating a message template for scheduling options. Specifically, the "每 {0} 小時 {1}" (per hour) message has been changed to "每 {0} 小時 {1} 分" (every X hours Y minutes), which is more accurate and natural.

Suggestion: Remove the extra space after "{1}" in the original line, resulting in perNHourHelper: '每 {0}小時{1} 執行'.

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lang/modules/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ const message = {
perDayHelper: '每日 {0}:{1} 执行',
perHourHelper: '每小时 {0}分 执行',
perNDayHelper: '每 {0} 日 {1}:{2} 执行',
perNHourHelper: '每 {0}小时 {1} 执行',
perNHourHelper: '每 {0}小时 {1} 执行',
perNMinuteHelper: '每 {0}分 执行',
perNSecondHelper: '每 {0}秒 执行',
perMonth: '每月',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be an incorrect format for the "perNHourHelper" string. It appears that the current pattern includes minutes (e.g., "每 5小时 30分 执行"), but it might not match expected behavior if hours and minutes were intended separately.

To correct this, you could simplify the string patterns where necessary:

- perNHourHelper: '每 {0}小时 {1} 分执行',
+ perNHourHelper: '每 {0} 小时{1}分钟执行', // Simplify to just hours and minutes

This change ensures consistency between different time units by providing a more straightforward representation of the schedule format.

Expand Down
1 change: 0 additions & 1 deletion frontend/src/views/cronjob/backup/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ const loading = ref();

const data = ref();
const paginationConfig = reactive({
cacheSizeKey: 'backup-cronjob-page-size',
currentPage: 1,
pageSize: 10,
total: 0,
Expand Down
Loading