moved onEnter to mounted

This commit is contained in:
booploops 2022-04-11 13:40:05 -07:00
parent 74c42ede84
commit 8616f42978
6 changed files with 22 additions and 5 deletions

View file

@ -167,12 +167,12 @@ export class BrowserWindow {
page: "browsepage",
component: `<cider-browse :data="browsepage"></cider-browse>`,
condition: `page == 'browse'`,
onEnter: `getBrowsePage();`
onEnter: ``
}, {
page: "listen_now",
component: `<cider-listen-now :data="listennow"></cider-listen-now>`,
condition: `page == 'listen_now'`,
onEnter: `getListenNow()`
onEnter: ``
}, {
page: "settings",
component: `<cider-settings></cider-settings>`,
@ -185,17 +185,17 @@ export class BrowserWindow {
page: "library-songs",
component: `<cider-library-songs :data="library.songs"></cider-library-songs>`,
condition: `page == 'library-songs'`,
onEnter: `getLibrarySongsFull()`
onEnter: ``
}, {
page: "library-albums",
component: `<cider-library-albums :data="library.songs"></cider-library-albums>`,
condition: `page == 'library-albums'`,
onEnter: `getLibraryAlbumsFull(null, 1); getAlbumSort(); searchLibraryAlbums(1); getLibrarySongsFull() ;searchLibraryAlbums(1);`
onEnter: ``
}, {
page: "library-artists",
component: `<cider-library-artists></cider-library-artists>`,
condition: `page == 'library-artists'`,
onEnter: `getLibraryArtistsFull(null, 0);`
onEnter: ``
}, {
page: "appleCurator",
component: `<cider-applecurator :data="appleCurator"></cider-applecurator>`,

View file

@ -42,5 +42,8 @@
app: this.$root
}
},
mounted() {
this.$root.getBrowsePage();
}
})
</script>

View file

@ -71,6 +71,13 @@
app : this.$root
}
},
mounted() {
this.$root.getLibraryAlbumsFull(null, 1);
this.$root.getAlbumSort();
this.$root.searchLibraryAlbums(1);
this.$root.getLibrarySongsFull() ;
this.$root.searchLibraryAlbums(1);
},
methods: {
}
});

View file

@ -63,6 +63,7 @@
},
mounted() {
let self = this;
this.$root.getLibraryArtistsFull(null, 0);
this.$root.$on('ap-inlinecollection', function(e){
console.log("hey",e)
self.clready = true;

View file

@ -80,6 +80,9 @@
app : this.$root
}
},
mounted() {
this.$root.getLibrarySongsFull()
},
methods: {
sayHello: function () {
alert('Hello world!');

View file

@ -15,6 +15,9 @@ Vue.component('cider-listen-now', {
return {
app : this.$root
}
},
mounted() {
this.$root.getListenNow()
}
})
</script>