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, ">");
|
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>
|
<li>Длительность: ${formatDuration(w.duraion_sec)}</li>
|
||||||
</ul>`;
|
</ul>`;
|
||||||
|
|
||||||
const desc =
|
const desc = w.description
|
||||||
w.description.slice(0, 150) + (w.description.length > 150 ? "…" : "");
|
? w.description.slice(0, 150) + (w.description.length > 150 ? "…" : "")
|
||||||
|
: "";
|
||||||
const metrics = `${formatDistance(w.distantion)} км, ${formatSpeed(w.speed)} км/ч, пульс ${w.heart_rate}, мощность ${w.power} Вт`;
|
const metrics = `${formatDistance(w.distantion)} км, ${formatSpeed(w.speed)} км/ч, пульс ${w.heart_rate}, мощность ${w.power} Вт`;
|
||||||
|
|
||||||
const meta: SeoMeta = {
|
const meta: SeoMeta = {
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ const onResize = () => {
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const token = localStorage.getItem("token");
|
const token = localStorage.getItem("token");
|
||||||
if (!token && useRoute().path != "/explore") {
|
if (!token && useRoute().path != "/explore" && useRoute().path != "/") {
|
||||||
useRouter().push({ name: "login" });
|
useRouter().push({ name: "login" });
|
||||||
}
|
}
|
||||||
window.addEventListener("resize", onResize);
|
window.addEventListener("resize", onResize);
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,11 @@ const routes: Array<RouteRecordRaw> = [
|
||||||
name: "admin",
|
name: "admin",
|
||||||
path: "/",
|
path: "/",
|
||||||
component: AppLayout,
|
component: AppLayout,
|
||||||
redirect: { name: "explore" },
|
|
||||||
children: [
|
children: [
|
||||||
|
{
|
||||||
|
path: "",
|
||||||
|
component: () => import("../pages/LandingRedirect.vue"),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "explore",
|
name: "explore",
|
||||||
path: "explore",
|
path: "explore",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue