summaryrefslogtreecommitdiffstats
path: root/src/App.vue
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-10-10 09:46:26 +0200
committerJulius Härtl <jus@bitgrid.net>2018-10-23 22:12:11 +0200
commitd5643d82ab8c8160e205970ca346bfba8a7ad947 (patch)
tree4e12655c10b24d00b6ed85d015a0a3f5f5d479e0 /src/App.vue
parent72655b073486856467f0e57ea31fdbe52d493b6f (diff)
Add vuex structure
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/App.vue')
-rw-r--r--src/App.vue33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/App.vue b/src/App.vue
index d97b47a3..984a0d0f 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -97,26 +97,29 @@
};
},
+ beforeMount: function() {
+ let example = {
+ message: 'Want to #DropDropbox? #DeleteGoogle? #decentralize? We got you covered, easy as a piece of 🥞\n' +
+ '\n' +
+ 'Get started right now: https://nextcloud.com/signup',
+ author: 'Nextcloud 📱☁️💻',
+ authorId: '@nextcloud@mastodon.xyz',
+ authorAvatar: OC.linkTo('social', 'img/nextcloud.png'),
+ timestamp: '1 day ago'
+ };
+ let data = [];
+ for (let i=0; i<20; i++) {
+ example.id = Math.floor((Math.random() * 100));
+ data.push(example);
+ }
+ this.$store.commit('addToTimeline', data);
+ },
computed: {
socialId: function() {
return '@' + OC.getCurrentUser().uid + '@' + OC.getHost();
},
timeline: function() {
- let example = {
- message: 'Want to #DropDropbox? #DeleteGoogle? #decentralize? We got you covered, easy as a piece of 🥞\n' +
- '\n' +
- 'Get started right now: https://nextcloud.com/signup',
- author: 'Nextcloud 📱☁️💻',
- authorId: '@nextcloud@mastodon.xyz',
- authorAvatar: OC.linkTo('social', 'img/nextcloud.png'),
- timestamp: '1 day ago'
- };
- let data = [];
- for (let i=0; i<20; i++) {
- example.id = Math.floor((Math.random() * 100));
- data.push(example);
- }
- return data;
+ return this.$store.getters.getTimeline;
},
menu: function () {
let defaultCategories = [