From 8e525e753ed9da3f64cc0f6550e374ad7f89658e Mon Sep 17 00:00:00 2001 From: Denis Gukov Date: Thu, 21 Nov 2024 20:23:07 +0500 Subject: [PATCH] feat(ui): expandable inventory editor --- web/src/components/EditDialog.vue | 8 +++- web/src/components/InventoryForm.vue | 59 ++++++++++++++++---------- web/src/components/TaskLogView.vue | 2 +- web/src/views/project/Environment.vue | 1 + web/src/views/project/Inventory.vue | 1 + web/src/views/project/TemplateView.vue | 12 +++--- 6 files changed, 51 insertions(+), 32 deletions(-) diff --git a/web/src/components/EditDialog.vue b/web/src/components/EditDialog.vue index bde5a38f..38a4bc16 100644 --- a/web/src/components/EditDialog.vue +++ b/web/src/components/EditDialog.vue @@ -8,7 +8,7 @@ Can use used in tandem with ItemFormBase.js. See KeyForm.vue for example. v-model="dialog" :max-width="maxWidth || 400" persistent - :fullscreen="fullscreen" + :fullscreen="expandable && fullscreen" :transition="false" :content-class="'item-dialog item-dialog--' + position" > @@ -21,7 +21,7 @@ Can use used in tandem with ItemFormBase.js. See KeyForm.vue for example. - + mdi-arrow-{{ fullscreen ? 'collapse' : 'expand' }} @@ -89,6 +89,10 @@ export default { cancelButtonText: String, saveButtonText: String, expandable: Boolean, + name: { + type: String, + default: 'Unnamed', + }, }, data() { diff --git a/web/src/components/InventoryForm.vue b/web/src/components/InventoryForm.vue index 694af564..50d83514 100644 --- a/web/src/components/InventoryForm.vue +++ b/web/src/components/InventoryForm.vue @@ -9,7 +9,8 @@ :value="formError" color="error" class="pb-2" - >{{ formError }} + >{{ formError }} + {{ $t('staticInventoryExample') }}
[website]
@@ -93,11 +98,11 @@
     
 
     
       {{ $t('staticYamlInventoryExample') }}
       
all:
@@ -113,6 +118,14 @@
 .CodeMirror {
   height: 160px !important;
 }
+
+.v-dialog--fullscreen .vue-codemirror--static .CodeMirror {
+  height: calc(100vh - 540px) !important;
+}
+
+.v-dialog--fullscreen .vue-codemirror--static-yaml .CodeMirror {
+  height: calc(100vh - 600px) !important;
+}