mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	
							parent
							
								
									a010f4289d
								
							
						
					
					
						commit
						5ca5854594
					
				
					 2 changed files with 21 additions and 0 deletions
				
			
		
							
								
								
									
										16
									
								
								src/components/ClipsPage.vue
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								src/components/ClipsPage.vue
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,16 @@
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					    <ErrorHandler v-if="response && response.error" :message="response.message" :error="response.error" />
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					    activated() {
 | 
				
			||||||
 | 
					        this.fetchJson(this.apiUrl() + "/clips/" + this.$route.params.clipId).then(response => {
 | 
				
			||||||
 | 
					            this.response = response;
 | 
				
			||||||
 | 
					            if (this.response.videoId) {
 | 
				
			||||||
 | 
					                this.$router.push(`/watch?v=${this.response.videoId}`);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
| 
						 | 
					@ -26,6 +26,11 @@ const routes = [
 | 
				
			||||||
        name: "WatchVideo",
 | 
					        name: "WatchVideo",
 | 
				
			||||||
        component: () => import("../components/WatchVideo.vue"),
 | 
					        component: () => import("../components/WatchVideo.vue"),
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        path: "/clip/:clipId",
 | 
				
			||||||
 | 
					        name: "Clips",
 | 
				
			||||||
 | 
					        component: () => import("../components/ClipsPage.vue"),
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        path: "/:path(channel|user|c)/:channelId/:videos?",
 | 
					        path: "/:path(channel|user|c)/:channelId/:videos?",
 | 
				
			||||||
        name: "Channel",
 | 
					        name: "Channel",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue