|
1 | 1 | <template> |
2 | 2 | <q-card |
3 | 3 | bordered |
4 | | - v-bind:class="['bg-formcard', identifierErrors.length > 0 ? 'red-border' : '']" |
5 | 4 | flat |
6 | | - style="display: flex; flex-direction: row" |
| 5 | + v-bind:class="['bg-formcard', identifierErrors.length > 0 ? 'red-border' : '']" |
7 | 6 | > |
8 | | - <div style="flex-grow: 1.0"> |
9 | | - <ul v-bind:data-cy="'card-info' + index"> |
10 | | - <li>{{ identifier.description }}</li> |
11 | | - <li>{{ identifier.type }}: {{ identifier.value }}</li> |
12 | | - </ul> |
13 | | - </div> |
14 | | - <div> |
15 | | - <q-btn |
16 | | - class="identifier-button" |
17 | | - color="blue" |
18 | | - icon="ion-arrow-up" |
19 | | - v-bind:aria-label="`Move identifier ${index + 1} up`" |
20 | | - v-bind:data-cy="'btn-move-up' + index" |
21 | | - v-bind:disable="index == 0" |
22 | | - v-on:click="$emit('moveUp')" |
23 | | - /> |
24 | | - <q-btn |
25 | | - class="identifier-button" |
26 | | - color="blue" |
27 | | - icon="ion-arrow-down" |
28 | | - v-bind:aria-label="`Move identifier ${index + 1} down`" |
29 | | - v-bind:data-cy="'btn-move-down' + index" |
30 | | - v-bind:disable="index >= numIdentifiers - 1" |
31 | | - v-on:click="$emit('moveDown')" |
32 | | - /> |
33 | | - <q-btn |
34 | | - class="identifier-button" |
35 | | - color="primary" |
36 | | - flat |
37 | | - hover-color="negative" |
38 | | - icon="edit" |
39 | | - title="Edit" |
40 | | - v-bind:aria-label="`Edit identifier ${index + 1}`" |
41 | | - v-bind:data-cy="'btn-edit' + index" |
42 | | - v-on:click="$emit('editPressed')" |
43 | | - /> |
44 | | - <q-btn |
45 | | - class="identifier-button" |
46 | | - color="negative" |
47 | | - hover-color="negative" |
48 | | - icon="delete" |
49 | | - title="Remove Identifier" |
50 | | - v-bind:aria-label="`Remove identifier ${index + 1}`" |
51 | | - v-bind:data-cy="'btn-remove' + index" |
52 | | - v-on:click="$emit('removePressed')" |
53 | | - /> |
54 | | - </div> |
| 7 | + <q-card-section |
| 8 | + horizontal |
| 9 | + > |
| 10 | + <div class="col"> |
| 11 | + <ul |
| 12 | + class="q-pl-md" |
| 13 | + v-bind:data-cy="'card-info' + index" |
| 14 | + > |
| 15 | + <li class="row"> |
| 16 | + {{ identifier.description }} |
| 17 | + </li> |
| 18 | + <li class="row"> |
| 19 | + {{ identifier.type }}: {{ identifier.value }} |
| 20 | + </li> |
| 21 | + </ul> |
| 22 | + </div> |
| 23 | + <q-card-actions> |
| 24 | + <q-btn |
| 25 | + color="secondary" |
| 26 | + flat |
| 27 | + icon="ion-arrow-up" |
| 28 | + v-bind:aria-label="`Move identifier ${index + 1} up`" |
| 29 | + v-bind:data-cy="'btn-move-up' + index" |
| 30 | + v-bind:disable="index == 0" |
| 31 | + v-on:click="$emit('moveUp')" |
| 32 | + /> |
| 33 | + <q-btn |
| 34 | + color="secondary" |
| 35 | + flat |
| 36 | + icon="ion-arrow-down" |
| 37 | + v-bind:aria-label="`Move identifier ${index + 1} down`" |
| 38 | + v-bind:data-cy="'btn-move-down' + index" |
| 39 | + v-bind:disable="index >= numIdentifiers - 1" |
| 40 | + v-on:click="$emit('moveDown')" |
| 41 | + /> |
| 42 | + <q-btn |
| 43 | + color="secondary" |
| 44 | + flat |
| 45 | + hover-color="negative" |
| 46 | + icon="edit" |
| 47 | + title="Edit" |
| 48 | + v-bind:aria-label="`Edit identifier ${index + 1}`" |
| 49 | + v-bind:data-cy="'btn-edit' + index" |
| 50 | + v-on:click="$emit('editPressed')" |
| 51 | + /> |
| 52 | + <q-btn |
| 53 | + color="negative" |
| 54 | + flat |
| 55 | + hover-color="negative" |
| 56 | + icon="delete" |
| 57 | + title="Remove Identifier" |
| 58 | + v-bind:aria-label="`Remove identifier ${index + 1}`" |
| 59 | + v-bind:data-cy="'btn-remove' + index" |
| 60 | + v-on:click="$emit('removePressed')" |
| 61 | + /> |
| 62 | + </q-card-actions> |
| 63 | + </q-card-section> |
55 | 64 | </q-card> |
56 | 65 | </template> |
57 | 66 |
|
@@ -98,21 +107,3 @@ export default defineComponent({ |
98 | 107 | emits: ['editPressed', 'moveDown', 'moveUp', 'removePressed'] |
99 | 108 | }) |
100 | 109 | </script> |
101 | | -<style scoped> |
102 | | -ul { |
103 | | - padding-inline-start: 20px; |
104 | | -} |
105 | | -li { |
106 | | - list-style: none; |
107 | | - list-style-position: inside; |
108 | | -} |
109 | | -.identifier-button { |
110 | | - background-color: white; |
111 | | - border: 1px solid #ccc; |
112 | | - margin-bottom: 5px; |
113 | | - margin-left: 5px; |
114 | | - margin-right: 5px; |
115 | | - margin-top: 5px; |
116 | | - padding: 10px; |
117 | | -} |
118 | | -</style> |
0 commit comments