glib-web 0.15.0 → 0.15.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/components/avatar.vue +3 -8
- package/nav/dialog.vue +18 -3
- package/package.json +1 -1
- package/templates/thumbnail.vue +15 -18
package/components/avatar.vue
CHANGED
|
@@ -8,14 +8,9 @@
|
|
|
8
8
|
>
|
|
9
9
|
<template v-slot:activator="{ on }">
|
|
10
10
|
<common-badge :spec="spec">
|
|
11
|
-
<v-avatar
|
|
12
|
-
|
|
13
|
-
:
|
|
14
|
-
:size="spec.size"
|
|
15
|
-
v-on="on"
|
|
16
|
-
>
|
|
17
|
-
<v-img :src="spec.url || spec.base64Data" @click="$onClick()">
|
|
18
|
-
</v-img>
|
|
11
|
+
<v-avatar :size="spec.size">
|
|
12
|
+
<!-- Use `img` instead of `v-img` otherwise the rounded border will not work. -->
|
|
13
|
+
<img :src="spec.url || spec.base64Data" @click="$onClick()" />
|
|
19
14
|
</v-avatar>
|
|
20
15
|
</common-badge>
|
|
21
16
|
</template>
|
package/nav/dialog.vue
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-dialog
|
|
3
3
|
v-model="model"
|
|
4
|
-
width="600"
|
|
4
|
+
:width="spec.width || 600"
|
|
5
5
|
:dark="false"
|
|
6
|
+
:fullscreen="fullscreen"
|
|
6
7
|
:sm-and-down="false"
|
|
7
8
|
:persistent="true"
|
|
8
9
|
>
|
|
9
10
|
<v-card>
|
|
10
|
-
<v-card-title v-if="title || showClose" class="
|
|
11
|
+
<v-card-title v-if="title || showClose" class="text-h5" primary-title>
|
|
11
12
|
{{ title }}
|
|
12
13
|
<v-btn v-if="showClose" text icon class="dialog-close" @click="close">
|
|
13
14
|
<v-icon>close</v-icon>
|
|
@@ -68,6 +69,7 @@ export default {
|
|
|
68
69
|
showClose: false,
|
|
69
70
|
isFormDirty: false,
|
|
70
71
|
isFormSubmitted: false,
|
|
72
|
+
isMobile: false,
|
|
71
73
|
formSpec: null
|
|
72
74
|
};
|
|
73
75
|
},
|
|
@@ -77,6 +79,15 @@ export default {
|
|
|
77
79
|
return "panels-form";
|
|
78
80
|
}
|
|
79
81
|
return "div";
|
|
82
|
+
},
|
|
83
|
+
fullscreen() {
|
|
84
|
+
if (this.spec.fullscreen == "mobile" && this.isMobile) {
|
|
85
|
+
return true;
|
|
86
|
+
} else if (this.spec.fullscreen == "always") {
|
|
87
|
+
return true;
|
|
88
|
+
} else {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
80
91
|
}
|
|
81
92
|
},
|
|
82
93
|
watch: {
|
|
@@ -89,7 +100,7 @@ export default {
|
|
|
89
100
|
methods: {
|
|
90
101
|
$ready() {
|
|
91
102
|
this.$root.vueApp = this.vueApp;
|
|
92
|
-
|
|
103
|
+
this.onResize();
|
|
93
104
|
this.show(false);
|
|
94
105
|
this.stack.push(this);
|
|
95
106
|
},
|
|
@@ -114,6 +125,10 @@ export default {
|
|
|
114
125
|
this.show(true);
|
|
115
126
|
}
|
|
116
127
|
},
|
|
128
|
+
onResize() {
|
|
129
|
+
this.isMobile = window.innerWidth < 600;
|
|
130
|
+
},
|
|
131
|
+
|
|
117
132
|
show(reload) {
|
|
118
133
|
const spec = this.spec;
|
|
119
134
|
this.url = spec.url;
|
package/package.json
CHANGED
package/templates/thumbnail.vue
CHANGED
|
@@ -23,13 +23,8 @@
|
|
|
23
23
|
>
|
|
24
24
|
<v-icon v-if="spec.onReorder" class="handle">drag_indicator</v-icon>
|
|
25
25
|
|
|
26
|
-
<!--
|
|
27
|
-
|
|
28
|
-
:name="spec.fieldCheckName"
|
|
29
|
-
:value="true"
|
|
30
|
-
></v-checkbox> -->
|
|
31
|
-
|
|
32
|
-
<fields-check v-if="checkSpec" :spec="checkSpec" />
|
|
26
|
+
<!-- Specify a key to prevent reuse which causes an issue where the checkbox would use the previous name. -->
|
|
27
|
+
<fields-check v-if="checkSpec" :key="checkSpec.name" :spec="checkSpec" />
|
|
33
28
|
|
|
34
29
|
<div v-if="spec.leftButtons" class="left-universal">
|
|
35
30
|
<template v-for="(item, index) in spec.leftButtons">
|
|
@@ -111,9 +106,8 @@ export default {
|
|
|
111
106
|
data() {
|
|
112
107
|
return {
|
|
113
108
|
accessory: {},
|
|
114
|
-
editButtons: []
|
|
115
|
-
checkSpec: null
|
|
116
|
-
// chips: []
|
|
109
|
+
editButtons: []
|
|
110
|
+
// checkSpec: null
|
|
117
111
|
};
|
|
118
112
|
},
|
|
119
113
|
computed: {
|
|
@@ -137,15 +131,11 @@ export default {
|
|
|
137
131
|
});
|
|
138
132
|
return Object.assign({}, item, { color: color, view: "chip" });
|
|
139
133
|
});
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
$ready() {
|
|
144
|
-
this.accessory = { childViews: this.spec.accessoryViews };
|
|
145
|
-
this.editButtons = this.spec.editButtons || [];
|
|
146
|
-
|
|
134
|
+
},
|
|
135
|
+
// Implemented as computed so that it gets reflected when navigating to another list containing check fields.
|
|
136
|
+
checkSpec() {
|
|
147
137
|
if (this.spec.fieldCheckName) {
|
|
148
|
-
|
|
138
|
+
return {
|
|
149
139
|
view: "fields/checkGroup",
|
|
150
140
|
name: this.spec.fieldCheckName,
|
|
151
141
|
checkValue: true,
|
|
@@ -153,6 +143,13 @@ export default {
|
|
|
153
143
|
padding: { left: 16 }
|
|
154
144
|
};
|
|
155
145
|
}
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
methods: {
|
|
150
|
+
$ready() {
|
|
151
|
+
this.accessory = { childViews: this.spec.accessoryViews };
|
|
152
|
+
this.editButtons = this.spec.editButtons || [];
|
|
156
153
|
},
|
|
157
154
|
buttonSpec(item) {
|
|
158
155
|
return Object.assign({}, item, {
|