Skip to content

Commit 9785087

Browse files
committed
update gui
1 parent 79bca31 commit 9785087

File tree

5 files changed

+25
-16
lines changed

5 files changed

+25
-16
lines changed

gui/apps/ztm/cloud/service/FileService.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ export default class FileService {
109109

110110
unpublish(path, callback) {
111111
confirm.custom({
112-
message: `Are you sure you want to unpublish this file from the mesh?`,
113-
header: 'Unpublish',
112+
message: `Are you sure you want to take down this file from the mesh?`,
113+
header: 'Take Down',
114114
rejectProps: {
115115
label: 'Close',
116116
severity: 'secondary',
@@ -140,7 +140,7 @@ export default class FileService {
140140
localDelete(path, ep , callback) {
141141
confirm.custom({
142142
message: `Are you sure to delete local source of the file?`,
143-
header: 'Delete Local Source',
143+
header: 'Delete Local File',
144144
rejectProps: {
145145
label: 'Close',
146146
severity: 'secondary',

gui/apps/ztm/cloud/views/Config.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,10 @@ const actions = computed(()=>{
384384
_actions.push({separator: true});
385385
if(isMyFolder.value && !!props.file?.state && props.file?.state != 'new'){
386386
_actions.push({
387-
label: 'Unpublish',
387+
label: 'Take Down',
388388
class:'opacity-80',
389389
icon: 'pi pi-trash',
390-
loading: unpublishLoading.value,
390+
loading: false,
391391
command(e){
392392
unpublishLoading.value = true;
393393
fileService.unpublish(props.file?.path,(reject)=>{
@@ -399,10 +399,10 @@ const actions = computed(()=>{
399399
})
400400
}
401401
_actions.push({
402-
label: 'Local Delete',
402+
label: 'Delete Local File',
403403
class:'opacity-80',
404404
icon: 'pi pi-trash',
405-
loading: deleteLoading.value,
405+
loading: false,
406406
command(e){
407407
deleteLoading.value = true;
408408
fileService.localDelete(props.file?.path,info.value?.endpoint?.id,(reject)=>{
@@ -508,7 +508,7 @@ onMounted(()=>{
508508
<div class="pt-4 pb-2">
509509
<b>Users permission:</b>
510510
</div>
511-
<Listbox v-if="props.file.access?.users" :options="Object.keys(props.file.access.users)" class="w-full md:w-56" listStyle="max-height:250px">
511+
<Listbox v-if="props.file.access?.users" :options="Object.keys(props.file.access.users)" class="w-full md:w-56 noborder noshadow" listStyle="max-height:250px">
512512
<template #option="slotProps">
513513
<div class="flex w-full">
514514
<div class="flex-item pt-1">
@@ -524,10 +524,10 @@ onMounted(()=>{
524524
</div>
525525
</template>
526526
<template #empty>
527-
---
527+
<span></span>
528528
</template>
529529
<template #footer>
530-
<div class="flex items-center pt-1 pb-2 px-3">
530+
<div class="flex items-center pt-1 pb-2 ">
531531
<div class="flex-item pr-1">
532532
<Select size="small" class="w-full" v-model="acl.user" :options="filterEps(props.file.access.users)" optionLabel="username" optionValue="username" :filter="filterEps(props.file.access.users).length>8" placeholder="Endpoint"/>
533533
</div>
@@ -548,9 +548,9 @@ onMounted(()=>{
548548
</template>
549549
<div class="p-3">
550550
<Loading v-if="mirrorLoading" />
551-
<Listbox v-else :options="filterMirrors" class="w-full md:w-56" listStyle="max-height:250px">
551+
<Listbox v-else :options="filterMirrors" class="w-full md:w-56 noborder noshadow" listStyle="max-height:250px">
552552
<template #option="slotProps">
553-
<div class="flex items-center pt-1 pb-2 px-0 w-full">
553+
<div class="flex items-center px-0 w-full">
554554
<div class="flex-item pr-2 py-2">
555555
<Tag>{{slotProps.option.ep?.name}}</Tag>
556556
<Tag v-if="info?.endpoint?.id == slotProps.option?.ep?.id" value="Local" class="ml-2" severity="contrast"/>
@@ -570,10 +570,10 @@ onMounted(()=>{
570570
</div>
571571
</template>
572572
<template #empty>
573-
------
573+
<span></span>
574574
</template>
575575
<template #footer>
576-
<div class="flex items-center pt-1 pb-2 px-3">
576+
<div class="flex items-center pt-1 pb-2">
577577
<div class="flex-item pr-1">
578578
<Select size="small" class="w-full" v-model="mirror.user" :options="filterUnMirrorEps" optionLabel="name" optionValue="id" :filter="filterUnMirrorEps.length>8" placeholder="Endpoint">
579579
<template #option="slotProps">

gui/src/assets/styles.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,9 @@ fieldset{
13001300
.noborder{
13011301
border: none !important;
13021302
}
1303+
.noshadow{
1304+
box-shadow: none !important;
1305+
}
13031306
.noclose .p-dialog-header-actions{
13041307
width: 30px;
13051308
}
@@ -1308,4 +1311,9 @@ fieldset{
13081311
}
13091312
.smheader .p-dialog-header{
13101313
padding: 1rem;
1311-
}
1314+
}
1315+
.noborder{
1316+
.p-listbox-option,.p-listbox-list{
1317+
padding: 0 !important;
1318+
}
1319+
}

gui/src/directives/longtap.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export default {
2222
// 阻止右键菜单
2323
const preventContextMenu = (event) => {
2424
event.preventDefault();
25+
binding.value(event);
2526
};
2627

2728
el._start = start;

gui/src/utils/file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ const bitUnit = (value)=> {
177177
} else if(value>1024){
178178
return (value/1024).toFixed(0) + "KB";
179179
} else {
180-
return value*1 + "B";
180+
return (value*1).toFixed(0) + "B";
181181
}
182182
}
183183
const openFile = (path) => {

0 commit comments

Comments
 (0)