changeset 2618:655c1db641b7

client: importoverview2: improved commit button state/style
author Markus Kottlaender <markus@intevation.de>
date Wed, 13 Mar 2019 14:52:25 +0100
parents 359f5f0037f5
children eb1ec926ff97
files client/src/components/importoverview/ImportOverviewAlt.vue
diffstat 1 files changed, 9 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/importoverview/ImportOverviewAlt.vue	Wed Mar 13 14:45:07 2019 +0100
+++ b/client/src/components/importoverview/ImportOverviewAlt.vue	Wed Mar 13 14:52:25 2019 +0100
@@ -5,24 +5,20 @@
       title="Staging Area"
       :closeCallback="$parent.close"
     />
-    <div
-      class="ml-2 mt-2 d-flex flex-row flex-fill justify-content-between mr-2"
-    >
+    <div class="p-2 d-flex flex-row flex-fill justify-content-between">
       <Filters></Filters>
       <div>
-        <button :class="commitStyle">
+        <button class="btn btn-sm btn-info" :disabled="!reviewed.length">
           <translate>Commit</translate> {{ reviewed.length }}
         </button>
       </div>
     </div>
-    <div class="mt-2">
-      <LogEntry
-        class="border-top d-flex-flex-column w-100"
-        :entry="entry"
-        v-for="entry in imports"
-        :key="entry.id"
-      ></LogEntry>
-    </div>
+    <LogEntry
+      class="border-top d-flex-flex-column w-100"
+      :entry="entry"
+      v-for="entry in imports"
+      :key="entry.id"
+    ></LogEntry>
   </div>
 </template>
 
@@ -51,15 +47,7 @@
     LogEntry: () => import("./LogEntry.vue")
   },
   computed: {
-    ...mapState("imports", ["imports", "filters", "reviewed"]),
-    commitStyle() {
-      return {
-        btn: true,
-        "btn-sm": true,
-        "btn-light": this.reviewed.length == 0,
-        "btn-info": this.reviewed.length > 0
-      };
-    }
+    ...mapState("imports", ["imports", "filters", "reviewed"])
   },
   methods: {
     loadLogs() {