ssr
Gitea Actions Demo / build_and_push (push) Successful in 1m15s Details

This commit is contained in:
artem 2026-09-19 00:49:58 +03:00
parent 1fc820e08b
commit 6f223e61d2
2 changed files with 11 additions and 6 deletions

View File

@ -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);

View File

@ -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",