mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 20:35:24 +01:00
feat(ui): extend message log dialog
This commit is contained in:
parent
7681dfbf0b
commit
79396e51f6
@ -71,9 +71,10 @@
|
|||||||
|
|
||||||
<EditDialog
|
<EditDialog
|
||||||
v-model="taskLogDialog"
|
v-model="taskLogDialog"
|
||||||
save-button-text="Delete"
|
|
||||||
:max-width="1000"
|
:max-width="1000"
|
||||||
:hide-buttons="true"
|
:hide-buttons="true"
|
||||||
|
:expandable="true"
|
||||||
|
name="TaskLogDialog"
|
||||||
@close="onTaskLogDialogClosed()"
|
@close="onTaskLogDialogClosed()"
|
||||||
>
|
>
|
||||||
<template v-slot:title={}>
|
<template v-slot:title={}>
|
||||||
|
@ -8,6 +8,7 @@ Can use used in tandem with ItemFormBase.js. See KeyForm.vue for example.
|
|||||||
v-model="dialog"
|
v-model="dialog"
|
||||||
:max-width="maxWidth || 400"
|
:max-width="maxWidth || 400"
|
||||||
persistent
|
persistent
|
||||||
|
:fullscreen="fullscreen"
|
||||||
:transition="false"
|
:transition="false"
|
||||||
:content-class="'item-dialog item-dialog--' + position"
|
:content-class="'item-dialog item-dialog--' + position"
|
||||||
>
|
>
|
||||||
@ -19,7 +20,12 @@ Can use used in tandem with ItemFormBase.js. See KeyForm.vue for example.
|
|||||||
</slot>
|
</slot>
|
||||||
|
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-btn icon @click="close()">
|
|
||||||
|
<v-btn icon @click="toggleFullscreen()" class="mr-3">
|
||||||
|
<v-icon>mdi-arrow-{{ fullscreen ? 'collapse' : 'expand' }}</v-icon>
|
||||||
|
</v-btn>
|
||||||
|
|
||||||
|
<v-btn icon @click="close()" style="margin-right: -6px;">
|
||||||
<v-icon>mdi-close</v-icon>
|
<v-icon>mdi-close</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
@ -82,6 +88,7 @@ export default {
|
|||||||
dontCloseOnSave: Boolean,
|
dontCloseOnSave: Boolean,
|
||||||
cancelButtonText: String,
|
cancelButtonText: String,
|
||||||
saveButtonText: String,
|
saveButtonText: String,
|
||||||
|
expandable: Boolean,
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@ -89,6 +96,7 @@ export default {
|
|||||||
dialog: false,
|
dialog: false,
|
||||||
needSave: false,
|
needSave: false,
|
||||||
needReset: false,
|
needReset: false,
|
||||||
|
fullscreen: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -106,6 +114,18 @@ export default {
|
|||||||
async value(val) {
|
async value(val) {
|
||||||
this.dialog = val;
|
this.dialog = val;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
fullscreen(val) {
|
||||||
|
if (val) {
|
||||||
|
localStorage.setItem(`EditDialog_${this.name}__fullscreen`, '1');
|
||||||
|
} else {
|
||||||
|
localStorage.removeItem(`EditDialog_${this.name}__fullscreen`);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
this.fullscreen = localStorage.getItem(`EditDialog_${this.name}__fullscreen`) === '1';
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@ -118,6 +138,10 @@ export default {
|
|||||||
this.close(e);
|
this.close(e);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toggleFullscreen() {
|
||||||
|
this.fullscreen = !this.fullscreen;
|
||||||
|
},
|
||||||
|
|
||||||
close(e) {
|
close(e) {
|
||||||
this.dialog = false;
|
this.dialog = false;
|
||||||
|
|
||||||
|
@ -123,6 +123,10 @@
|
|||||||
padding: 5px 10px 50px;
|
padding: 5px 10px 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.v-dialog--fullscreen .task-log-records {
|
||||||
|
height: calc(100vh - 136px);
|
||||||
|
}
|
||||||
|
|
||||||
.task-log-view--with-message .task-log-records {
|
.task-log-view--with-message .task-log-records {
|
||||||
height: calc(100vh - 300px);
|
height: calc(100vh - 300px);
|
||||||
}
|
}
|
||||||
@ -140,7 +144,7 @@
|
|||||||
|
|
||||||
.task-log-records__output {
|
.task-log-records__output {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
white-space: pre;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media #{map-get($display-breakpoints, 'sm-and-down')} {
|
@media #{map-get($display-breakpoints, 'sm-and-down')} {
|
||||||
|
Loading…
Reference in New Issue
Block a user