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.
@@ -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>
@@ -51,7 +51,7 @@ export default {
51
51
  rules: [
52
52
  v =>
53
53
  !v ||
54
- /^\w+([.-\\+]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) ||
54
+ /^\w+([.-\\+]?\w+)*@\w+([.-]?\w+)*(\.\w{2,5})+$/.test(v) ||
55
55
  "E-mail must be valid"
56
56
  ]
57
57
  },
@@ -32,6 +32,7 @@ export default {
32
32
  this.text = this.spec.text;
33
33
  },
34
34
  action_set(spec) {
35
+ console.log(spec);
35
36
  if (spec.user_id !== spec.filterKey) {
36
37
  this.text = spec.text;
37
38
  }
@@ -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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glib-web",
3
- "version": "0.6.5",
3
+ "version": "0.6.11",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {