import Vue from "vue"; import VGC from "./components/Video_Grid.vue"; import SCH from "./components/Search.vue"; import VTBL from "./components/Video_Table.vue"; import CTBL from "./components/Channel_Table.vue"; import CADD from "./components/Channel_Add.vue"; import './index.css'; import * as DumbYT from "./dumbyt"; let MainApp = new Vue({ el: "#app", template: `
`, components: { SCH, VGC }, data() { return { Videos: Array() } }, methods: { // Callback for when the search component got results back. search_completed(videos : Array) : void { this.Videos = videos; } }, mounted(){ // Populate some Videos immediatly on start up. DumbYT.API.search_videos("").then(videos => { // Copy the videos over. this.Videos = videos; }); } }); let AdminApp = new Vue({ el: "#admin_app", template: `
`, components: { SCH, CADD, CTBL, VTBL }, data() { return { Videos: Array(), Channels: Array() } }, methods: { // Callback for when the search component got results back. search_completed(videos : Array) : void { this.Videos = videos; } }, mounted(){ // Populate the channels field immediatly on start up. DumbYT.API.search_channels("").then(channels => this.Channels = channels); } });