Skip to content

Commit dbe6208

Browse files
authored
style: Adjusted some English layouts (#7305)
1 parent 06bf2bb commit dbe6208

File tree

8 files changed

+194
-178
lines changed

8 files changed

+194
-178
lines changed

frontend/src/components/system-upgrade/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</div>
1818
<div class="flex flex-wrap items-center">
1919
<el-link :underline="false" type="primary" @click="toHalo">
20-
{{ isProductPro && globalStore.isIntl ? $t('license.pro') : $t('license.community') }}
20+
{{ $t(globalStore.isIntl || !isProductPro ? 'license.community' : 'license.pro') }}
2121
</el-link>
2222
<el-link :underline="false" class="version" type="primary" @click="copyText(version)">
2323
{{ version }}

frontend/src/lang/modules/en.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,14 @@ const message = {
295295
time: 'time(s)',
296296
core: 'core(s)',
297297
millisecond: 'millisecond(s)',
298+
secondUnit: 's',
299+
minuteUnit: 'min',
300+
hourUnit: 'h',
301+
dayUnit: 'd',
302+
weekUnit: 'w',
303+
monthUnit: 'm',
304+
yearUnit: 'y',
305+
millisecondUnit: 'ms',
298306
},
299307
operate: {
300308
down: 'Stop',
@@ -921,6 +929,7 @@ const message = {
921929
per: 'Every ',
922930
handle: '',
923931
day: 'day(s)',
932+
dayUnit: 'd',
924933
monday: 'Monday',
925934
tuesday: 'Tuesday',
926935
wednesday: 'Wednesday',

frontend/src/lang/modules/tw.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,14 @@ const message = {
289289
time: '次',
290290
core: '核',
291291
millisecond: '毫秒',
292+
secondUnit: '秒',
293+
minuteUnit: '分鐘',
294+
hourUnit: '小時',
295+
dayUnit: '天',
296+
weekUnit: '周',
297+
monthUnit: '月',
298+
yearUnit: '年',
299+
millisecondUnit: '毫秒',
292300
},
293301
operate: {
294302
down: '停止',
@@ -876,6 +884,7 @@ const message = {
876884
per: '每',
877885
handle: '執行',
878886
day: '日',
887+
dayUnit: '日',
879888
monday: '周一',
880889
tuesday: '周二',
881890
wednesday: '周三',

frontend/src/lang/modules/zh.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,14 @@ const message = {
289289
time: '次',
290290
core: '核',
291291
millisecond: '毫秒',
292+
secondUnit: '秒',
293+
minuteUnit: '分钟',
294+
hourUnit: '小时',
295+
dayUnit: '天',
296+
weekUnit: '周',
297+
monthUnit: '月',
298+
yearUnit: '年',
299+
millisecondUnit: '毫秒',
292300
},
293301
operate: {
294302
down: '停止',
@@ -877,6 +885,7 @@ const message = {
877885
per: '每',
878886
handle: '执行',
879887
day: '日',
888+
dayUnit: '日',
880889
monday: '周一',
881890
tuesday: '周二',
882891
wednesday: '周三',

frontend/src/views/cronjob/index.vue

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
</el-text>
5656
</template>
5757
</el-table-column>
58-
<el-table-column :label="$t('commons.table.status')" :min-width="80" prop="status" sortable>
58+
<el-table-column :label="$t('commons.table.status')" :min-width="110" prop="status" sortable>
5959
<template #default="{ row }">
6060
<el-button
6161
v-if="row.status === 'Enable'"
@@ -98,7 +98,7 @@
9898
</div>
9999
</template>
100100
</el-table-column>
101-
<el-table-column :label="$t('cronjob.retainCopies')" :min-width="90" prop="retainCopies">
101+
<el-table-column :label="$t('cronjob.retainCopies')" :min-width="120" prop="retainCopies">
102102
<template #default="{ row }">
103103
<el-button v-if="hasBackup(row.type)" @click="loadBackups(row)" plain size="small">
104104
{{ row.retainCopies }}{{ $t('cronjob.retainCopiesUnit') }}
@@ -111,7 +111,7 @@
111111
{{ row.lastRecordTime }}
112112
</template>
113113
</el-table-column>
114-
<el-table-column :min-width="80" :label="$t('setting.backupAccount')" prop="defaultDownload">
114+
<el-table-column :min-width="120" :label="$t('setting.backupAccount')" prop="defaultDownload">
115115
<template #default="{ row }">
116116
<span v-if="!hasBackup(row.type)">-</span>
117117
<div v-else>
@@ -150,6 +150,8 @@
150150
:buttons="buttons"
151151
:ellipsis="10"
152152
:label="$t('commons.table.operate')"
153+
:min-width="mobile ? 'auto' : 200"
154+
:fixed="mobile ? false : 'right'"
153155
fix
154156
/>
155157
</ComplexTable>
@@ -178,13 +180,14 @@
178180
import OperateDialog from '@/views/cronjob/operate/index.vue';
179181
import Records from '@/views/cronjob/record/index.vue';
180182
import Backups from '@/views/cronjob/backup/index.vue';
181-
import { onMounted, reactive, ref } from 'vue';
183+
import { computed, onMounted, reactive, ref } from 'vue';
182184
import { deleteCronjob, getCronjobPage, handleOnce, updateStatus } from '@/api/modules/cronjob';
183185
import i18n from '@/lang';
184186
import { Cronjob } from '@/api/interface/cronjob';
185187
import { ElMessageBox } from 'element-plus';
186188
import { MsgSuccess } from '@/utils/message';
187189
import { transSpecToStr } from './helper';
190+
import { GlobalStore } from '@/store';
188191
189192
const loading = ref();
190193
const selects = ref<any>([]);
@@ -206,6 +209,12 @@ const paginationConfig = reactive({
206209
});
207210
const searchName = ref();
208211
212+
const globalStore = GlobalStore();
213+
214+
const mobile = computed(() => {
215+
return globalStore.isMobile();
216+
});
217+
209218
const search = async (column?: any) => {
210219
paginationConfig.orderBy = column?.order ? column.prop : paginationConfig.orderBy;
211220
paginationConfig.order = column?.order ? column.order : paginationConfig.order;

frontend/src/views/cronjob/operate/index.vue

Lines changed: 82 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -84,59 +84,86 @@
8484

8585
<el-form-item :label="$t('cronjob.cronSpec')" prop="spec">
8686
<div v-for="(specObj, index) of dialogData.rowData.specObjs" :key="index" style="width: 100%">
87-
<el-select class="specTypeClass" v-model="specObj.specType" @change="changeSpecType(index)">
88-
<el-option
89-
v-for="item in specOptions"
90-
:key="item.label"
91-
:value="item.value"
92-
:label="item.label"
93-
/>
94-
</el-select>
95-
<el-select v-if="specObj.specType === 'perWeek'" class="specClass" v-model="specObj.week">
96-
<el-option
97-
v-for="item in weekOptions"
98-
:key="item.label"
99-
:value="item.value"
100-
:label="item.label"
101-
/>
102-
</el-select>
103-
<el-input v-if="hasDay(specObj)" class="specClass" v-model.number="specObj.day">
104-
<template #append>
105-
<div class="append">{{ $t('cronjob.day') }}</div>
106-
</template>
107-
</el-input>
108-
<el-input v-if="hasHour(specObj)" class="specClass" v-model.number="specObj.hour">
109-
<template #append>
110-
<div class="append">{{ $t('commons.units.hour') }}</div>
111-
</template>
112-
</el-input>
113-
<el-input
114-
v-if="specObj.specType !== 'perNSecond'"
115-
class="specClass"
116-
v-model.number="specObj.minute"
117-
>
118-
<template #append>
119-
<div class="append">{{ $t('commons.units.minute') }}</div>
120-
</template>
121-
</el-input>
122-
<el-input
123-
v-if="specObj.specType === 'perNSecond'"
124-
class="specClass"
125-
v-model.number="specObj.second"
126-
>
127-
<template #append>
128-
<div class="append">{{ $t('commons.units.second') }}</div>
129-
</template>
130-
</el-input>
131-
<el-button
132-
link
133-
type="primary"
134-
style="float: right; margin-top: 5px"
135-
@click="handleSpecDelete(index)"
136-
v-if="dialogData.rowData.specObjs.length > 1"
137-
>
138-
{{ $t('commons.button.delete') }}
139-
</el-button>
87+
<div class="grid sm:grid-cols-9 gap-4 grid-cols-1">
88+
<el-select
89+
v-model="specObj.specType"
90+
class="col-span-2"
91+
@change="changeSpecType(index)"
92+
>
93+
<el-option
94+
v-for="item in specOptions"
95+
:key="item.label"
96+
:value="item.value"
97+
:label="item.label"
98+
/>
99+
</el-select>
100+
<el-select
101+
v-if="specObj.specType === 'perWeek'"
102+
class="col-span-2"
103+
v-model="specObj.week"
104+
>
105+
<el-option
106+
v-for="item in weekOptions"
107+
:key="item.label"
108+
:value="item.value"
109+
:label="item.label"
110+
/>
111+
</el-select>
112+
<el-input v-if="hasDay(specObj)" class="col-span-2" v-model.number="specObj.day">
113+
<template #append>
114+
<div class="sm:min-w-8 min-w-14 text-center">
115+
<el-tooltip :content="$t('cronjob.day')" placement="top">
116+
{{ $t('cronjob.dayUnit') }}
117+
</el-tooltip>
118+
</div>
119+
</template>
120+
</el-input>
121+
<el-input v-if="hasHour(specObj)" class="col-span-2" v-model.number="specObj.hour">
122+
<template #append>
123+
<div class="sm:min-w-8 min-w-14 text-center">
124+
<el-tooltip :content="$t('commons.units.hour')" placement="top">
125+
{{ $t('commons.units.hourUnit') }}
126+
</el-tooltip>
127+
</div>
128+
</template>
129+
</el-input>
130+
<el-input
131+
v-if="specObj.specType !== 'perNSecond'"
132+
class="col-span-2"
133+
v-model.number="specObj.minute"
134+
>
135+
<template #append>
136+
<div class="sm:min-w-8 min-w-14 text-center">
137+
<el-tooltip :content="$t('commons.units.minute')" placement="top">
138+
{{ $t('commons.units.minuteUnit') }}
139+
</el-tooltip>
140+
</div>
141+
</template>
142+
</el-input>
143+
<el-input
144+
v-if="specObj.specType === 'perNSecond'"
145+
class="col-span-2"
146+
v-model.number="specObj.second"
147+
>
148+
<template #append>
149+
<div class="sm:min-w-8 min-w-14 text-center">
150+
<el-tooltip :content="$t('commons.units.second')" placement="top">
151+
{{ $t('commons.units.secondUnit') }}
152+
</el-tooltip>
153+
</div>
154+
</template>
155+
</el-input>
156+
<el-button
157+
link
158+
type="primary"
159+
class="col-span-1"
160+
style="float: right; margin-top: 5px"
161+
@click="handleSpecDelete(index)"
162+
v-if="dialogData.rowData.specObjs.length > 1"
163+
>
164+
{{ $t('commons.button.delete') }}
165+
</el-button>
166+
</div>
140167
<el-divider v-if="dialogData.rowData.specObjs.length > 1" class="divider" />
141168
</div>
142169
</el-form-item>
@@ -838,37 +865,9 @@ defineExpose({
838865
});
839866
</script>
840867
<style scoped lang="scss">
841-
.specClass {
842-
width: 20% !important;
843-
margin-left: 20px;
844-
845-
.append {
846-
width: 20px;
847-
}
848-
}
849-
850-
@media only screen and (max-width: 1000px) {
851-
.specClass {
852-
width: 100% !important;
853-
margin-top: 20px;
854-
margin-left: 0;
855-
856-
.append {
857-
width: 43px;
858-
}
859-
}
860-
}
861-
862-
.specTypeClass {
863-
width: 22% !important;
868+
:deep(.el-input-group__append) {
869+
padding: 0 10px;
864870
}
865-
866-
@media only screen and (max-width: 1000px) {
867-
.specTypeClass {
868-
width: 100% !important;
869-
}
870-
}
871-
872871
.selectClass {
873872
width: 100%;
874873
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<el-table-column type="selection" fix />
5555
<el-table-column
5656
:label="$t('commons.table.name')"
57-
:min-width="60"
57+
:min-width="90"
5858
prop="name"
5959
sortable
6060
show-overflow-tooltip
@@ -78,7 +78,7 @@
7878
<el-table-column
7979
v-if="isProductPro"
8080
:label="$t('commons.table.status')"
81-
:min-width="70"
81+
:min-width="110"
8282
prop="status"
8383
sortable
8484
>

0 commit comments

Comments
 (0)