unclear what this was, saving this so I can wipe the local version of this project

This commit is contained in:
2025-06-12 16:46:06 -04:00
parent 51e5e8c981
commit 4564ca83c1
7 changed files with 110 additions and 16 deletions

View File

@ -4,6 +4,7 @@ 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 VFAVS from "./components/Favorite_Channels.vue";
import './index.css';
import * as DumbYT from "./dumbyt";
@ -11,26 +12,46 @@ let MainApp = new Vue({
el: "#app",
template: `
<div>
<SCH v-on:search_complete="search_completed"/>
<VGC v-bind:Videos="Videos"/>
<VFAVS v-if="VFAVS_Show" v-bind:Videos="Favorite_Videos"/>
<div style="padding-top: 5rem;">
<SCH v-on:search_complete="search_completed"/>
<VGC v-bind:Videos="Videos"/>
</div>
</div>
`,
components: {
VFAVS,
SCH,
VGC
},
data() {
return {
Videos: Array<DumbYT.Video>()
Favorite_Videos: Array<DumbYT.Video>(),
Videos: Array<DumbYT.Video>(),
VFAVS_Show: Boolean()
}
},
methods: {
// Callback for when the search component got results back.
search_completed(videos : Array<DumbYT.Video>) : void {
search_completed(searchstring: string, videos : Array<DumbYT.Video>) : void {
this.VFAVS_Show = searchstring.length == 0;
this.Videos = videos;
}
},
mounted(){
let v: DumbYT.Video = new DumbYT.Video(null);
v.Title = "Test title";
v.Description = "Test description";
v.Thumbnail = "https://i.ytimg.com/vi/LPxqHXyZhNY/mqdefault.jpg";
v.Channel = "Cool Channel"
this.Favorite_Videos.push(v);
this.Favorite_Videos.push(v);
this.Favorite_Videos.push(v);
this.Favorite_Videos.push(v);
this.Favorite_Videos.push(v);
this.Favorite_Videos.push(v);
this.VFAVS_Show = true;
// Populate some Videos immediatly on start up.
DumbYT.API.search_videos("").then(videos => {
// Copy the videos over.
@ -43,9 +64,13 @@ let AdminApp = new Vue({
el: "#admin_app",
template: `
<div>
<SCH v-on:search_complete="search_completed"/>
<CADD/>
<CTBL v-bind:Channels="Channels"/>
<SCH v-on:search_complete="search_completed"/>
<h3 style="padding-top: 3 rem; padding-left: 3rem;">Channels</h3>
<CTBL ID="Channels_All" v-bind:Channels="Channels"/>
<h3 style="padding-top: 3 rem; padding-left: 3rem;">Videos</h3>
<VTBL v-bind:Videos="Videos"/>
</div>
`,