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

View file

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

View file

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

View file

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

View file

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

View file

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