parent
b32e1b56fa
commit
1ed5ff7caf
|
@ -37,11 +37,10 @@ export const serverLogger = new Logger("server", "gray", false);
|
||||||
const app = new Koa();
|
const app = new Koa();
|
||||||
app.proxy = true;
|
app.proxy = true;
|
||||||
|
|
||||||
// Replace trailing slashes
|
// Replace trailing slashes
|
||||||
app.use(async (ctx, next) => {
|
app.use(async (ctx, next) => {
|
||||||
if (ctx.request.path !== "/" && ctx.request.path.endsWith("/"))
|
if (ctx.request.path !== "/" && ctx.request.path.endsWith('/')) return ctx.redirect(ctx.request.path.replace(/\/$/, ""))
|
||||||
return ctx.redirect(ctx.request.path.replace(/\/$/, ""));
|
else next()
|
||||||
else next();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!["production", "test"].includes(process.env.NODE_ENV || "")) {
|
if (!["production", "test"].includes(process.env.NODE_ENV || "")) {
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div class="hpaizdrt" v-tooltip="capitalize(instance.softwareName)" ref="ticker" :style="bg">
|
||||||
class="hpaizdrt"
|
|
||||||
v-tooltip="capitalize(instance.softwareName)"
|
|
||||||
ref="ticker"
|
|
||||||
:style="bg"
|
|
||||||
>
|
|
||||||
<img class="icon" :src="getInstanceIcon(instance)" aria-hidden="true" />
|
<img class="icon" :src="getInstanceIcon(instance)" aria-hidden="true" />
|
||||||
<span class="name">{{ instance.name }}</span>
|
<span class="name">{{ instance.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -38,7 +33,7 @@ const instance = props.instance ?? {
|
||||||
software: Instance.softwareName || "Calckey",
|
software: Instance.softwareName || "Calckey",
|
||||||
};
|
};
|
||||||
|
|
||||||
const capitalize = (s: string) => s && s[0].toUpperCase() + s.slice(1);
|
const capitalize = (s: string) => s && s[0].toUpperCase() + s.slice(1)
|
||||||
|
|
||||||
const computedStyle = getComputedStyle(document.documentElement);
|
const computedStyle = getComputedStyle(document.documentElement);
|
||||||
const themeColor =
|
const themeColor =
|
||||||
|
|
|
@ -34,15 +34,15 @@
|
||||||
<div class="status">
|
<div class="status">
|
||||||
<div>
|
<div>
|
||||||
<p>{{ i18n.ts.notes }}</p>
|
<p>{{ i18n.ts.notes }}</p>
|
||||||
<MkNumber :value="user.notesCount" />
|
<MkNumber :value="user.notesCount"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>{{ i18n.ts.following }}</p>
|
<p>{{ i18n.ts.following }}</p>
|
||||||
<MkNumber :value="user.followingCount" />
|
<MkNumber :value="user.followingCount"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>{{ i18n.ts.followers }}</p>
|
<p>{{ i18n.ts.followers }}</p>
|
||||||
<MkNumber :value="user.followersCount" />
|
<MkNumber :value="user.followersCount"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<MkFollowButton
|
<MkFollowButton
|
||||||
|
|
|
@ -236,6 +236,9 @@ importers:
|
||||||
koa-mount:
|
koa-mount:
|
||||||
specifier: 4.0.0
|
specifier: 4.0.0
|
||||||
version: 4.0.0
|
version: 4.0.0
|
||||||
|
koa-remove-trailing-slashes:
|
||||||
|
specifier: 2.0.3
|
||||||
|
version: 2.0.3
|
||||||
koa-send:
|
koa-send:
|
||||||
specifier: 5.0.1
|
specifier: 5.0.1
|
||||||
version: 5.0.1
|
version: 5.0.1
|
||||||
|
@ -9858,6 +9861,10 @@ packages:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/koa-remove-trailing-slashes@2.0.3:
|
||||||
|
resolution: {integrity: sha512-NFFF9Sl1wxFo5h0I3OzrHDINdFPaqG+Hx19590F7PNOcmm7yYeFW71p4XicVuSovbcx75GWGb3fi6N6kI6E/3g==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/koa-router@10.1.1:
|
/koa-router@10.1.1:
|
||||||
resolution: {integrity: sha512-z/OzxVjf5NyuNO3t9nJpx7e1oR3FSBAauiwXtMQu4ppcnuNZzTaQ4p21P8A6r2Es8uJJM339oc4oVW+qX7SqnQ==}
|
resolution: {integrity: sha512-z/OzxVjf5NyuNO3t9nJpx7e1oR3FSBAauiwXtMQu4ppcnuNZzTaQ4p21P8A6r2Es8uJJM339oc4oVW+qX7SqnQ==}
|
||||||
engines: {node: '>= 8.0.0'}
|
engines: {node: '>= 8.0.0'}
|
||||||
|
|
Loading…
Reference in New Issue