@konfuzio/document-validation-ui 0.1.19-dev.1 → 0.1.19-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konfuzio/document-validation-ui",
3
- "version": "0.1.19-dev.1",
3
+ "version": "0.1.19-dev.2",
4
4
  "repository": "git://github.com:konfuzio-ai/document-validation-ui.git",
5
5
  "main": "dist/app.js",
6
6
  "scripts": {
@@ -419,8 +419,8 @@
419
419
  button {
420
420
  height: 32px;
421
421
 
422
- &.annotation-save-btn,
423
- &.annotation-accept-btn {
422
+ &.annotation-save-btn {
423
+ cursor: pointer;
424
424
  padding: 6px 14px 6px 14px;
425
425
  border-radius: 8px;
426
426
  font-weight: 500;
@@ -481,12 +481,33 @@
481
481
  }
482
482
  }
483
483
 
484
- .missing-button-container,
485
- .decline-button-container {
484
+ .accept-decline-container {
485
+ padding-right: 14px;
486
+ display: flex;
487
+ flex-direction: row;
488
+ justify-content: center;
489
+ button {
490
+ padding: 6px;
491
+
492
+ .decline-icon {
493
+ height: 24px;
494
+ width: 24px;
495
+ padding: 6px;
496
+ color: $red;
497
+ vertical-align: middle;
498
+ }
499
+
500
+ svg {
501
+ vertical-align: middle;
502
+ height: 24px;
503
+ }
504
+ }
505
+ }
506
+
507
+ .missing-button-container {
486
508
  background-color: transparent;
487
509
 
488
- .missing-btn,
489
- .decline-btn {
510
+ .missing-btn {
490
511
  color: $grey-blue !important;
491
512
  font-size: 14px !important;
492
513
  font-weight: 500;
@@ -31,61 +31,32 @@
31
31
  @click.stop="cancel"
32
32
  />
33
33
 
34
- <!-- decline button -->
35
- <div
36
- v-if="
37
- declineBtn &&
38
- !isLoading &&
39
- !saveBtn &&
40
- !cancelBtn &&
41
- !publicView &&
42
- !isDocumentReviewed
43
- "
44
- class="decline-button-container"
45
- >
34
+ <div v-if="showHoverButton" class="accept-decline-container">
46
35
  <b-button
47
- type="is-ghost"
36
+ v-if="declineBtn"
48
37
  class="decline-btn"
38
+ :title="$t('decline')"
39
+ type="is-ghost"
49
40
  @click.stop="decline"
50
41
  >
51
- {{ $t("decline") }}
42
+ <b-icon icon="xmark" class="decline-icon" />
43
+ </b-button>
44
+ <b-button
45
+ v-if="acceptBtn"
46
+ class="accept-btn"
47
+ :title="$t('accept')"
48
+ type="is-ghost"
49
+ @click.stop="accept"
50
+ >
51
+ <AcceptedCheckMark />
52
52
  </b-button>
53
53
  </div>
54
-
55
- <!-- accept button -->
56
- <b-button
57
- v-if="
58
- acceptBtn &&
59
- !isLoading &&
60
- !saveBtn &&
61
- !cancelBtn &&
62
- !publicView &&
63
- !isDocumentReviewed
64
- "
65
- class="annotation-accept-btn primary-button"
66
- type="is-primary"
67
- @click.stop="accept"
68
- >
69
- {{ $t("accept") }}
70
- </b-button>
71
-
72
54
  <!-- missing button -->
73
55
  <div
74
- v-if="
75
- showMissingBtn &&
76
- !isLoading &&
77
- !cancelBtn &&
78
- !saveBtn &&
79
- !publicView &&
80
- !isDocumentReviewed
81
- "
56
+ v-if="showMissingBtn && showHoverButton"
82
57
  class="missing-button-container"
83
58
  >
84
- <b-button
85
- type="is-ghost"
86
- class="missing-btn"
87
- @click.stop="markAsMissing"
88
- >
59
+ <b-button type="is-ghost" class="missing-btn" @click.stop="markAsMissing">
89
60
  {{ $t("missing_annotation") }}
90
61
  </b-button>
91
62
  </div>
@@ -104,8 +75,12 @@
104
75
  <script>
105
76
  /* Component for showing actions for each annotation row */
106
77
  import { mapGetters, mapState } from "vuex";
78
+ import AcceptedCheckMark from "../../assets/images/AcceptedCheckMark";
107
79
  export default {
108
80
  name: "AnnotationActionButtons",
81
+ components: {
82
+ AcceptedCheckMark,
83
+ },
109
84
  props: {
110
85
  saveBtn: {
111
86
  type: Boolean,
@@ -137,6 +112,15 @@ export default {
137
112
  computed: {
138
113
  ...mapState("document", ["publicView", "missingAnnotations"]),
139
114
  ...mapGetters("document", ["isDocumentReviewed"]),
115
+ showHoverButton() {
116
+ return (
117
+ !this.isLoading &&
118
+ !this.cancelBtn &&
119
+ !this.saveBtn &&
120
+ !this.publicView &&
121
+ !this.isDocumentReviewed
122
+ );
123
+ },
140
124
  },
141
125
  methods: {
142
126
  save() {