glib-web 0.8.3 → 0.8.4
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/LICENSE +0 -0
- package/actions/auth/restart.js +0 -0
- package/actions/dialogs/oauth.js +0 -0
- package/actions/dialogs/options.js +0 -0
- package/actions/sheets/select.js +0 -0
- package/actions/snackbars/alert.js +0 -0
- package/actions/snackbars/select.js +0 -0
- package/actions/windows/openWeb.js +0 -0
- package/components/_message.vue +0 -0
- package/components/datetime.vue +0 -0
- package/components/fab.vue +0 -0
- package/components/fields/_select.vue +0 -0
- package/components/fields/country/countries.js +0 -0
- package/components/fields/country/field.vue +0 -0
- package/components/fields/country/regions.js +0 -0
- package/components/fields/datetime.vue +0 -0
- package/components/fields/dynamicSelect.vue +0 -0
- package/components/fields/select.vue +0 -0
- package/components/fields/timeZone.vue +0 -0
- package/components/hr.vue +0 -0
- package/components/html.vue +0 -0
- package/components/image.vue +0 -0
- package/components/mixins/list/autoload.js +51 -31
- package/components/mixins/longClick.js +0 -0
- package/components/mixins/scrolling.js +0 -0
- package/components/mixins/table/export.js +0 -0
- package/components/mixins/table/import.js +0 -0
- package/components/p.vue +0 -0
- package/components/panels/column.vue +0 -0
- package/components/panels/custom.vue +0 -0
- package/components/panels/horizontal.vue +0 -0
- package/components/panels/list.vue +9 -3
- package/components/panels/split.vue +0 -0
- package/components/panels/ul.vue +0 -0
- package/extensions/array.js +4 -0
- package/keys.js +0 -0
- package/nav/drawer.vue +2 -1
- package/nav/drawerButton.vue +0 -0
- package/package.json +1 -1
- package/settings.json.example +0 -0
- package/styles/test.sass +0 -0
- package/styles/test.scss +0 -0
- package/templates/featured.vue +0 -0
- package/templates/unsupported.vue +0 -0
- package/utils/dom.js +0 -0
- package/utils/public.js +0 -0
- package/utils/settings.js +0 -0
- package/utils/storage.js +0 -0
- package/utils/url.js +0 -0
package/LICENSE
CHANGED
|
File without changes
|
package/actions/auth/restart.js
CHANGED
|
File without changes
|
package/actions/dialogs/oauth.js
CHANGED
|
File without changes
|
|
File without changes
|
package/actions/sheets/select.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/components/_message.vue
CHANGED
|
File without changes
|
package/components/datetime.vue
CHANGED
|
File without changes
|
package/components/fab.vue
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/components/hr.vue
CHANGED
|
File without changes
|
package/components/html.vue
CHANGED
|
File without changes
|
package/components/image.vue
CHANGED
|
File without changes
|
|
@@ -9,13 +9,13 @@ export default {
|
|
|
9
9
|
infiniteScroll: null
|
|
10
10
|
};
|
|
11
11
|
},
|
|
12
|
-
computed: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
12
|
+
// computed: {
|
|
13
|
+
// bottomAnchorStyles() {
|
|
14
|
+
// return {
|
|
15
|
+
// display: this.infiniteScroll && this.nextPageUrl ? "block" : "none"
|
|
16
|
+
// };
|
|
17
|
+
// }
|
|
18
|
+
// },
|
|
19
19
|
methods: {
|
|
20
20
|
enableInfiniteScrollIfApplicable: function() {
|
|
21
21
|
this.$removeViewportChangeListeners(this.topScrollHandler);
|
|
@@ -24,23 +24,8 @@ export default {
|
|
|
24
24
|
const prevPage = this.spec.prevPage || {};
|
|
25
25
|
const nextPage = this.spec.nextPage || {};
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// if (infiniteScroll) {
|
|
30
|
-
// const nextPageUrl = nextPage.url;
|
|
31
|
-
// const onScrollToBottom = this.spec.onScrollToBottom;
|
|
32
|
-
// if (nextPageUrl || onScrollToBottom) {
|
|
33
|
-
// this._registerBottomScroll(nextPageUrl, onScrollToBottom);
|
|
34
|
-
// }
|
|
35
|
-
|
|
36
|
-
// const prevPageUrl = prevPage.url;
|
|
37
|
-
// const onScrollToTop = this.spec.onScrollToTop;
|
|
38
|
-
// if (prevPageUrl || onScrollToTop) {
|
|
39
|
-
// this._registerTopScroll(prevPageUrl, onScrollToTop);
|
|
40
|
-
// }
|
|
41
|
-
// }
|
|
42
|
-
|
|
43
|
-
this.infiniteScroll = nextPage.autoload == "asNeeded";
|
|
27
|
+
this.infiniteScroll =
|
|
28
|
+
nextPage.autoload == "asNeeded" || prevPage.autoload == "asNeeded";
|
|
44
29
|
const onScrollToBottom = this.spec.onScrollToBottom;
|
|
45
30
|
const onScrollToTop = this.spec.onScrollToTop;
|
|
46
31
|
|
|
@@ -49,16 +34,18 @@ export default {
|
|
|
49
34
|
this.prevPageUrl = prevPage.url;
|
|
50
35
|
}
|
|
51
36
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
37
|
+
// Avoid executing the scroll actions on page load.
|
|
38
|
+
setTimeout(() => {
|
|
39
|
+
if (this.nextPageUrl || onScrollToBottom) {
|
|
40
|
+
this._registerBottomScroll(onScrollToBottom);
|
|
41
|
+
}
|
|
55
42
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
if (this.prevPageUrl || onScrollToTop) {
|
|
44
|
+
this._registerTopScroll(onScrollToTop);
|
|
45
|
+
}
|
|
46
|
+
}, 1000);
|
|
59
47
|
},
|
|
60
48
|
_registerTopScroll(onScrollToTop) {
|
|
61
|
-
// TODO: Consider adding support for prevPageUrl
|
|
62
49
|
this.topScrollHandler = this.$onVisibilityChange(
|
|
63
50
|
this.$refs.topAnchor,
|
|
64
51
|
(el, visible) => {
|
|
@@ -71,6 +58,39 @@ export default {
|
|
|
71
58
|
this.$addViewportChangeListeners(this.topScrollHandler);
|
|
72
59
|
},
|
|
73
60
|
_handleTopScroll(onScrollToTop) {
|
|
61
|
+
if (this.prevPageUrl) {
|
|
62
|
+
this.request = Utils.http.execute(
|
|
63
|
+
{ url: this.prevPageUrl },
|
|
64
|
+
"GET",
|
|
65
|
+
this,
|
|
66
|
+
response => {
|
|
67
|
+
const prevPage = response.prevPage;
|
|
68
|
+
if (this.$type.isObject(prevPage)) {
|
|
69
|
+
this.prevPageUrl = response.prevPage.url;
|
|
70
|
+
} else {
|
|
71
|
+
this.prevPageUrl = null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
for (const [
|
|
75
|
+
index,
|
|
76
|
+
prependedSection
|
|
77
|
+
] of response.sections.entries()) {
|
|
78
|
+
const section = this.sections[index];
|
|
79
|
+
|
|
80
|
+
Utils.type.ifArray(prependedSection.rows, rows => {
|
|
81
|
+
for (const row of rows) {
|
|
82
|
+
section.rows.unshift(row);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
// TODO: scroll back to where the position was before the prepending.
|
|
87
|
+
// https://stackoverflow.com/questions/54765451/preserve-scroll-position-on-dom-update-in-vue-js
|
|
88
|
+
}
|
|
89
|
+
Utils.history.updatePage();
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
74
94
|
GLib.action.execute(onScrollToTop, this);
|
|
75
95
|
},
|
|
76
96
|
_registerBottomScroll(onScrollToBottom) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/components/p.vue
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
class="py-0"
|
|
6
6
|
:style="genericStyles()"
|
|
7
7
|
>
|
|
8
|
-
<div ref="topAnchor"
|
|
8
|
+
<div ref="topAnchor">
|
|
9
|
+
<div v-if="prevPageUrl" class="py-3 px-4">
|
|
10
|
+
Loading...
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
9
13
|
|
|
10
14
|
<template v-for="(section, sectionIndex) in sections">
|
|
11
15
|
<div :key="`section${sectionIndex}`">
|
|
@@ -46,8 +50,10 @@
|
|
|
46
50
|
</div>
|
|
47
51
|
</template>
|
|
48
52
|
|
|
49
|
-
<div ref="bottomAnchor"
|
|
50
|
-
|
|
53
|
+
<div ref="bottomAnchor">
|
|
54
|
+
<div v-if="nextPageUrl" class="py-3 px-4">
|
|
55
|
+
Loading...
|
|
56
|
+
</div>
|
|
51
57
|
</div>
|
|
52
58
|
</v-list>
|
|
53
59
|
</template>
|
|
File without changes
|
package/components/panels/ul.vue
CHANGED
|
File without changes
|
package/extensions/array.js
CHANGED
package/keys.js
CHANGED
|
File without changes
|
package/nav/drawer.vue
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:mini-variant.sync="mini"
|
|
14
14
|
@input="updateState"
|
|
15
15
|
>
|
|
16
|
-
<template v-slot:prepend>
|
|
16
|
+
<template v-if="mini" v-slot:prepend>
|
|
17
17
|
<v-list-item>
|
|
18
18
|
<v-list-item-icon>
|
|
19
19
|
<v-icon v-if="!mini">mdi-chevron-left</v-icon>
|
|
@@ -167,6 +167,7 @@ export default {
|
|
|
167
167
|
},
|
|
168
168
|
methods: {
|
|
169
169
|
$ready() {
|
|
170
|
+
this.mini = !this.cssClasses.includes("maxi");
|
|
170
171
|
this.updateNavigationStyle(window.location);
|
|
171
172
|
|
|
172
173
|
// this.$el.addEventListener('drawers/clickButton', () => { this.updateState(false) }, false)
|
package/nav/drawerButton.vue
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/settings.json.example
CHANGED
|
File without changes
|
package/styles/test.sass
CHANGED
|
File without changes
|
package/styles/test.scss
CHANGED
|
File without changes
|
package/templates/featured.vue
CHANGED
|
File without changes
|
|
File without changes
|
package/utils/dom.js
CHANGED
|
File without changes
|
package/utils/public.js
CHANGED
|
File without changes
|
package/utils/settings.js
CHANGED
|
File without changes
|
package/utils/storage.js
CHANGED
|
File without changes
|
package/utils/url.js
CHANGED
|
File without changes
|