glib-web 3.27.0 → 3.27.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/actions/windows/closeWithOpen.js +1 -2
- package/actions/windows/reload.js +3 -3
- package/components/composable/dropable.js +2 -2
- package/components/fields/chipGroup.vue +7 -3
- package/components/tabBar.vue +1 -1
- package/nav/appBar.vue +7 -6
- package/nav/drawer.vue +6 -6
- package/nav/layout.vue +7 -7
- package/nav/snackbar.vue +1 -1
- package/package.json +1 -1
- package/store.js +2 -1
- package/utils/history.js +12 -0
- package/utils/launch.js +2 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export default class {
|
|
2
2
|
execute(properties, component) {
|
|
3
|
-
|
|
4
|
-
Utils.history.back()
|
|
3
|
+
Utils.history.backWithoutRender()
|
|
5
4
|
|
|
6
5
|
// Open right away so there is no visible flicker.
|
|
7
6
|
Utils.http.load(properties, component, true);
|
|
@@ -4,9 +4,9 @@ export default class {
|
|
|
4
4
|
execute(properties, component) {
|
|
5
5
|
vueApp.richTextValues = {};
|
|
6
6
|
|
|
7
|
-
if (!executeGlobalEvent('onbeforewindowsreload')) {
|
|
8
|
-
|
|
9
|
-
}
|
|
7
|
+
// if (!executeGlobalEvent('onbeforewindowsreload')) {
|
|
8
|
+
// return;
|
|
9
|
+
// }
|
|
10
10
|
|
|
11
11
|
if (Utils.settings.reactive) {
|
|
12
12
|
Utils.http.reload(properties, component);
|
|
@@ -61,7 +61,7 @@ function useDropableUtils() {
|
|
|
61
61
|
|
|
62
62
|
function useFilesState(files) {
|
|
63
63
|
const uploading = computed(() => {
|
|
64
|
-
return Object.values(files.value).length > 0 ? Object.values(files.value).reduce((prev, curr) => prev || curr.status == 'pending', false) :
|
|
64
|
+
return Object.values(files.value).length > 0 ? Object.values(files.value).reduce((prev, curr) => prev || curr.status == 'pending', false) : false;
|
|
65
65
|
});
|
|
66
66
|
const uploaded = computed(() => {
|
|
67
67
|
return Object.values(files.value).length > 0 ? Object.values(files.value).reduce((prev, curr) => prev && !!curr.signedId, true) : false;
|
|
@@ -109,7 +109,7 @@ const showError = (options) => {
|
|
|
109
109
|
{
|
|
110
110
|
action: 'snackbars/select',
|
|
111
111
|
message: body,
|
|
112
|
-
styleClasses: ['error', '
|
|
112
|
+
styleClasses: ['error', 'outlined'],
|
|
113
113
|
buttons: [{ text: button }]
|
|
114
114
|
},
|
|
115
115
|
{}
|
|
@@ -4,8 +4,8 @@ w<template>
|
|
|
4
4
|
<v-chip v-for="(option, index) in spec.options" :key="index" filter :variant="variant">{{
|
|
5
5
|
option.text }}</v-chip>
|
|
6
6
|
</v-chip-group>
|
|
7
|
-
<input v-for="(item, index) in
|
|
8
|
-
:
|
|
7
|
+
<input v-for="(item, index) in indexToValue(fieldModel)" :key="index" type="hidden" :disabled="inputDisabled"
|
|
8
|
+
:name="fieldName" :value="item" />
|
|
9
9
|
</div>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
@@ -27,7 +27,7 @@ export default defineComponent({
|
|
|
27
27
|
triggerOnInput(containerEl);
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
|
|
30
|
+
indexToValue(value) {
|
|
31
31
|
if (value == null || value.length <= 0) return [null];
|
|
32
32
|
if (value.toString() == (this.spec.value || '').toString()) return value;
|
|
33
33
|
|
|
@@ -38,6 +38,10 @@ export default defineComponent({
|
|
|
38
38
|
return prev;
|
|
39
39
|
}, []);
|
|
40
40
|
},
|
|
41
|
+
$internalizeValue(value) {
|
|
42
|
+
if (value == null || value == undefined || !this.spec.options[value]) return;
|
|
43
|
+
return this.spec.options[value].value;
|
|
44
|
+
},
|
|
41
45
|
$externalizeValue(value) {
|
|
42
46
|
if (!value) return [];
|
|
43
47
|
|
package/components/tabBar.vue
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<v-tabs v-model="tab" :bg-color="spec.backgroundColor || 'white'" slider-color="primary" color="primary" show-arrows
|
|
4
4
|
:height="spec.height || 60" :grow="$classes().includes('no-grow') ? false : true">
|
|
5
5
|
<v-tab v-for="(item, index) in spec.buttons" @click="handleClick(index)" :key="index" height="100%"
|
|
6
|
-
:value="index">
|
|
6
|
+
:disabled="item.disabled" :value="index">
|
|
7
7
|
<common-badge :spec="item">
|
|
8
8
|
<div class="tab-content">
|
|
9
9
|
<common-icon :class="index == spec.activeIndex ? 'text-primary' : null" :spec="item.icon"
|
package/nav/appBar.vue
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-app-bar v-if="navBar.height" :style="style" :height="navBar.height" :class="cssClasses()"
|
|
2
|
+
<v-app-bar v-if="navBar.height" :style="style" :height="navBar.height" :class="cssClasses()"
|
|
3
|
+
:elevation="navBar.elevation">
|
|
3
4
|
<v-app-bar-nav-icon v-if="showDrawerMenu" @click="triggerDrawer()"></v-app-bar-nav-icon>
|
|
4
5
|
<!-- <v-app-bar-nav-icon v-if="page.leftDrawer && !isPermanent" style="color: inherit;"
|
|
5
6
|
@click="drawerTrigger = new Date()"></v-app-bar-nav-icon> -->
|
|
@@ -7,8 +8,8 @@
|
|
|
7
8
|
<div v-else>
|
|
8
9
|
<panels-responsive v-if="navBar.logo" :spec="navBar.logo" />
|
|
9
10
|
<v-app-bar-title v-else-if="navBar.showTitle">{{
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
page.title
|
|
12
|
+
}}</v-app-bar-title>
|
|
12
13
|
</div>
|
|
13
14
|
<span style="padding-left: 10px;" v-if="navBar.showBreakpoint">
|
|
14
15
|
<common-chip :spec="chipSpec" />
|
|
@@ -157,7 +158,7 @@ export default {
|
|
|
157
158
|
};
|
|
158
159
|
</script>
|
|
159
160
|
|
|
160
|
-
<style lang="scss" scoped>
|
|
161
|
+
<!-- <style lang="scss" scoped>
|
|
161
162
|
// .v-btn {
|
|
162
163
|
// &.views-button {
|
|
163
164
|
// &.icon {
|
|
@@ -174,8 +175,8 @@ export default {
|
|
|
174
175
|
// box-shadow: none !important;
|
|
175
176
|
// // box-shadow: none;
|
|
176
177
|
// padding-left: 20px;
|
|
177
|
-
// }
|
|
178
|
-
|
|
178
|
+
// }</style>
|
|
179
|
+
-->
|
|
179
180
|
|
|
180
181
|
<!-- Overridable -->
|
|
181
182
|
<style lang="scss" scoped>
|
package/nav/drawer.vue
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<script>
|
|
37
37
|
import NavDrawerButton from "./drawerButton.vue";
|
|
38
38
|
import NavDrawerLabel from "./drawerLabel.vue";
|
|
39
|
-
|
|
39
|
+
import bus from "../utils/eventBus";
|
|
40
40
|
import { useDisplay } from "vuetify";
|
|
41
41
|
|
|
42
42
|
export default {
|
|
@@ -97,11 +97,11 @@ export default {
|
|
|
97
97
|
$ready() {
|
|
98
98
|
this.shrunk = this.mini = this.cssClasses.includes("mini");
|
|
99
99
|
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
$mounted() {
|
|
101
|
+
bus.$on("glib-drawers/toggle", () => {
|
|
102
|
+
this.updateState(!this.state);
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
105
|
updateState(state) {
|
|
106
106
|
this.state = state;
|
|
107
107
|
},
|
package/nav/layout.vue
CHANGED
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
<common-dropdownMenu v-if="btn.childButtons" :key="index" :spec="btn" :disabled="$isBusy" />
|
|
24
24
|
<common-button v-else :key="`right_${index}`" :spec="buttonSpec(btn)" :disabled="$isBusy" />
|
|
25
25
|
</template>
|
|
26
|
-
|
|
26
|
+
</v-toolbar-items>
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
<common-dropdownMenu v-if="showMobileMenu" class="hidden-md-and-up" :spec="mobileMenu" />
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
<views-avatar v-if="navBar.imageUrl" :spec="avatarSpec(navBar)" />
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
<v-btn v-if="viewSourceEnabled()" icon style="color: inherit;" @click="viewSource">
|
|
33
|
+
<v-icon>zoom_in</v-icon>
|
|
34
|
+
</v-btn>
|
|
35
|
+
</v-toolbar> -->
|
|
36
36
|
</div>
|
|
37
37
|
</template>
|
|
38
38
|
|
package/nav/snackbar.vue
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<common-message :spec="spec" />
|
|
6
6
|
|
|
7
7
|
<template v-slot:actions v-if="spec.buttons">
|
|
8
|
-
<v-btn v-for="(button, index) in spec.buttons" :key="index" :color="gcolor" variant="
|
|
8
|
+
<v-btn v-for="(button, index) in spec.buttons" :key="index" :color="gcolor" :variant="variant"
|
|
9
9
|
@click="click(button, $event)">
|
|
10
10
|
{{ button.text }}
|
|
11
11
|
</v-btn>
|
package/package.json
CHANGED
package/store.js
CHANGED
package/utils/history.js
CHANGED
|
@@ -4,6 +4,8 @@ import { useDirtyState } from "../components/composable/dirtyState";
|
|
|
4
4
|
|
|
5
5
|
const { isDirty, clearDirtyState, updateDirtyState } = useDirtyState();
|
|
6
6
|
|
|
7
|
+
let skipRendering = false;
|
|
8
|
+
|
|
7
9
|
export default class {
|
|
8
10
|
static saveInitialContent(content) {
|
|
9
11
|
// History only handles document's scroll position. It doesn't handle our body div's position
|
|
@@ -48,6 +50,11 @@ export default class {
|
|
|
48
50
|
const vm = this;
|
|
49
51
|
let skipOnce = false;
|
|
50
52
|
window.onpopstate = event => {
|
|
53
|
+
if (skipRendering) {
|
|
54
|
+
skipRendering = false
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
|
|
51
58
|
if (isDirty()) {
|
|
52
59
|
event.preventDefault();
|
|
53
60
|
clearDirtyState();
|
|
@@ -100,6 +107,11 @@ export default class {
|
|
|
100
107
|
}
|
|
101
108
|
}
|
|
102
109
|
|
|
110
|
+
static backWithoutRender() {
|
|
111
|
+
skipRendering = true
|
|
112
|
+
this.back()
|
|
113
|
+
}
|
|
114
|
+
|
|
103
115
|
static destroy() {
|
|
104
116
|
if (this.navigationCount <= 0) return false;
|
|
105
117
|
|
package/utils/launch.js
CHANGED
|
@@ -66,7 +66,8 @@ class LaunchPopover {
|
|
|
66
66
|
|
|
67
67
|
computePosition(reference, floating, { placement: placement, middleware: [flip(), offset(offsetSize)] })
|
|
68
68
|
.then(({ x, y }) => {
|
|
69
|
-
|
|
69
|
+
// zIndex should be larger than dialog's, which is 2400.
|
|
70
|
+
Object.assign(placeholder.style, { top: `${y}px`, left: `${x}px`, zIndex: 2500 });
|
|
70
71
|
});
|
|
71
72
|
} else {
|
|
72
73
|
console.error("A popover has to be displayed in a component");
|