ssr
Gitea Actions Demo / build_and_push (push) Failing after 25s
Details
Gitea Actions Demo / build_and_push (push) Failing after 25s
Details
This commit is contained in:
parent
3535873c40
commit
dde4aea2e8
|
|
@ -18,7 +18,8 @@ function getAssetTagsSafe(): string {
|
|||
}
|
||||
}
|
||||
|
||||
function escapeHtml(text: string): string {
|
||||
function escapeHtml(text: string | null | undefined): string {
|
||||
if (!text) return "";
|
||||
return text.replace(/</g, "<").replace(/>/g, ">");
|
||||
}
|
||||
|
||||
|
|
@ -188,8 +189,9 @@ app.get("/public/workouts/:id", async (req: Request, res: Response) => {
|
|||
<li>Длительность: ${formatDuration(w.duraion_sec)}</li>
|
||||
</ul>`;
|
||||
|
||||
const desc =
|
||||
w.description.slice(0, 150) + (w.description.length > 150 ? "…" : "");
|
||||
const desc = w.description
|
||||
? w.description.slice(0, 150) + (w.description.length > 150 ? "…" : "")
|
||||
: "";
|
||||
const metrics = `${formatDistance(w.distantion)} км, ${formatSpeed(w.speed)} км/ч, пульс ${w.heart_rate}, мощность ${w.power} Вт`;
|
||||
|
||||
const meta: SeoMeta = {
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ const onResize = () => {
|
|||
|
||||
onMounted(() => {
|
||||
const token = localStorage.getItem("token");
|
||||
if (!token && useRoute().path != "/explore") {
|
||||
if (!token && useRoute().path != "/explore" && useRoute().path != "/") {
|
||||
useRouter().push({ name: "login" });
|
||||
}
|
||||
window.addEventListener("resize", onResize);
|
||||
|
|
|
|||
|
|
@ -21,8 +21,11 @@ const routes: Array<RouteRecordRaw> = [
|
|||
name: "admin",
|
||||
path: "/",
|
||||
component: AppLayout,
|
||||
redirect: { name: "explore" },
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
component: () => import("../pages/LandingRedirect.vue"),
|
||||
},
|
||||
{
|
||||
name: "explore",
|
||||
path: "explore",
|
||||
|
|
|
|||
Loading…
Reference in New Issue