ssr
Gitea Actions Demo / build_and_push (push) Successful in 1m15s
Details
Gitea Actions Demo / build_and_push (push) Successful in 1m15s
Details
This commit is contained in:
parent
1fc820e08b
commit
6f223e61d2
|
|
@ -79,7 +79,12 @@ const onResize = () => {
|
|||
|
||||
onMounted(() => {
|
||||
const token = localStorage.getItem("token");
|
||||
if (!token && useRoute().path != "/explore" && useRoute().path != "/") {
|
||||
if (
|
||||
!token &&
|
||||
useRoute().path != "/explore" &&
|
||||
useRoute().path != "/" &&
|
||||
!useRoute().path.startsWith("/public/workouts/")
|
||||
) {
|
||||
useRouter().push({ name: "login" });
|
||||
}
|
||||
window.addEventListener("resize", onResize);
|
||||
|
|
|
|||
|
|
@ -8,11 +8,6 @@ const routes: Array<RouteRecordRaw> = [
|
|||
path: "/dashboard",
|
||||
redirect: { name: "explore" },
|
||||
},
|
||||
{
|
||||
name: "workout_public_item",
|
||||
path: "/public/workouts/:id",
|
||||
component: () => import("../pages/workouts/WorkoutPublicItem.vue"),
|
||||
},
|
||||
{
|
||||
path: "/:pathMatch(.*)*",
|
||||
redirect: { name: "explore" },
|
||||
|
|
@ -36,6 +31,11 @@ const routes: Array<RouteRecordRaw> = [
|
|||
path: "routes",
|
||||
component: () => import("../pages/routes/Route.vue"),
|
||||
},
|
||||
{
|
||||
name: "workout_public_item",
|
||||
path: "public/workouts/:id",
|
||||
component: () => import("../pages/workouts/WorkoutPublicItem.vue"),
|
||||
},
|
||||
{
|
||||
name: "workouts",
|
||||
path: "workouts",
|
||||
|
|
|
|||
Loading…
Reference in New Issue