glib-web 0.13.1 → 0.14.1
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/windows/openWeb.js +0 -0
- package/components/_badge.vue +29 -6
- package/components/_button.vue +19 -23
- package/components/_chip.vue +14 -14
- package/components/_icon.vue +5 -7
- package/components/_message.vue +0 -0
- package/components/avatar.vue +13 -11
- package/components/datetime.vue +0 -0
- package/components/fab.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/text.vue +9 -0
- package/components/fields/timeZone.vue +0 -0
- package/components/hr.vue +0 -0
- package/components/html.vue +0 -0
- package/components/image.vue +13 -12
- 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/mixins/tooltip.js +9 -0
- package/components/p.vue +0 -0
- package/components/panels/form.vue +21 -5
- package/components/tabBar.vue +4 -8
- package/keys.js +0 -0
- package/nav/drawerButton.vue +3 -2
- 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/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
|
|
File without changes
|
package/components/_badge.vue
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-badge
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
:
|
|
6
|
-
:value="spec.badgeContent || false"
|
|
3
|
+
:color="badge.backgroundColor || 'red'"
|
|
4
|
+
overlap
|
|
5
|
+
:value="badgeExists()"
|
|
7
6
|
>
|
|
7
|
+
<template v-slot:badge>{{ badge.text }}</template>
|
|
8
|
+
<slot />
|
|
8
9
|
</v-badge>
|
|
9
10
|
</template>
|
|
10
11
|
|
|
@@ -12,12 +13,34 @@
|
|
|
12
13
|
export default {
|
|
13
14
|
props: {
|
|
14
15
|
spec: { type: Object, required: true }
|
|
16
|
+
},
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
badge: {}
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
methods: {
|
|
23
|
+
$ready() {
|
|
24
|
+
this.badge = this.spec.badge || {};
|
|
25
|
+
},
|
|
26
|
+
badgeExists() {
|
|
27
|
+
var exists = false;
|
|
28
|
+
Utils.type.ifString(this.badge.text, text => {
|
|
29
|
+
exists = text.length > 0;
|
|
30
|
+
});
|
|
31
|
+
return exists;
|
|
32
|
+
}
|
|
15
33
|
}
|
|
16
34
|
};
|
|
17
35
|
</script>
|
|
18
36
|
|
|
19
|
-
<style scoped>
|
|
37
|
+
<style lang="scss" scoped>
|
|
20
38
|
.v-badge {
|
|
21
|
-
|
|
39
|
+
// So that it behaves like other components (e.g. v-btn). Without this, nav bar buttons will
|
|
40
|
+
// not align middle.
|
|
41
|
+
display: inline-flex;
|
|
42
|
+
|
|
43
|
+
// To support responsive v-img.
|
|
44
|
+
max-width: 100%;
|
|
22
45
|
}
|
|
23
46
|
</style>
|
package/components/_button.vue
CHANGED
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<span><common-icon :spec="spec.icon || {}"/></span>
|
|
19
|
-
<v-badge
|
|
20
|
-
:color="spec.badgeColor || 'red'"
|
|
21
|
-
:content="spec.badgeContent"
|
|
22
|
-
:value="spec.badgeContent || false"
|
|
2
|
+
<common-badge :spec="spec">
|
|
3
|
+
<v-btn
|
|
4
|
+
:type="type"
|
|
5
|
+
:disabled="disabled || $isBusy || spec.disabled"
|
|
6
|
+
:style="styles()"
|
|
7
|
+
:class="$classes()"
|
|
8
|
+
:href="$href()"
|
|
9
|
+
:rel="$rel()"
|
|
10
|
+
:text="linkStyling || $classes().includes('text')"
|
|
11
|
+
:small="linkStyling"
|
|
12
|
+
:icon="$classes().includes('icon')"
|
|
13
|
+
:outlined="$classes().includes('outlined')"
|
|
14
|
+
:tile="$classes().includes('tile')"
|
|
15
|
+
:rounded="$classes().includes('rounded')"
|
|
16
|
+
:depressed="$classes().includes('depressed')"
|
|
17
|
+
@click="type == 'submit' ? null : $onClick()"
|
|
23
18
|
>
|
|
19
|
+
<span><common-icon :spec="spec.icon || {}"/></span>
|
|
24
20
|
<div :class="hideTextOnXs && spec.icon ? 'd-none d-sm-flex' : null">
|
|
25
21
|
{{ spec.text }}
|
|
26
22
|
</div>
|
|
27
|
-
</v-
|
|
28
|
-
</
|
|
23
|
+
</v-btn>
|
|
24
|
+
</common-badge>
|
|
29
25
|
</template>
|
|
30
26
|
|
|
31
27
|
<script>
|
package/components/_chip.vue
CHANGED
|
@@ -8,20 +8,20 @@
|
|
|
8
8
|
>
|
|
9
9
|
<template v-slot:activator="{ on }">
|
|
10
10
|
<span v-on="on">
|
|
11
|
-
<
|
|
12
|
-
v-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</
|
|
11
|
+
<common-badge :spec="spec">
|
|
12
|
+
<v-chip
|
|
13
|
+
v-if="spec.onClick"
|
|
14
|
+
:style="genericStyles()"
|
|
15
|
+
:class="$classes()"
|
|
16
|
+
:href="$href()"
|
|
17
|
+
@click="$onClick()"
|
|
18
|
+
>
|
|
19
|
+
{{ spec.text }}
|
|
20
|
+
</v-chip>
|
|
21
|
+
<v-chip v-else :style="genericStyles()" :class="$classes()">
|
|
22
|
+
{{ spec.text }}
|
|
23
|
+
</v-chip>
|
|
24
|
+
</common-badge>
|
|
25
25
|
</span>
|
|
26
26
|
</template>
|
|
27
27
|
<span>{{ tooltip.text }}</span>
|
package/components/_icon.vue
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
value
|
|
8
|
-
}}</v-icon>
|
|
2
|
+
<common-badge :spec="spec">
|
|
3
|
+
<v-icon :style="genericStyles()" :size="size" :color="color">{{
|
|
4
|
+
value
|
|
5
|
+
}}</v-icon>
|
|
6
|
+
</common-badge>
|
|
9
7
|
</template>
|
|
10
8
|
|
|
11
9
|
<script>
|
package/components/_message.vue
CHANGED
|
File without changes
|
package/components/avatar.vue
CHANGED
|
@@ -7,14 +7,17 @@
|
|
|
7
7
|
:left="tooltipPositionMatches('left')"
|
|
8
8
|
>
|
|
9
9
|
<template v-slot:activator="{ on }">
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
<common-badge :spec="spec">
|
|
11
|
+
<v-avatar
|
|
12
|
+
:style="genericStyles()"
|
|
13
|
+
:class="$classes()"
|
|
14
|
+
:size="spec.size"
|
|
15
|
+
v-on="on"
|
|
16
|
+
>
|
|
17
|
+
<v-img :src="spec.url || spec.base64Data" @click="$onClick()">
|
|
18
|
+
</v-img>
|
|
19
|
+
</v-avatar>
|
|
20
|
+
</common-badge>
|
|
18
21
|
</template>
|
|
19
22
|
<span>{{ tooltip.text }}</span>
|
|
20
23
|
</v-tooltip>
|
|
@@ -30,13 +33,12 @@ export default {
|
|
|
30
33
|
},
|
|
31
34
|
data() {
|
|
32
35
|
return {
|
|
33
|
-
styles: {}
|
|
34
|
-
tooltip: {}
|
|
36
|
+
styles: {}
|
|
35
37
|
};
|
|
36
38
|
},
|
|
37
39
|
methods: {
|
|
38
40
|
$ready() {
|
|
39
|
-
this
|
|
41
|
+
this.$initAccessories();
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
};
|
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
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
:autofocus="spec.autoFocus || false"
|
|
24
24
|
validate-on-blur
|
|
25
25
|
@click:append="onRightIconClick"
|
|
26
|
+
@input="onChange"
|
|
26
27
|
/>
|
|
27
28
|
<input
|
|
28
29
|
v-if="spec.readOnly"
|
|
@@ -123,6 +124,14 @@ export default {
|
|
|
123
124
|
},
|
|
124
125
|
classes() {
|
|
125
126
|
return this.$classes().concat("g-text-field--hintless");
|
|
127
|
+
},
|
|
128
|
+
// TODO: Consider using debounce to wait until user has finished typing.
|
|
129
|
+
onChange() {
|
|
130
|
+
Utils.type.ifObject(this.spec.onChange, onChange => {
|
|
131
|
+
this.$nextTick(() => {
|
|
132
|
+
GLib.action.execute(onChange, this);
|
|
133
|
+
});
|
|
134
|
+
});
|
|
126
135
|
}
|
|
127
136
|
}
|
|
128
137
|
};
|
|
File without changes
|
package/components/hr.vue
CHANGED
|
File without changes
|
package/components/html.vue
CHANGED
|
File without changes
|
package/components/image.vue
CHANGED
|
@@ -7,15 +7,17 @@
|
|
|
7
7
|
:left="tooltipPositionMatches('left')"
|
|
8
8
|
>
|
|
9
9
|
<template v-slot:activator="{ on }">
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
<common-badge :spec="spec">
|
|
11
|
+
<!-- TODO: Add support for href and :rel="$rel()" -->
|
|
12
|
+
<v-img
|
|
13
|
+
:src="spec.url || spec.base64Data"
|
|
14
|
+
:style="styles"
|
|
15
|
+
v-on="on"
|
|
16
|
+
@click="$onClick()"
|
|
17
|
+
>
|
|
18
|
+
<!-- <v-progress-circular v-if="$isBusy" indeterminate /> -->
|
|
19
|
+
</v-img>
|
|
20
|
+
</common-badge>
|
|
19
21
|
</template>
|
|
20
22
|
<span>{{ tooltip.text }}</span>
|
|
21
23
|
</v-tooltip>
|
|
@@ -32,13 +34,12 @@ export default {
|
|
|
32
34
|
},
|
|
33
35
|
data() {
|
|
34
36
|
return {
|
|
35
|
-
styles: {}
|
|
36
|
-
tooltip: {}
|
|
37
|
+
styles: {}
|
|
37
38
|
};
|
|
38
39
|
},
|
|
39
40
|
methods: {
|
|
40
41
|
$ready() {
|
|
41
|
-
this
|
|
42
|
+
this.$initAccessories();
|
|
42
43
|
|
|
43
44
|
const styles = this.genericStyles(Object.assign({}, this.spec));
|
|
44
45
|
this.styles = styles;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
// TODO: Make tooltip reusable component. See _badge.vue
|
|
1
2
|
export default {
|
|
3
|
+
data() {
|
|
4
|
+
return {
|
|
5
|
+
tooltip: {}
|
|
6
|
+
};
|
|
7
|
+
},
|
|
2
8
|
methods: {
|
|
9
|
+
$initAccessories() {
|
|
10
|
+
this.tooltip = this.spec.tooltip || { disabled: true };
|
|
11
|
+
},
|
|
3
12
|
tooltipPositionMatches(position) {
|
|
4
13
|
if (this.spec.tooltip && this.spec.tooltip.position) {
|
|
5
14
|
return position == this.spec.tooltip.position;
|
package/components/p.vue
CHANGED
|
File without changes
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-form
|
|
3
|
-
|
|
2
|
+
<v-form
|
|
3
|
+
ref="form"
|
|
4
|
+
:style="parentStyles"
|
|
5
|
+
:action="url"
|
|
6
|
+
:method="spec.method"
|
|
7
|
+
:data-local="spec.local"
|
|
8
|
+
@submit="onSubmit"
|
|
9
|
+
>
|
|
4
10
|
<template v-for="(value, key, index) in params">
|
|
5
|
-
<input
|
|
11
|
+
<input
|
|
12
|
+
:key="`hidden_${index}`"
|
|
13
|
+
type="hidden"
|
|
14
|
+
:name="key"
|
|
15
|
+
:value="value"
|
|
16
|
+
/>
|
|
6
17
|
</template>
|
|
7
18
|
|
|
8
19
|
<panels-responsive :spec="modifiedSpec" />
|
|
@@ -25,19 +36,24 @@ export default {
|
|
|
25
36
|
modifiedSpec: {}
|
|
26
37
|
}),
|
|
27
38
|
watch: {
|
|
28
|
-
$isBusy: function
|
|
39
|
+
$isBusy: function(val, oldVal) {
|
|
29
40
|
for (const button of this.submitButtons) {
|
|
30
41
|
button._isBusy = val;
|
|
31
42
|
}
|
|
32
43
|
}
|
|
33
44
|
},
|
|
45
|
+
// Event registrations should not be in $ready() because they are not idempotent. $ready() might get executed
|
|
46
|
+
// On the other hand,
|
|
47
|
+
// logics that rely on `spec` should be in $ready() because they need to be up-to-date and they are
|
|
48
|
+
// idempotent.
|
|
49
|
+
// TODO: Check why $ready() gets called if URL hasn't changed.
|
|
34
50
|
mounted() {
|
|
35
51
|
this.$onEvent("forms/directSubmit", e => {
|
|
36
52
|
this.directSubmit();
|
|
37
53
|
});
|
|
38
54
|
},
|
|
39
55
|
methods: {
|
|
40
|
-
$ready: function
|
|
56
|
+
$ready: function() {
|
|
41
57
|
this.$onEvent("forms/addSubmit", e => {
|
|
42
58
|
this.submitButtons.push(e.data);
|
|
43
59
|
});
|
package/components/tabBar.vue
CHANGED
|
@@ -15,14 +15,10 @@
|
|
|
15
15
|
:href="$href(item)"
|
|
16
16
|
@click="$onClick($event, item)"
|
|
17
17
|
>
|
|
18
|
-
<
|
|
19
|
-
:color="item.badgeColor || 'red'"
|
|
20
|
-
:content="item.badgeContent"
|
|
21
|
-
:value="item.badgeContent || false"
|
|
22
|
-
>
|
|
18
|
+
<common-badge :spec="item">
|
|
23
19
|
<common-icon v-if="item.icon" :spec="item.icon" />
|
|
24
20
|
<span :style="{ color: spec.color }">{{ item.text }}</span>
|
|
25
|
-
</
|
|
21
|
+
</common-badge>
|
|
26
22
|
</v-tab>
|
|
27
23
|
</v-tabs>
|
|
28
24
|
<v-divider />
|
|
@@ -61,8 +57,8 @@ export default {
|
|
|
61
57
|
.no-divider .v-divider {
|
|
62
58
|
display: none;
|
|
63
59
|
}
|
|
64
|
-
.v-badge {
|
|
60
|
+
/* .v-badge {
|
|
65
61
|
top: 50%;
|
|
66
62
|
transform: translate(0, -50%);
|
|
67
|
-
}
|
|
63
|
+
} */
|
|
68
64
|
</style>
|
package/keys.js
CHANGED
|
File without changes
|
package/nav/drawerButton.vue
CHANGED
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
|
|
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
|