mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	
							parent
							
								
									e4b24043ee
								
							
						
					
					
						commit
						24e58722c9
					
				
					 8 changed files with 29 additions and 10 deletions
				
			
		| 
						 | 
					@ -45,6 +45,7 @@ export default {
 | 
				
			||||||
        this.getChannelData();
 | 
					        this.getChannelData();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    activated() {
 | 
					    activated() {
 | 
				
			||||||
 | 
					        if (this.channel && !this.channel.error) document.title = this.channel.name + " - Piped";
 | 
				
			||||||
        window.addEventListener("scroll", this.handleScroll);
 | 
					        window.addEventListener("scroll", this.handleScroll);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    deactivated() {
 | 
					    deactivated() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,7 +24,8 @@
 | 
				
			||||||
                            v-if="video.duration"
 | 
					                            v-if="video.duration"
 | 
				
			||||||
                            class="uk-label uk-border-rounded uk-position-absolute video-duration"
 | 
					                            class="uk-label uk-border-rounded uk-position-absolute video-duration"
 | 
				
			||||||
                            style="bottom: 5px; right: 5px; background: rgba(0, 0, 0, .75); color: white; padding: 0 5px;"
 | 
					                            style="bottom: 5px; right: 5px; background: rgba(0, 0, 0, .75); color: white; padding: 0 5px;"
 | 
				
			||||||
                            >{{ timeFormat(video.duration) }}</span>
 | 
					                            >{{ timeFormat(video.duration) }}</span
 | 
				
			||||||
 | 
					                        >
 | 
				
			||||||
                    </div>
 | 
					                    </div>
 | 
				
			||||||
                    <p>{{ video.title }}</p>
 | 
					                    <p>{{ video.title }}</p>
 | 
				
			||||||
                </router-link>
 | 
					                </router-link>
 | 
				
			||||||
| 
						 | 
					@ -66,10 +67,11 @@ export default {
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    mounted() {
 | 
					    mounted() {
 | 
				
			||||||
        document.title = "Feed - Piped";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        this.fetchFeed().then(videos => (this.videos = videos));
 | 
					        this.fetchFeed().then(videos => (this.videos = videos));
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    activated() {
 | 
				
			||||||
 | 
					        document.title = "Feed - Piped";
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    methods: {
 | 
					    methods: {
 | 
				
			||||||
        async fetchFeed() {
 | 
					        async fetchFeed() {
 | 
				
			||||||
            return await this.fetchJson(this.apiUrl() + "/feed", {
 | 
					            return await this.fetchJson(this.apiUrl() + "/feed", {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -71,6 +71,7 @@ export default {
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    activated() {
 | 
					    activated() {
 | 
				
			||||||
        if (!this.authenticated) this.$router.push("/login");
 | 
					        if (!this.authenticated) this.$router.push("/login");
 | 
				
			||||||
 | 
					        document.title = "Import - Piped";
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    methods: {
 | 
					    methods: {
 | 
				
			||||||
        fileChange() {
 | 
					        fileChange() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -45,6 +45,9 @@ export default {
 | 
				
			||||||
            this.$router.push("/");
 | 
					            this.$router.push("/");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    activated() {
 | 
				
			||||||
 | 
					        document.title = "Login - Piped";
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    methods: {
 | 
					    methods: {
 | 
				
			||||||
        login() {
 | 
					        login() {
 | 
				
			||||||
            console.log("authToken" + this.hashCode(this.apiUrl()));
 | 
					            console.log("authToken" + this.hashCode(this.apiUrl()));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,8 @@
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
    <div class="uk-flex uk-flex-between uk-flex-middle">
 | 
					    <div class="uk-flex uk-flex-between uk-flex-middle">
 | 
				
			||||||
        <router-link class="uk-button uk-button-text" to="/"><font-awesome-icon icon="chevron-left" />  Back</router-link>
 | 
					        <router-link class="uk-button uk-button-text" to="/"
 | 
				
			||||||
 | 
					            ><font-awesome-icon icon="chevron-left" />  Back</router-link
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
        <span><h1 class="uk-text-bold uk-text-center">Preferences</h1></span>
 | 
					        <span><h1 class="uk-text-bold uk-text-center">Preferences</h1></span>
 | 
				
			||||||
        <span />
 | 
					        <span />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
| 
						 | 
					@ -142,6 +144,9 @@ export default {
 | 
				
			||||||
            showComments: true,
 | 
					            showComments: true,
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    activated() {
 | 
				
			||||||
 | 
					        document.title = "Preferences - Piped";
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    mounted() {
 | 
					    mounted() {
 | 
				
			||||||
        if (Object.keys(this.$route.query).length > 0) this.$router.replace({ query: {} });
 | 
					        if (Object.keys(this.$route.query).length > 0) this.$router.replace({ query: {} });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -45,6 +45,9 @@ export default {
 | 
				
			||||||
            this.$router.push("/");
 | 
					            this.$router.push("/");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    activated() {
 | 
				
			||||||
 | 
					        document.title = "Register - Piped";
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    methods: {
 | 
					    methods: {
 | 
				
			||||||
        register() {
 | 
					        register() {
 | 
				
			||||||
            console.log("authToken" + this.hashCode(this.apiUrl()));
 | 
					            console.log("authToken" + this.hashCode(this.apiUrl()));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,12 +25,13 @@ export default {
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    mounted() {
 | 
					    mounted() {
 | 
				
			||||||
        document.title = "Trending - Piped";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        let region = this.getPreferenceString("region", "US");
 | 
					        let region = this.getPreferenceString("region", "US");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.fetchTrending(region).then(videos => (this.videos = videos));
 | 
					        this.fetchTrending(region).then(videos => (this.videos = videos));
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    activated() {
 | 
				
			||||||
 | 
					        document.title = "Trending - Piped";
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    methods: {
 | 
					    methods: {
 | 
				
			||||||
        async fetchTrending(region) {
 | 
					        async fetchTrending(region) {
 | 
				
			||||||
            return await this.fetchJson(this.apiUrl() + "/trending", {
 | 
					            return await this.fetchJson(this.apiUrl() + "/trending", {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -131,7 +131,10 @@ export default {
 | 
				
			||||||
    activated() {
 | 
					    activated() {
 | 
				
			||||||
        this.active = true;
 | 
					        this.active = true;
 | 
				
			||||||
        this.selectedAutoPlay = this.getPreferenceBoolean("autoplay", true);
 | 
					        this.selectedAutoPlay = this.getPreferenceBoolean("autoplay", true);
 | 
				
			||||||
        if (this.video.duration) this.$refs.videoPlayer.loadVideo();
 | 
					        if (this.video.duration) {
 | 
				
			||||||
 | 
					            document.title = this.video.title + " - Piped";
 | 
				
			||||||
 | 
					            this.$refs.videoPlayer.loadVideo();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        window.addEventListener("scroll", this.handleScroll);
 | 
					        window.addEventListener("scroll", this.handleScroll);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    deactivated() {
 | 
					    deactivated() {
 | 
				
			||||||
| 
						 | 
					@ -244,7 +247,7 @@ export default {
 | 
				
			||||||
        Player,
 | 
					        Player,
 | 
				
			||||||
        VideoItem,
 | 
					        VideoItem,
 | 
				
			||||||
        ErrorHandler,
 | 
					        ErrorHandler,
 | 
				
			||||||
        Comment
 | 
					        Comment,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue