changeset 2428:78d4ce079f9b

staging: optics
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 28 Feb 2019 17:24:19 +0100
parents 171ea4b5e8dc
children 9bc34e1f002c
files client/src/components/importoverview/ImportOverview.vue client/src/components/importoverview/importlogs/Logs.vue client/src/components/importoverview/staging/Staging.vue
diffstat 3 files changed, 41 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/importoverview/ImportOverview.vue	Thu Feb 28 16:52:45 2019 +0100
+++ b/client/src/components/importoverview/ImportOverview.vue	Thu Feb 28 17:24:19 2019 +0100
@@ -14,37 +14,51 @@
       <font-awesome-icon
         class="pointer"
         @click="toggleStaging()"
-        v-if="stagingVisible"
+        v-if="stagingVisible && staging.length > 0"
         icon="angle-up"
         fixed-width
       ></font-awesome-icon>
       <font-awesome-icon
         class="pointer"
         @click="toggleStaging()"
-        v-if="!stagingVisible"
+        v-if="!stagingVisible && staging.length > 0"
         icon="angle-down"
         fixed-width
       ></font-awesome-icon>
-      <Staging v-if="stagingVisible"></Staging>
-      <div v-else><h5>Staging</h5></div>
+      <span style="width:1.25em;" v-if="!(staging.length > 0)"></span>
+      <Staging v-if="stagingVisible && staging.length > 0"></Staging>
+      <div v-else class="d-flex flex-row">
+        <h6>
+          <small><translate>Review</translate></small>
+        </h6>
+        <small class="ml-3" v-if="!(staging.length > 0)"
+          ><translate>Nothing to review</translate></small
+        >
+      </div>
     </div>
-    <div class="d-flex flex-row">
-      <font-awesome-icon
-        class="pointer"
-        @click="toggleLogs()"
-        v-if="logsVisible"
-        icon="angle-up"
-        fixed-width
-      ></font-awesome-icon>
-      <font-awesome-icon
-        class="pointer"
-        @click="toggleLogs()"
-        v-if="!logsVisible"
-        icon="angle-down"
-        fixed-width
-      ></font-awesome-icon>
-      <Logs v-if="logsVisible"></Logs>
-      <div v-else><h5>Logs</h5></div>
+    <div class="mt-2">
+      <div class="d-flex flex-row">
+        <font-awesome-icon
+          class="pointer"
+          @click="toggleLogs()"
+          v-if="logsVisible"
+          icon="angle-up"
+          fixed-width
+        ></font-awesome-icon>
+        <font-awesome-icon
+          class="pointer"
+          @click="toggleLogs()"
+          v-if="!logsVisible"
+          icon="angle-down"
+          fixed-width
+        ></font-awesome-icon>
+        <Logs v-if="logsVisible"></Logs>
+        <div v-else>
+          <h6>
+            <small><translate>Logs</translate></small>
+          </h6>
+        </div>
+      </div>
     </div>
   </div>
 </template>
@@ -73,7 +87,7 @@
     Logs: () => import("./importlogs/Logs.vue")
   },
   computed: {
-    ...mapState("imports", ["stagingVisible", "logsVisible"])
+    ...mapState("imports", ["stagingVisible", "logsVisible", "staging"])
   },
   methods: {
     toggleStaging() {
--- a/client/src/components/importoverview/importlogs/Logs.vue	Thu Feb 28 16:52:45 2019 +0100
+++ b/client/src/components/importoverview/importlogs/Logs.vue	Thu Feb 28 17:24:19 2019 +0100
@@ -1,6 +1,8 @@
 <template>
   <div class="w-95">
-    <div class="text-left"><h2>Logs</h2></div>
+    <div class="text-left">
+      <h6><translate>Logs</translate></h6>
+    </div>
     <div class="d-flex justify-content-between flex-row">
       <button @click="setFilter('failed')" :class="failedStyle">
         <translate>Failed</translate>
--- a/client/src/components/importoverview/staging/Staging.vue	Thu Feb 28 16:52:45 2019 +0100
+++ b/client/src/components/importoverview/staging/Staging.vue	Thu Feb 28 17:24:19 2019 +0100
@@ -1,8 +1,8 @@
 <template>
   <div class="w-100">
     <div class="d-flex justify-content-between flex-row w-100 border-bottom">
-      <h2>Staging</h2>
-      <button class="btn btn-info align-self-end" @click="save">
+      <h6><translate>Review</translate></h6>
+      <button class="btn btn-sm btn-info align-self-end" @click="save">
         <translate>Confirm</translate>
       </button>
     </div>