glib-web 0.6.5 → 0.6.11
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/_icon.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-badge v-if="badge.text" :color="badge.backgroundColor" overlap>
|
|
2
|
+
<v-badge v-if="badge.text" :color="badge.backgroundColor || 'red'" overlap>
|
|
3
3
|
<template v-slot:badge>{{ badge.text }}</template>
|
|
4
4
|
<v-icon :style="genericStyles()" :size="size">{{ value }}</v-icon>
|
|
5
5
|
</v-badge>
|
package/components/label.vue
CHANGED
package/components/markdown.vue
CHANGED
|
@@ -32,6 +32,13 @@ export default {
|
|
|
32
32
|
this.youtubeId = this.extractYoutubeId(this.spec.text);
|
|
33
33
|
console.log("Detected Youtube ID", this.youtubeId);
|
|
34
34
|
}
|
|
35
|
+
// Set all links to be openWeb or open in a new tab by default
|
|
36
|
+
if (!this.spec.openWeb) {
|
|
37
|
+
let anchors = document.querySelectorAll('a');
|
|
38
|
+
for (let i = 0; i < anchors.length; i++) {
|
|
39
|
+
anchors[i].setAttribute('target', '_blank')
|
|
40
|
+
}
|
|
41
|
+
}
|
|
35
42
|
},
|
|
36
43
|
// From https://gist.github.com/takien/4077195
|
|
37
44
|
extractYoutubeId(url) {
|
|
@@ -10,7 +10,7 @@ export default {
|
|
|
10
10
|
// Submit button needs to be disabled when redirecting after form submission
|
|
11
11
|
_isBusy: false,
|
|
12
12
|
_events: [],
|
|
13
|
-
_typingTimer: null
|
|
13
|
+
_typingTimer: null,
|
|
14
14
|
};
|
|
15
15
|
},
|
|
16
16
|
computed: {
|
|
@@ -23,7 +23,7 @@ export default {
|
|
|
23
23
|
},
|
|
24
24
|
$isReady() {
|
|
25
25
|
return this.$data._events === null;
|
|
26
|
-
}
|
|
26
|
+
},
|
|
27
27
|
},
|
|
28
28
|
mounted() {
|
|
29
29
|
this._executeIfReady(false);
|
|
@@ -41,7 +41,7 @@ export default {
|
|
|
41
41
|
"$root.vueApp.isStale": function(val, oldVal) {
|
|
42
42
|
// Make sure $ready() will be called in the next update
|
|
43
43
|
this._mountedUrl = null;
|
|
44
|
-
}
|
|
44
|
+
},
|
|
45
45
|
},
|
|
46
46
|
methods: {
|
|
47
47
|
$href: function(spec) {
|
|
@@ -169,9 +169,9 @@ export default {
|
|
|
169
169
|
this._typingTimer = null;
|
|
170
170
|
GLib.action.execute(this.spec.onTypeEnd, this);
|
|
171
171
|
}, duration);
|
|
172
|
-
}
|
|
172
|
+
},
|
|
173
173
|
// $onZero() {
|
|
174
174
|
// GLib.action.execute(this.spec.onZero, null, this);
|
|
175
175
|
// },
|
|
176
|
-
}
|
|
176
|
+
},
|
|
177
177
|
};
|