summaryrefslogtreecommitdiffstats
path: root/src/mixins
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-08-30 13:56:37 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-09-03 15:42:44 +0200
commit5a1b11179d9f0b82d93ff2108751d203aa96556e (patch)
tree722551b44b1b06be5f973c8b08075c2225fd0b8e /src/mixins
parent88510f76d3bb5767bdb5bc754d94caf1a31d67e8 (diff)
Allow to toggle year
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/mixins')
-rw-r--r--src/mixins/ActionsMixin.js32
-rw-r--r--src/mixins/PropertyMixin.js3
2 files changed, 35 insertions, 0 deletions
diff --git a/src/mixins/ActionsMixin.js b/src/mixins/ActionsMixin.js
new file mode 100644
index 00000000..829efc24
--- /dev/null
+++ b/src/mixins/ActionsMixin.js
@@ -0,0 +1,32 @@
+/**
+ * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
+ *
+ * @author John Molakvoæ <skjnldsv@protonmail.com>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+export default {
+ props: {
+ // The current component root
+ component: {
+ type: Object,
+ default: () => {},
+ required: true
+ }
+ }
+}
diff --git a/src/mixins/PropertyMixin.js b/src/mixins/PropertyMixin.js
index 9fa3ed0a..36c57bf5 100644
--- a/src/mixins/PropertyMixin.js
+++ b/src/mixins/PropertyMixin.js
@@ -89,6 +89,9 @@ export default {
computed: {
actions() {
return this.propModel.actions ? this.propModel.actions : []
+ },
+ haveAction() {
+ return this.actions && this.actions.length > 0
}
},