Skip to content

Commit

Permalink
Add home
Browse files Browse the repository at this point in the history
  • Loading branch information
MouJieQin committed Nov 24, 2024
1 parent 9ae8ed4 commit 58b2427
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 40 deletions.
1 change: 1 addition & 0 deletions server/src/varchive-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ async def parseSubtitle(request: Request, path: str = ""):
async def signal_handler(sig, frame):
await WebsocketManager.disconnectAll()


def handle_signal(sig, frame):
print("Received quit signal. Exiting...")
videoEditing.PQueue.cancelAll()
Expand Down
4 changes: 2 additions & 2 deletions spa/src/components/TheNavigation.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div id="navigation">
<a id="logo" href="/video/All">
<router-link id="logo" :to="{ name: 'home' }">
<Logo />
</a>
</router-link>
<router-link :to="{ name: 'video' }">Video</router-link>
<a href="" @click.prevent=" shutdownDialogVisible = true">Backend</a>
<a href="https://github.com/MouJieQin/varchive" target="_blank">Github</a>
Expand Down
72 changes: 35 additions & 37 deletions spa/src/router/index.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,39 @@
import {createRouter, createWebHistory} from 'vue-router'
import { createRouter, createWebHistory } from "vue-router";


const routes =
[
{
path: '/',
name: 'home',
component: () => import('@/views/Video.vue'),
},
{
path: '/video/:path+',
name: 'videop',
component: () => import('@/views/Video.vue'),
props: route => ({...route.params})
},
{
path: '/video',
name: 'video',
component: () => import('@/views/Video.vue'),
const routes = [
{
path: "/",
name: "home",
component: () => import("@/views/Home.vue"),
},
{
path: "/video/:path+",
name: "videop",
component: () => import("@/views/Video.vue"),
props: (route) => ({ ...route.params }),
},
{
path: "/video",
name: "video",
component: () => import("@/views/Video.vue"),
// props: route => ({...route.params}),
},
// {
// path: '/help',
// name: 'help',
// component: () => import('@/views/Help.vue')
// },
{
path: '/:pathMatch(.*)*',
name: 'NotFound',
component: () => import('@/views/NotFound.vue')
}
]
},
// {
// path: '/help',
// name: 'help',
// component: () => import('@/views/Help.vue')
// },
{
path: "/:pathMatch(.*)*",
name: "NotFound",
component: () => import("@/views/NotFound.vue"),
},
];

const router = createRouter({
history: createWebHistory(),
routes,
linkActiveClass: 'varchive-video-active-link'
})
const router = createRouter({
history: createWebHistory(),
routes,
linkActiveClass: "varchive-video-active-link",
});

export default router
export default router;
10 changes: 10 additions & 0 deletions spa/src/views/Home.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<template>
</template>

<script>
export default {
created() {
window.location.href = "/video/All"
}
}
</script>
2 changes: 1 addition & 1 deletion spa/src/views/VideoStatisticsShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default {
title: {
left: '3%',
top: '5%',
// padding: ['10%', '10%', '10%', '10%'],
padding: ['10%', '10%', '10%', '10%'],
text: "",// support \n
},
// tooltip: {
Expand Down

0 comments on commit 58b2427

Please sign in to comment.