Cleaned up dumbyt.ts a bit and fixed add channel
This commit is contained in:
14
src/index.ts
14
src/index.ts
@ -5,7 +5,7 @@ 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 { Video, search_videos, Channel, search_channels } from "./dumbyt";
|
||||
import * as DumbYT from "./dumbyt";
|
||||
|
||||
let MainApp = new Vue({
|
||||
el: "#app",
|
||||
@ -21,12 +21,12 @@ let MainApp = new Vue({
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Videos: Array<Video>()
|
||||
Videos: Array<DumbYT.Video>()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// Callback for when the search component got results back.
|
||||
search_completed(videos : Array<Video>) : void {
|
||||
search_completed(videos : Array<DumbYT.Video>) : void {
|
||||
this.Videos = videos;
|
||||
}
|
||||
}
|
||||
@ -50,18 +50,18 @@ let AdminApp = new Vue({
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Videos: Array<Video>(),
|
||||
Channels: Array<Channel>()
|
||||
Videos: Array<DumbYT.Video>(),
|
||||
Channels: Array<DumbYT.Channel>()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// Callback for when the search component got results back.
|
||||
search_completed(videos : Array<Video>) : void {
|
||||
search_completed(videos : Array<DumbYT.Video>) : void {
|
||||
this.Videos = videos;
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
// Populate the channels field immediatly on start up.
|
||||
search_channels("").then(channels => this.Channels = channels);
|
||||
DumbYT.API.search_channels("").then(channels => this.Channels = channels);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user