mirror of
https://github.com/Elysola/WebHooker.git
synced 2026-11-20 17:13:49 +00:00
chore: auto-fix lint & formatting [skip ci]
This commit is contained in:
1 parent
fbbff669a3
commit
37d2eb3636
13 files changed
+840
-97
No files matched your search
@@ -74,7 +74,7 @@ bunx wrangler dev # Start local dev server
|
|||||||
| `FEISHU_APP_SECRET` | Feishu app secret — required for Feishu routes |
|
| `FEISHU_APP_SECRET` | Feishu app secret — required for Feishu routes |
|
||||||
| `BASE_URL` | Public URL for OAuth callbacks and the Telegram webhook sync |
|
| `BASE_URL` | Public URL for OAuth callbacks and the Telegram webhook sync |
|
||||||
| `ADMIN_USER_IDS` | Comma-separated GitHub user IDs (or logins) allowed to access `/admin` |
|
| `ADMIN_USER_IDS` | Comma-separated GitHub user IDs (or logins) allowed to access `/admin` |
|
||||||
| `DEBUG_MODE` | Local development only: set to exact `true` to bypass all `/admin` authentication |
|
| `DEBUG_MODE` | Local development only: set to exact `true` to bypass all `/admin` authentication |
|
||||||
| `ALLOW_SELF_SIGNUP` | `1` to give access-less GitHub users a personal group on first login (default off) |
|
| `ALLOW_SELF_SIGNUP` | `1` to give access-less GitHub users a personal group on first login (default off) |
|
||||||
| `AUDIT_RETENTION_DAYS` | Audit-log retention in days for the scheduled cleanup (default 90) |
|
| `AUDIT_RETENTION_DAYS` | Audit-log retention in days for the scheduled cleanup (default 90) |
|
||||||
| `NUXT_PUBLIC_DOCS_URL` | Optional docs site URL used by the landing page |
|
| `NUXT_PUBLIC_DOCS_URL` | Optional docs site URL used by the landing page |
|
||||||
|
|||||||
+1
-1
@@ -74,7 +74,7 @@ bunx wrangler dev # 启动本地开发服务器
|
|||||||
| `FEISHU_APP_SECRET` | 飞书应用密钥 —— 飞书路由必需 |
|
| `FEISHU_APP_SECRET` | 飞书应用密钥 —— 飞书路由必需 |
|
||||||
| `BASE_URL` | 公网地址(用于 OAuth 回调与 Telegram webhook 同步) |
|
| `BASE_URL` | 公网地址(用于 OAuth 回调与 Telegram webhook 同步) |
|
||||||
| `ADMIN_USER_IDS` | 允许访问 `/admin` 的 GitHub 用户 ID(或登录名),逗号分隔 |
|
| `ADMIN_USER_IDS` | 允许访问 `/admin` 的 GitHub 用户 ID(或登录名),逗号分隔 |
|
||||||
| `DEBUG_MODE` | 仅本地开发:精确设为 `true` 时跳过全部 `/admin` 身份验证 |
|
| `DEBUG_MODE` | 仅本地开发:精确设为 `true` 时跳过全部 `/admin` 身份验证 |
|
||||||
| `ALLOW_SELF_SIGNUP` | 设为 `1` 时,无权限的 GitHub 用户首次登录自动获得个人分组(默认关闭) |
|
| `ALLOW_SELF_SIGNUP` | 设为 `1` 时,无权限的 GitHub 用户首次登录自动获得个人分组(默认关闭) |
|
||||||
| `AUDIT_RETENTION_DAYS` | 定时清理时审计日志的保留天数(默认 90) |
|
| `AUDIT_RETENTION_DAYS` | 定时清理时审计日志的保留天数(默认 90) |
|
||||||
| `NUXT_PUBLIC_DOCS_URL` | 可选;落地页使用的文档站点 URL |
|
| `NUXT_PUBLIC_DOCS_URL` | 可选;落地页使用的文档站点 URL |
|
||||||
|
|||||||
@@ -26,7 +26,53 @@ const { toasts, dismiss } = useToasts();
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.recloud-toasts { position: fixed; z-index: 70; right: 1rem; bottom: 1rem; display: grid; width: min(calc(100vw - 2rem), 390px); gap: .65rem; }
|
.recloud-toasts {
|
||||||
.recloud-toast { display: flex; align-items: center; gap: .7rem; cursor: pointer; box-shadow: 0 16px 38px rgb(var(--wh-text) / .14); } .recloud-toast :deep(.rc-card-body) { display: flex; width: 100%; align-items: center; gap: .7rem; padding: .1rem; } .recloud-toast :deep(svg) { flex: none; color: rgb(var(--wh-ok)); } .recloud-toast.bad :deep(svg) { color: rgb(var(--wh-bad)); } .recloud-toast span { flex: 1; font-size: .8rem; font-weight: 700; } .recloud-toast .toast-close { color: rgb(var(--wh-faint)); }
|
position: fixed;
|
||||||
.toast-enter-active, .toast-leave-active { transition: opacity 180ms ease, transform 180ms ease; } .toast-enter-from, .toast-leave-to { opacity: 0; transform: translateX(16px); }
|
z-index: 70;
|
||||||
|
right: 1rem;
|
||||||
|
bottom: 1rem;
|
||||||
|
display: grid;
|
||||||
|
width: min(calc(100vw - 2rem), 390px);
|
||||||
|
gap: 0.65rem;
|
||||||
|
}
|
||||||
|
.recloud-toast {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.7rem;
|
||||||
|
cursor: pointer;
|
||||||
|
box-shadow: 0 16px 38px rgb(var(--wh-text) / 0.14);
|
||||||
|
}
|
||||||
|
.recloud-toast :deep(.rc-card-body) {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.7rem;
|
||||||
|
padding: 0.1rem;
|
||||||
|
}
|
||||||
|
.recloud-toast :deep(svg) {
|
||||||
|
flex: none;
|
||||||
|
color: rgb(var(--wh-ok));
|
||||||
|
}
|
||||||
|
.recloud-toast.bad :deep(svg) {
|
||||||
|
color: rgb(var(--wh-bad));
|
||||||
|
}
|
||||||
|
.recloud-toast span {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.recloud-toast .toast-close {
|
||||||
|
color: rgb(var(--wh-faint));
|
||||||
|
}
|
||||||
|
.toast-enter-active,
|
||||||
|
.toast-leave-active {
|
||||||
|
transition:
|
||||||
|
opacity 180ms ease,
|
||||||
|
transform 180ms ease;
|
||||||
|
}
|
||||||
|
.toast-enter-from,
|
||||||
|
.toast-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateX(16px);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
+322
-41
@@ -3,7 +3,9 @@
|
|||||||
<aside class="console-sidebar">
|
<aside class="console-sidebar">
|
||||||
<NuxtLink class="console-brand" to="/">
|
<NuxtLink class="console-brand" to="/">
|
||||||
<AppLogo :size="32" />
|
<AppLogo :size="32" />
|
||||||
<span><strong>WebHooker</strong><small>{{ t("app.tagline") }}</small></span>
|
<span
|
||||||
|
><strong>WebHooker</strong><small>{{ t("app.tagline") }}</small></span
|
||||||
|
>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
<p class="console-nav-label">{{ t("app.tagline") }}</p>
|
<p class="console-nav-label">{{ t("app.tagline") }}</p>
|
||||||
<nav class="console-nav">
|
<nav class="console-nav">
|
||||||
@@ -30,24 +32,42 @@
|
|||||||
<h1>{{ pageTitle }}</h1>
|
<h1>{{ pageTitle }}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="console-actions">
|
<div class="console-actions">
|
||||||
<RcBadge v-if="!needLogin && loadingAny" variant="soft" size="sm" dot class="console-status">
|
<RcBadge
|
||||||
|
v-if="!needLogin && loadingAny"
|
||||||
|
variant="soft"
|
||||||
|
size="sm"
|
||||||
|
dot
|
||||||
|
class="console-status"
|
||||||
|
>
|
||||||
{{ t("status.loading") }}
|
{{ t("status.loading") }}
|
||||||
</RcBadge>
|
</RcBadge>
|
||||||
<RcButton v-if="view === 'overview'" variant="ghost" size="sm" @click="refreshOverview"><RefreshCw :size="15" />{{ t("metrics.refresh") }}</RcButton>
|
<RcButton v-if="view === 'overview'" variant="ghost" size="sm" @click="refreshOverview"
|
||||||
|
><RefreshCw :size="15" />{{ t("metrics.refresh") }}</RcButton
|
||||||
|
>
|
||||||
<ThemeToggle />
|
<ThemeToggle />
|
||||||
<RcButton variant="ghost" size="sm" @click="toggle"><Languages :size="15" />{{ t("app.langToggle") }}</RcButton>
|
<RcButton variant="ghost" size="sm" @click="toggle"
|
||||||
|
><Languages :size="15" />{{ t("app.langToggle") }}</RcButton
|
||||||
|
>
|
||||||
<RcButton
|
<RcButton
|
||||||
v-if="!needLogin && selectedGroup && canEditRoutes(selectedGroup.id)"
|
v-if="!needLogin && selectedGroup && canEditRoutes(selectedGroup.id)"
|
||||||
@click="openNew"
|
@click="openNew"
|
||||||
><Plus :size="16" />{{ t("app.newRoute") }}</RcButton>
|
><Plus :size="16" />{{ t("app.newRoute") }}</RcButton
|
||||||
|
>
|
||||||
<RcButton
|
<RcButton
|
||||||
v-if="!needLogin && !selectedGroup && view === 'groups' && isSuper"
|
v-if="!needLogin && !selectedGroup && view === 'groups' && isSuper"
|
||||||
@click="openNewGroup"
|
@click="openNewGroup"
|
||||||
><Plus :size="16" />{{ t("app.newGroup") }}</RcButton>
|
><Plus :size="16" />{{ t("app.newGroup") }}</RcButton
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="console-mobile-nav"><RcTabs :model-value="activeNav" :items="mobileNav" @update:model-value="switchView($event as View)" /></div>
|
<div class="console-mobile-nav">
|
||||||
|
<RcTabs
|
||||||
|
:model-value="activeNav"
|
||||||
|
:items="mobileNav"
|
||||||
|
@update:model-value="switchView($event as View)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<main class="console-content">
|
<main class="console-content">
|
||||||
<div v-if="needLogin" class="console-login">
|
<div v-if="needLogin" class="console-login">
|
||||||
@@ -55,7 +75,9 @@
|
|||||||
<template #header><LockKeyhole :size="24" /></template>
|
<template #header><LockKeyhole :size="24" /></template>
|
||||||
<h2>{{ t("login.title") }}</h2>
|
<h2>{{ t("login.title") }}</h2>
|
||||||
<p>{{ forbidden ? t("login.forbidden") : t("login.prompt") }}</p>
|
<p>{{ forbidden ? t("login.forbidden") : t("login.prompt") }}</p>
|
||||||
<a href="/admin/login"><RcButton size="lg"><LogIn :size="17" />{{ t("login.button") }}</RcButton></a>
|
<a href="/admin/login"
|
||||||
|
><RcButton size="lg"><LogIn :size="17" />{{ t("login.button") }}</RcButton></a
|
||||||
|
>
|
||||||
</RcCard>
|
</RcCard>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -74,10 +96,14 @@
|
|||||||
<template v-else-if="selectedGroup">
|
<template v-else-if="selectedGroup">
|
||||||
<section class="console-context-bar">
|
<section class="console-context-bar">
|
||||||
<div>
|
<div>
|
||||||
<RcButton variant="ghost" size="sm" @click="exitGroup"><ArrowLeft :size="15" />{{ t("group.back") }}</RcButton>
|
<RcButton variant="ghost" size="sm" @click="exitGroup"
|
||||||
|
><ArrowLeft :size="15" />{{ t("group.back") }}</RcButton
|
||||||
|
>
|
||||||
<p>{{ t("group.routesIn", { name: selectedGroup.name }) }}</p>
|
<p>{{ t("group.routesIn", { name: selectedGroup.name }) }}</p>
|
||||||
</div>
|
</div>
|
||||||
<RcBadge :variant="groupRoutesLoading ? 'soft' : 'success'" size="sm" dot>{{ groupRoutes.length }}</RcBadge>
|
<RcBadge :variant="groupRoutesLoading ? 'soft' : 'success'" size="sm" dot>{{
|
||||||
|
groupRoutes.length
|
||||||
|
}}</RcBadge>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<p v-if="groupRoutesError" class="err">{{ groupRoutesError }}</p>
|
<p v-if="groupRoutesError" class="err">{{ groupRoutesError }}</p>
|
||||||
@@ -100,7 +126,9 @@
|
|||||||
|
|
||||||
<section v-if="!groupRoutesLoading && !groupRoutes.length" class="console-empty">
|
<section v-if="!groupRoutesLoading && !groupRoutes.length" class="console-empty">
|
||||||
<RcEmptyState :title="t('routes.emptyGroup')">
|
<RcEmptyState :title="t('routes.emptyGroup')">
|
||||||
<RcButton v-if="canEditRoutes(selectedGroup.id)" @click="openNew"><Plus :size="16" />{{ t("routes.createFirst") }}</RcButton>
|
<RcButton v-if="canEditRoutes(selectedGroup.id)" @click="openNew"
|
||||||
|
><Plus :size="16" />{{ t("routes.createFirst") }}</RcButton
|
||||||
|
>
|
||||||
</RcEmptyState>
|
</RcEmptyState>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -120,8 +148,13 @@
|
|||||||
|
|
||||||
<template v-else-if="view === 'groups'">
|
<template v-else-if="view === 'groups'">
|
||||||
<section class="console-context-bar">
|
<section class="console-context-bar">
|
||||||
<div><p>{{ t("kpi.groups") }}</p><strong>{{ groups.length }}</strong></div>
|
<div>
|
||||||
<RcBadge v-if="groupsLoading" variant="soft" size="sm" dot>{{ t("status.loading") }}</RcBadge>
|
<p>{{ t("kpi.groups") }}</p>
|
||||||
|
<strong>{{ groups.length }}</strong>
|
||||||
|
</div>
|
||||||
|
<RcBadge v-if="groupsLoading" variant="soft" size="sm" dot>{{
|
||||||
|
t("status.loading")
|
||||||
|
}}</RcBadge>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<p v-if="groupsError" class="err">{{ groupsError }}</p>
|
<p v-if="groupsError" class="err">{{ groupsError }}</p>
|
||||||
@@ -137,20 +170,28 @@
|
|||||||
:style="{ animationDelay: i * 45 + 'ms' }"
|
:style="{ animationDelay: i * 45 + 'ms' }"
|
||||||
@click="enterGroup(g)"
|
@click="enterGroup(g)"
|
||||||
>
|
>
|
||||||
<template #header><div class="card-head"><div class="card-title">
|
<template #header
|
||||||
<span class="route-name">{{ g.name || t("route.untitled") }}</span>
|
><div class="card-head">
|
||||||
<span class="route-id">{{ g.id }}</span>
|
<div class="card-title">
|
||||||
<RcBadge v-if="roleOf(g.id)" variant="brand" size="xs">{{ t("role.badge", { role: t("roles." + roleOf(g.id)) }) }}</RcBadge>
|
<span class="route-name">{{ g.name || t("route.untitled") }}</span>
|
||||||
</div>
|
<span class="route-id">{{ g.id }}</span>
|
||||||
<div v-if="canEditGroup(g.id)" class="card-actions" @click.stop>
|
<RcBadge v-if="roleOf(g.id)" variant="brand" size="xs">{{
|
||||||
<RcButton
|
t("role.badge", { role: t("roles." + roleOf(g.id)) })
|
||||||
variant="ghost" size="icon"
|
}}</RcBadge>
|
||||||
:title="t('groupEditor.editTitle')"
|
</div>
|
||||||
@click="openEditGroup(g)"
|
<div v-if="canEditGroup(g.id)" class="card-actions" @click.stop>
|
||||||
><Pencil :size="15" /></RcButton>
|
<RcButton
|
||||||
<RcButton variant="ghost" color="error" size="icon" @click="onDeleteGroup(g)"><Trash2 :size="15" /></RcButton>
|
variant="ghost"
|
||||||
</div>
|
size="icon"
|
||||||
</div></template>
|
:title="t('groupEditor.editTitle')"
|
||||||
|
@click="openEditGroup(g)"
|
||||||
|
><Pencil :size="15"
|
||||||
|
/></RcButton>
|
||||||
|
<RcButton variant="ghost" color="error" size="icon" @click="onDeleteGroup(g)"
|
||||||
|
><Trash2 :size="15"
|
||||||
|
/></RcButton>
|
||||||
|
</div></div
|
||||||
|
></template>
|
||||||
<div class="target">
|
<div class="target">
|
||||||
<span
|
<span
|
||||||
><b>{{ t("groups.members") }}</b
|
><b>{{ t("groups.members") }}</b
|
||||||
@@ -165,17 +206,27 @@
|
|||||||
}}</code></span
|
}}</code></span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<template #footer><span class="console-open"><ArrowRight :size="15" />{{ t("groups.open") }}</span></template>
|
<template #footer
|
||||||
|
><span class="console-open"
|
||||||
|
><ArrowRight :size="15" />{{ t("groups.open") }}</span
|
||||||
|
></template
|
||||||
|
>
|
||||||
</RcCard>
|
</RcCard>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section v-if="!groupsLoading && !groups.length" class="console-empty">
|
<section v-if="!groupsLoading && !groups.length" class="console-empty">
|
||||||
<RcEmptyState :title="t('groups.empty')"><RcButton v-if="isSuper" @click="openNewGroup"><Plus :size="16" />{{ t("groups.createFirst") }}</RcButton></RcEmptyState>
|
<RcEmptyState :title="t('groups.empty')"
|
||||||
|
><RcButton v-if="isSuper" @click="openNewGroup"
|
||||||
|
><Plus :size="16" />{{ t("groups.createFirst") }}</RcButton
|
||||||
|
></RcEmptyState
|
||||||
|
>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-else-if="view === 'logs'">
|
<template v-else-if="view === 'logs'">
|
||||||
<section v-if="logsLoading" class="console-context-bar"><RcBadge variant="soft" size="sm" dot>{{ t("status.loading") }}</RcBadge></section>
|
<section v-if="logsLoading" class="console-context-bar">
|
||||||
|
<RcBadge variant="soft" size="sm" dot>{{ t("status.loading") }}</RcBadge>
|
||||||
|
</section>
|
||||||
<SendLogs
|
<SendLogs
|
||||||
:logs="logs"
|
:logs="logs"
|
||||||
:loading="logsLoading"
|
:loading="logsLoading"
|
||||||
@@ -297,7 +348,9 @@ const nav = computed(() => [
|
|||||||
{ id: "metrics" as View, label: t("tab.metrics"), path: "/admin/metrics" },
|
{ id: "metrics" as View, label: t("tab.metrics"), path: "/admin/metrics" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const mobileNav = computed(() => nav.value.map(({ id, label }) => ({ value: id, label, icon: navIcon(id) })));
|
const mobileNav = computed(() =>
|
||||||
|
nav.value.map(({ id, label }) => ({ value: id, label, icon: navIcon(id) })),
|
||||||
|
);
|
||||||
|
|
||||||
function navIcon(id: View) {
|
function navIcon(id: View) {
|
||||||
const icons = {
|
const icons = {
|
||||||
@@ -594,14 +647,242 @@ async function onDeleteGroup(group: Group): Promise<void> {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.console-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; background: rgb(var(--wh-bg)); color: rgb(var(--wh-text)); }
|
.console-shell {
|
||||||
.console-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; border-right: 1px solid rgb(var(--wh-border)); background: linear-gradient(165deg, rgb(var(--wh-surface)), rgb(var(--wh-surface-2))); padding: 1.25rem .85rem; }
|
display: grid;
|
||||||
.console-brand { display: flex; align-items: center; gap: .7rem; padding: .45rem .55rem 1.75rem; color: rgb(var(--wh-text)); text-decoration: none; } .console-brand :deep(svg) { color: rgb(var(--wh-accent)); } .console-brand span { display: grid; gap: .1rem; } .console-brand strong { font-size: 1rem; letter-spacing: -.04em; } .console-brand small, .console-nav-label, .console-kicker { color: rgb(var(--wh-faint)); font-size: .62rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
|
grid-template-columns: 264px minmax(0, 1fr);
|
||||||
.console-nav-label { margin: 0 .65rem .45rem; } .console-nav { display: grid; gap: .2rem; } .console-nav-item { display: flex; align-items: center; gap: .7rem; width: 100%; border: 0; border-radius: .65rem; background: transparent; padding: .7rem; color: rgb(var(--wh-muted)); font: inherit; font-size: .82rem; font-weight: 700; text-align: left; transition: background-color 150ms ease, color 150ms ease; cursor: pointer; } .console-nav-item:hover { background: rgb(var(--wh-surface-2)); color: rgb(var(--wh-text)); } .console-nav-item.active { background: rgb(var(--wh-accent)); color: white; box-shadow: 0 8px 18px rgb(var(--wh-accent) / .2); }
|
min-height: 100vh;
|
||||||
.console-sidebar-footer { display: grid; gap: .9rem; margin-top: auto; padding: .9rem .55rem .25rem; border-top: 1px solid rgb(var(--wh-border)); } .console-sidebar-footer a { display: inline-flex; align-items: center; gap: .55rem; color: rgb(var(--wh-muted)); font-size: .8rem; font-weight: 700; text-decoration: none; } .console-sidebar-footer a:hover { color: rgb(var(--wh-bad)); }
|
background: rgb(var(--wh-bg));
|
||||||
.console-main { min-width: 0; } .console-topbar { position: sticky; top: 0; z-index: 20; display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgb(var(--wh-border)); background: color-mix(in srgb, rgb(var(--wh-bg)) 87%, transparent); padding: .8rem clamp(1rem, 3vw, 2.5rem); backdrop-filter: blur(18px); } .console-topbar h1 { margin: .1rem 0 0; font-size: 1.15rem; letter-spacing: -.035em; } .console-kicker { margin: 0; } .console-actions { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; } .console-status { white-space: nowrap; }
|
color: rgb(var(--wh-text));
|
||||||
.console-mobile-nav { display: none; } .console-content { width: min(100% - 2rem, 1240px); margin: 0 auto; padding: clamp(1.25rem, 3vw, 2.5rem) 0 5rem; } .console-login { display: grid; min-height: 62vh; place-items: center; } .console-login-card { width: min(100%, 430px); text-align: center; } .console-login-card :deep(.rc-card-header) { justify-content: center; color: rgb(var(--wh-accent)); } .console-login-card h2 { margin: .35rem 0 .65rem; font-size: 1.35rem; letter-spacing: -.035em; } .console-login-card p { margin: 0 0 1.4rem; color: rgb(var(--wh-muted)); }
|
}
|
||||||
.console-context-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: .8rem 1rem; border: 1px solid rgb(var(--wh-border)); border-radius: .85rem; background: rgb(var(--wh-surface) / .6); } .console-context-bar > div { display: flex; align-items: center; gap: .8rem; } .console-context-bar p { margin: 0; color: rgb(var(--wh-muted)); font-size: .8rem; font-weight: 700; } .console-context-bar strong { font-size: 1.25rem; letter-spacing: -.04em; } .console-empty { padding: 4rem 1rem; } .console-group-card { cursor: pointer; } .console-open { display: inline-flex; align-items: center; gap: .35rem; color: rgb(var(--wh-accent)); font-size: .75rem; font-weight: 800; }
|
.console-sidebar {
|
||||||
@media (max-width: 900px) { .console-shell { display: block; } .console-sidebar { display: none; } .console-mobile-nav { display: block; border-bottom: 1px solid rgb(var(--wh-border)); padding: .5rem 1rem; overflow-x: auto; } .console-mobile-nav :deep(.rc-tabs) { min-width: max-content; } }
|
position: sticky;
|
||||||
@media (max-width: 620px) { .console-topbar { align-items: flex-start; flex-direction: column; } .console-actions { width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: .05rem; } .console-status { display: none; } .console-content { width: min(100% - 1.25rem, 1240px); } }
|
top: 0;
|
||||||
|
display: flex;
|
||||||
|
height: 100vh;
|
||||||
|
flex-direction: column;
|
||||||
|
border-right: 1px solid rgb(var(--wh-border));
|
||||||
|
background: linear-gradient(165deg, rgb(var(--wh-surface)), rgb(var(--wh-surface-2)));
|
||||||
|
padding: 1.25rem 0.85rem;
|
||||||
|
}
|
||||||
|
.console-brand {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.7rem;
|
||||||
|
padding: 0.45rem 0.55rem 1.75rem;
|
||||||
|
color: rgb(var(--wh-text));
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.console-brand :deep(svg) {
|
||||||
|
color: rgb(var(--wh-accent));
|
||||||
|
}
|
||||||
|
.console-brand span {
|
||||||
|
display: grid;
|
||||||
|
gap: 0.1rem;
|
||||||
|
}
|
||||||
|
.console-brand strong {
|
||||||
|
font-size: 1rem;
|
||||||
|
letter-spacing: -0.04em;
|
||||||
|
}
|
||||||
|
.console-brand small,
|
||||||
|
.console-nav-label,
|
||||||
|
.console-kicker {
|
||||||
|
color: rgb(var(--wh-faint));
|
||||||
|
font-size: 0.62rem;
|
||||||
|
font-weight: 800;
|
||||||
|
letter-spacing: 0.13em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
.console-nav-label {
|
||||||
|
margin: 0 0.65rem 0.45rem;
|
||||||
|
}
|
||||||
|
.console-nav {
|
||||||
|
display: grid;
|
||||||
|
gap: 0.2rem;
|
||||||
|
}
|
||||||
|
.console-nav-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.7rem;
|
||||||
|
width: 100%;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 0.65rem;
|
||||||
|
background: transparent;
|
||||||
|
padding: 0.7rem;
|
||||||
|
color: rgb(var(--wh-muted));
|
||||||
|
font: inherit;
|
||||||
|
font-size: 0.82rem;
|
||||||
|
font-weight: 700;
|
||||||
|
text-align: left;
|
||||||
|
transition:
|
||||||
|
background-color 150ms ease,
|
||||||
|
color 150ms ease;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.console-nav-item:hover {
|
||||||
|
background: rgb(var(--wh-surface-2));
|
||||||
|
color: rgb(var(--wh-text));
|
||||||
|
}
|
||||||
|
.console-nav-item.active {
|
||||||
|
background: rgb(var(--wh-accent));
|
||||||
|
color: white;
|
||||||
|
box-shadow: 0 8px 18px rgb(var(--wh-accent) / 0.2);
|
||||||
|
}
|
||||||
|
.console-sidebar-footer {
|
||||||
|
display: grid;
|
||||||
|
gap: 0.9rem;
|
||||||
|
margin-top: auto;
|
||||||
|
padding: 0.9rem 0.55rem 0.25rem;
|
||||||
|
border-top: 1px solid rgb(var(--wh-border));
|
||||||
|
}
|
||||||
|
.console-sidebar-footer a {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.55rem;
|
||||||
|
color: rgb(var(--wh-muted));
|
||||||
|
font-size: 0.8rem;
|
||||||
|
font-weight: 700;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.console-sidebar-footer a:hover {
|
||||||
|
color: rgb(var(--wh-bad));
|
||||||
|
}
|
||||||
|
.console-main {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.console-topbar {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 20;
|
||||||
|
display: flex;
|
||||||
|
min-height: 76px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 1rem;
|
||||||
|
border-bottom: 1px solid rgb(var(--wh-border));
|
||||||
|
background: color-mix(in srgb, rgb(var(--wh-bg)) 87%, transparent);
|
||||||
|
padding: 0.8rem clamp(1rem, 3vw, 2.5rem);
|
||||||
|
backdrop-filter: blur(18px);
|
||||||
|
}
|
||||||
|
.console-topbar h1 {
|
||||||
|
margin: 0.1rem 0 0;
|
||||||
|
font-size: 1.15rem;
|
||||||
|
letter-spacing: -0.035em;
|
||||||
|
}
|
||||||
|
.console-kicker {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.console-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 0.45rem;
|
||||||
|
}
|
||||||
|
.console-status {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.console-mobile-nav {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.console-content {
|
||||||
|
width: min(100% - 2rem, 1240px);
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: clamp(1.25rem, 3vw, 2.5rem) 0 5rem;
|
||||||
|
}
|
||||||
|
.console-login {
|
||||||
|
display: grid;
|
||||||
|
min-height: 62vh;
|
||||||
|
place-items: center;
|
||||||
|
}
|
||||||
|
.console-login-card {
|
||||||
|
width: min(100%, 430px);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.console-login-card :deep(.rc-card-header) {
|
||||||
|
justify-content: center;
|
||||||
|
color: rgb(var(--wh-accent));
|
||||||
|
}
|
||||||
|
.console-login-card h2 {
|
||||||
|
margin: 0.35rem 0 0.65rem;
|
||||||
|
font-size: 1.35rem;
|
||||||
|
letter-spacing: -0.035em;
|
||||||
|
}
|
||||||
|
.console-login-card p {
|
||||||
|
margin: 0 0 1.4rem;
|
||||||
|
color: rgb(var(--wh-muted));
|
||||||
|
}
|
||||||
|
.console-context-bar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 1rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
padding: 0.8rem 1rem;
|
||||||
|
border: 1px solid rgb(var(--wh-border));
|
||||||
|
border-radius: 0.85rem;
|
||||||
|
background: rgb(var(--wh-surface) / 0.6);
|
||||||
|
}
|
||||||
|
.console-context-bar > div {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.8rem;
|
||||||
|
}
|
||||||
|
.console-context-bar p {
|
||||||
|
margin: 0;
|
||||||
|
color: rgb(var(--wh-muted));
|
||||||
|
font-size: 0.8rem;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.console-context-bar strong {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
letter-spacing: -0.04em;
|
||||||
|
}
|
||||||
|
.console-empty {
|
||||||
|
padding: 4rem 1rem;
|
||||||
|
}
|
||||||
|
.console-group-card {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.console-open {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.35rem;
|
||||||
|
color: rgb(var(--wh-accent));
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
.console-shell {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.console-sidebar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.console-mobile-nav {
|
||||||
|
display: block;
|
||||||
|
border-bottom: 1px solid rgb(var(--wh-border));
|
||||||
|
padding: 0.5rem 1rem;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
.console-mobile-nav :deep(.rc-tabs) {
|
||||||
|
min-width: max-content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 620px) {
|
||||||
|
.console-topbar {
|
||||||
|
align-items: flex-start;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.console-actions {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: flex-start;
|
||||||
|
overflow-x: auto;
|
||||||
|
padding-bottom: 0.05rem;
|
||||||
|
}
|
||||||
|
.console-status {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.console-content {
|
||||||
|
width: min(100% - 1.25rem, 1240px);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -15,9 +15,15 @@ const emit = defineEmits<{ (e: "remove"): void }>();
|
|||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const NODE_KINDS = ["all", "any"] as const;
|
const NODE_KINDS = ["all", "any"] as const;
|
||||||
const filterTypeOptions = computed(() => FILTER_TYPES.map((value) => ({ label: t("filter." + value), value })));
|
const filterTypeOptions = computed(() =>
|
||||||
const filterOpOptions = computed(() => FILTER_OPS.map((value) => ({ label: t("filterOp." + value), value })));
|
FILTER_TYPES.map((value) => ({ label: t("filter." + value), value })),
|
||||||
const nodeKindOptions = computed(() => NODE_KINDS.map((value) => ({ label: t("filterNode." + value), value })));
|
);
|
||||||
|
const filterOpOptions = computed(() =>
|
||||||
|
FILTER_OPS.map((value) => ({ label: t("filterOp." + value), value })),
|
||||||
|
);
|
||||||
|
const nodeKindOptions = computed(() =>
|
||||||
|
NODE_KINDS.map((value) => ({ label: t("filterNode." + value), value })),
|
||||||
|
);
|
||||||
|
|
||||||
function addChild(kind: "leaf" | "all" | "any" | "not"): void {
|
function addChild(kind: "leaf" | "all" | "any" | "not"): void {
|
||||||
props.node.children.push(blankNode(kind));
|
props.node.children.push(blankNode(kind));
|
||||||
@@ -60,7 +66,12 @@ function unwrapNot(): void {
|
|||||||
:placeholder="t('routeEditor.valuesPlaceholder')"
|
:placeholder="t('routeEditor.valuesPlaceholder')"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<RcCheckbox v-model="node.leaf.exclude" class="node-exclude" :label="t('routeEditor.not')" :title="t('routeEditor.not')" />
|
<RcCheckbox
|
||||||
|
v-model="node.leaf.exclude"
|
||||||
|
class="node-exclude"
|
||||||
|
:label="t('routeEditor.not')"
|
||||||
|
:title="t('routeEditor.not')"
|
||||||
|
/>
|
||||||
|
|
||||||
<RcButton
|
<RcButton
|
||||||
v-if="deletable"
|
v-if="deletable"
|
||||||
@@ -79,13 +90,31 @@ function unwrapNot(): void {
|
|||||||
<div class="node-group-head">
|
<div class="node-group-head">
|
||||||
<RcSelect v-model="node.kind" class="node-combo" :options="nodeKindOptions" />
|
<RcSelect v-model="node.kind" class="node-combo" :options="nodeKindOptions" />
|
||||||
<div class="node-actions">
|
<div class="node-actions">
|
||||||
<RcButton type="button" variant="ghost" size="xs" class="node-add" @click="addChild('leaf')">
|
<RcButton
|
||||||
|
type="button"
|
||||||
|
variant="ghost"
|
||||||
|
size="xs"
|
||||||
|
class="node-add"
|
||||||
|
@click="addChild('leaf')"
|
||||||
|
>
|
||||||
+ {{ t("routeEditor.addLeaf") }}
|
+ {{ t("routeEditor.addLeaf") }}
|
||||||
</RcButton>
|
</RcButton>
|
||||||
<RcButton type="button" variant="ghost" size="xs" class="node-add" @click="addChild('all')">
|
<RcButton
|
||||||
|
type="button"
|
||||||
|
variant="ghost"
|
||||||
|
size="xs"
|
||||||
|
class="node-add"
|
||||||
|
@click="addChild('all')"
|
||||||
|
>
|
||||||
+ {{ t("routeEditor.addGroup") }}
|
+ {{ t("routeEditor.addGroup") }}
|
||||||
</RcButton>
|
</RcButton>
|
||||||
<RcButton type="button" variant="ghost" size="xs" class="node-add" @click="addChild('not')">
|
<RcButton
|
||||||
|
type="button"
|
||||||
|
variant="ghost"
|
||||||
|
size="xs"
|
||||||
|
class="node-add"
|
||||||
|
@click="addChild('not')"
|
||||||
|
>
|
||||||
+ {{ t("routeEditor.addNot") }}
|
+ {{ t("routeEditor.addNot") }}
|
||||||
</RcButton>
|
</RcButton>
|
||||||
<RcButton
|
<RcButton
|
||||||
|
|||||||
@@ -183,7 +183,10 @@
|
|||||||
{ label: 'Telegram', value: 'telegram' },
|
{ label: 'Telegram', value: 'telegram' },
|
||||||
{ label: t('groupEditor.logFeishu'), value: 'feishu' },
|
{ label: t('groupEditor.logFeishu'), value: 'feishu' },
|
||||||
]"
|
]"
|
||||||
@update:model-value="form.logPlatform = ($event === 'none' ? '' : $event) as '' | 'discord' | 'telegram' | 'feishu'"
|
@update:model-value="
|
||||||
|
form.logPlatform = ($event === 'none' ? '' : $event) as
|
||||||
|
'' | 'discord' | 'telegram' | 'feishu'
|
||||||
|
"
|
||||||
/>
|
/>
|
||||||
<template v-if="form.logPlatform === 'discord'">
|
<template v-if="form.logPlatform === 'discord'">
|
||||||
<RcInput
|
<RcInput
|
||||||
@@ -414,4 +417,3 @@ function save(): void {
|
|||||||
box-shadow: 0 -8px 24px -16px rgba(15, 23, 42, 0.18);
|
box-shadow: 0 -8px 24px -16px rgba(15, 23, 42, 0.18);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@@ -1,10 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<main class="legal-shell">
|
<main class="legal-shell">
|
||||||
<header class="legal-header">
|
<header class="legal-header">
|
||||||
<NuxtLink class="legal-brand" :to="q('/')"><AppLogo :size="28" /><span>WebHooker</span></NuxtLink>
|
<NuxtLink class="legal-brand" :to="q('/')"
|
||||||
|
><AppLogo :size="28" /><span>WebHooker</span></NuxtLink
|
||||||
|
>
|
||||||
<nav aria-label="Legal navigation">
|
<nav aria-label="Legal navigation">
|
||||||
<NuxtLink v-for="item in links" :key="item.key" :to="q(item.path)">
|
<NuxtLink v-for="item in links" :key="item.key" :to="q(item.path)">
|
||||||
<RcBadge :variant="active === item.key ? 'brand' : 'subtle'" size="sm">{{ item.label }}</RcBadge>
|
<RcBadge :variant="active === item.key ? 'brand' : 'subtle'" size="sm">{{
|
||||||
|
item.label
|
||||||
|
}}</RcBadge>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
@@ -13,7 +17,9 @@
|
|||||||
<h1>{{ title }}</h1>
|
<h1>{{ title }}</h1>
|
||||||
<span>{{ t("最后更新", "Last updated") }} · {{ updated }}</span>
|
<span>{{ t("最后更新", "Last updated") }} · {{ updated }}</span>
|
||||||
</section>
|
</section>
|
||||||
<RcCard variant="outline" padding="lg" class="legal-card"><article class="legal-body" v-html="body" /></RcCard>
|
<RcCard variant="outline" padding="lg" class="legal-card"
|
||||||
|
><article class="legal-body" v-html="body"
|
||||||
|
/></RcCard>
|
||||||
<footer class="legal-footer">
|
<footer class="legal-footer">
|
||||||
<NuxtLink :to="q('/')">{{ t("返回首页", "Back to home") }}</NuxtLink>
|
<NuxtLink :to="q('/')">{{ t("返回首页", "Back to home") }}</NuxtLink>
|
||||||
<div class="legal-footer-actions">
|
<div class="legal-footer-actions">
|
||||||
@@ -39,15 +45,118 @@ const links = computed(() => [
|
|||||||
{ key: "terms" as const, path: "/terms", label: t("服务条款", "Terms") },
|
{ key: "terms" as const, path: "/terms", label: t("服务条款", "Terms") },
|
||||||
{ key: "privacy" as const, path: "/privacy", label: t("隐私政策", "Privacy") },
|
{ key: "privacy" as const, path: "/privacy", label: t("隐私政策", "Privacy") },
|
||||||
]);
|
]);
|
||||||
const altLink = computed(() => `${props.active === "terms" ? "/terms" : "/privacy"}?lang=${altLang.value}`);
|
const altLink = computed(
|
||||||
|
() => `${props.active === "terms" ? "/terms" : "/privacy"}?lang=${altLang.value}`,
|
||||||
|
);
|
||||||
|
|
||||||
useHead({ title: `${props.title} · WebHooker` });
|
useHead({ title: `${props.title} · WebHooker` });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.legal-shell { position: relative; z-index: 1; width: min(100% - 2rem, 860px); margin: 0 auto; padding: 2rem 0 4rem; } .legal-header, .legal-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; } .legal-brand { display: inline-flex; align-items: center; gap: .6rem; color: rgb(var(--wh-text)); font-size: 1rem; font-weight: 800; text-decoration: none; letter-spacing: -.035em; } .legal-brand :deep(svg) { color: rgb(var(--wh-accent)); } nav { display: flex; gap: .35rem; } nav a { text-decoration: none; }
|
.legal-shell {
|
||||||
.legal-heading { max-width: 640px; padding: clamp(4rem, 11vw, 7rem) 0 clamp(2rem, 6vw, 3.5rem); } .legal-heading p { margin: 0 0 .75rem; color: rgb(var(--wh-accent)); font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; } .legal-heading h1 { margin: 0; font-size: clamp(2.4rem, 7vw, 4rem); letter-spacing: -.06em; line-height: 1; } .legal-heading span { display: block; margin-top: 1rem; color: rgb(var(--wh-faint)); font-size: .78rem; }
|
position: relative;
|
||||||
.legal-card { box-shadow: 0 24px 60px rgb(var(--wh-text) / .06); } .legal-body :deep(h2) { margin: 2.25rem 0 .75rem; font-size: 1.1rem; letter-spacing: -.02em; } .legal-body :deep(h2:first-child) { margin-top: 0; } .legal-body :deep(p), .legal-body :deep(li) { color: rgb(var(--wh-body-text)); line-height: 1.8; } .legal-body :deep(a) { color: rgb(var(--wh-accent)); } .legal-body :deep(ul) { padding-left: 1.25rem; }
|
z-index: 1;
|
||||||
.legal-footer { margin-top: 1.5rem; color: rgb(var(--wh-muted)); font-size: .78rem; } .legal-footer-actions { display: flex; align-items: center; gap: .75rem; } .legal-footer a { color: inherit; text-decoration: none; } .legal-footer a:hover { color: rgb(var(--wh-accent)); }
|
width: min(100% - 2rem, 860px);
|
||||||
@media (max-width: 520px) { .legal-shell { width: min(100% - 1.5rem, 860px); } .legal-header { align-items: flex-start; flex-direction: column; } }
|
margin: 0 auto;
|
||||||
|
padding: 2rem 0 4rem;
|
||||||
|
}
|
||||||
|
.legal-header,
|
||||||
|
.legal-footer {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
.legal-brand {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.6rem;
|
||||||
|
color: rgb(var(--wh-text));
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 800;
|
||||||
|
text-decoration: none;
|
||||||
|
letter-spacing: -0.035em;
|
||||||
|
}
|
||||||
|
.legal-brand :deep(svg) {
|
||||||
|
color: rgb(var(--wh-accent));
|
||||||
|
}
|
||||||
|
nav {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.35rem;
|
||||||
|
}
|
||||||
|
nav a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.legal-heading {
|
||||||
|
max-width: 640px;
|
||||||
|
padding: clamp(4rem, 11vw, 7rem) 0 clamp(2rem, 6vw, 3.5rem);
|
||||||
|
}
|
||||||
|
.legal-heading p {
|
||||||
|
margin: 0 0 0.75rem;
|
||||||
|
color: rgb(var(--wh-accent));
|
||||||
|
font-size: 0.72rem;
|
||||||
|
font-weight: 800;
|
||||||
|
letter-spacing: 0.14em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
.legal-heading h1 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: clamp(2.4rem, 7vw, 4rem);
|
||||||
|
letter-spacing: -0.06em;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
.legal-heading span {
|
||||||
|
display: block;
|
||||||
|
margin-top: 1rem;
|
||||||
|
color: rgb(var(--wh-faint));
|
||||||
|
font-size: 0.78rem;
|
||||||
|
}
|
||||||
|
.legal-card {
|
||||||
|
box-shadow: 0 24px 60px rgb(var(--wh-text) / 0.06);
|
||||||
|
}
|
||||||
|
.legal-body :deep(h2) {
|
||||||
|
margin: 2.25rem 0 0.75rem;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
letter-spacing: -0.02em;
|
||||||
|
}
|
||||||
|
.legal-body :deep(h2:first-child) {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
.legal-body :deep(p),
|
||||||
|
.legal-body :deep(li) {
|
||||||
|
color: rgb(var(--wh-body-text));
|
||||||
|
line-height: 1.8;
|
||||||
|
}
|
||||||
|
.legal-body :deep(a) {
|
||||||
|
color: rgb(var(--wh-accent));
|
||||||
|
}
|
||||||
|
.legal-body :deep(ul) {
|
||||||
|
padding-left: 1.25rem;
|
||||||
|
}
|
||||||
|
.legal-footer {
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
color: rgb(var(--wh-muted));
|
||||||
|
font-size: 0.78rem;
|
||||||
|
}
|
||||||
|
.legal-footer-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.75rem;
|
||||||
|
}
|
||||||
|
.legal-footer a {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.legal-footer a:hover {
|
||||||
|
color: rgb(var(--wh-accent));
|
||||||
|
}
|
||||||
|
@media (max-width: 520px) {
|
||||||
|
.legal-shell {
|
||||||
|
width: min(100% - 1.5rem, 860px);
|
||||||
|
}
|
||||||
|
.legal-header {
|
||||||
|
align-items: flex-start;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -18,7 +18,9 @@
|
|||||||
:disabled="saving"
|
:disabled="saving"
|
||||||
@update:model-value="onRoleChange(m, $event)"
|
@update:model-value="onRoleChange(m, $event)"
|
||||||
/>
|
/>
|
||||||
<RcBadge v-else size="xs" class="role-pill" :class="m.role">{{ t("roles." + m.role) }}</RcBadge>
|
<RcBadge v-else size="xs" class="role-pill" :class="m.role">{{
|
||||||
|
t("roles." + m.role)
|
||||||
|
}}</RcBadge>
|
||||||
<RcButton
|
<RcButton
|
||||||
v-if="canEdit"
|
v-if="canEdit"
|
||||||
type="button"
|
type="button"
|
||||||
@@ -62,12 +64,21 @@
|
|||||||
<ul v-if="invites.length" class="invite-list">
|
<ul v-if="invites.length" class="invite-list">
|
||||||
<li v-for="inv in invites" :key="inv.token" class="invite-row">
|
<li v-for="inv in invites" :key="inv.token" class="invite-row">
|
||||||
<code class="invite-token">{{ shortToken(inv.token) }}</code>
|
<code class="invite-token">{{ shortToken(inv.token) }}</code>
|
||||||
<RcBadge size="xs" class="role-pill" :class="inv.role">{{ t("roles." + inv.role) }}</RcBadge>
|
<RcBadge size="xs" class="role-pill" :class="inv.role">{{
|
||||||
|
t("roles." + inv.role)
|
||||||
|
}}</RcBadge>
|
||||||
<span class="invite-exp">{{ fmtExp(inv.expiresAt) }}</span>
|
<span class="invite-exp">{{ fmtExp(inv.expiresAt) }}</span>
|
||||||
<RcButton type="button" variant="ghost" size="sm" @click="copyInvite(inv)">
|
<RcButton type="button" variant="ghost" size="sm" @click="copyInvite(inv)">
|
||||||
{{ copied === inv.token ? t("members.copied") : t("members.copyLink") }}
|
{{ copied === inv.token ? t("members.copied") : t("members.copyLink") }}
|
||||||
</RcButton>
|
</RcButton>
|
||||||
<RcButton type="button" variant="destructive" size="sm" class="icon-btn danger" @click="revoke(inv)">{{ t("members.revoke") }}</RcButton>
|
<RcButton
|
||||||
|
type="button"
|
||||||
|
variant="destructive"
|
||||||
|
size="sm"
|
||||||
|
class="icon-btn danger"
|
||||||
|
@click="revoke(inv)"
|
||||||
|
>{{ t("members.revoke") }}</RcButton
|
||||||
|
>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p v-else class="empty-log">{{ t("members.noInvites") }}</p>
|
<p v-else class="empty-log">{{ t("members.noInvites") }}</p>
|
||||||
@@ -101,7 +112,9 @@ const roleOptions = computed(() => [
|
|||||||
{ label: t("roles.admin"), value: "admin" },
|
{ label: t("roles.admin"), value: "admin" },
|
||||||
{ label: t("roles.viewer"), value: "viewer" },
|
{ label: t("roles.viewer"), value: "viewer" },
|
||||||
]);
|
]);
|
||||||
const inviteRoleOptions = computed(() => roleOptions.value.filter((option) => option.value !== "owner"));
|
const inviteRoleOptions = computed(() =>
|
||||||
|
roleOptions.value.filter((option) => option.value !== "owner"),
|
||||||
|
);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.group,
|
() => props.group,
|
||||||
|
|||||||
@@ -2,7 +2,12 @@
|
|||||||
<RcCard variant="outline" padding="none" :class="cardClass">
|
<RcCard variant="outline" padding="none" :class="cardClass">
|
||||||
<div class="route-card-main">
|
<div class="route-card-main">
|
||||||
<div class="route-card-header">
|
<div class="route-card-header">
|
||||||
<RcSwitch v-if="!readonly" :model-value="route.enabled" size="sm" @update:model-value="onToggle" />
|
<RcSwitch
|
||||||
|
v-if="!readonly"
|
||||||
|
:model-value="route.enabled"
|
||||||
|
size="sm"
|
||||||
|
@update:model-value="onToggle"
|
||||||
|
/>
|
||||||
<span v-if="readonly" class="dot" :class="route.enabled ? 'ok' : 'bad'"></span>
|
<span v-if="readonly" class="dot" :class="route.enabled ? 'ok' : 'bad'"></span>
|
||||||
<div class="route-card-title">
|
<div class="route-card-title">
|
||||||
<span class="route-name">{{ route.name || t("route.untitled") }}</span>
|
<span class="route-name">{{ route.name || t("route.untitled") }}</span>
|
||||||
@@ -40,9 +45,26 @@
|
|||||||
: "Discord"
|
: "Discord"
|
||||||
}}
|
}}
|
||||||
</RcBadge>
|
</RcBadge>
|
||||||
<RcBadge v-if="route.fallback" variant="warning" size="xs" class="route-badge route-badge-fallback">{{ t("route.fallback") }}</RcBadge>
|
<RcBadge
|
||||||
<RcBadge v-if="route.stop" variant="destructive" size="xs" class="route-badge route-badge-stop">{{ t("route.stop") }}</RcBadge>
|
v-if="route.fallback"
|
||||||
<RcBadge v-if="route.discordRoleIds?.length" size="xs" class="route-badge route-badge-role">@roles</RcBadge>
|
variant="warning"
|
||||||
|
size="xs"
|
||||||
|
class="route-badge route-badge-fallback"
|
||||||
|
>{{ t("route.fallback") }}</RcBadge
|
||||||
|
>
|
||||||
|
<RcBadge
|
||||||
|
v-if="route.stop"
|
||||||
|
variant="destructive"
|
||||||
|
size="xs"
|
||||||
|
class="route-badge route-badge-stop"
|
||||||
|
>{{ t("route.stop") }}</RcBadge
|
||||||
|
>
|
||||||
|
<RcBadge
|
||||||
|
v-if="route.discordRoleIds?.length"
|
||||||
|
size="xs"
|
||||||
|
class="route-badge route-badge-role"
|
||||||
|
>@roles</RcBadge
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+252
-22
@@ -94,35 +94,265 @@ const items = computed(() => {
|
|||||||
const docs = lang.value === "zh" ? `${docsBase.value}/zh` : `${docsBase.value}/`;
|
const docs = lang.value === "zh" ? `${docsBase.value}/zh` : `${docsBase.value}/`;
|
||||||
const q = (p: string): string => `${p}?lang=${lang.value}`;
|
const q = (p: string): string => `${p}?lang=${lang.value}`;
|
||||||
return [
|
return [
|
||||||
{ href: docs, label: t("文档", "Documentation"), desc: t("部署、配置与事件参考", "Deployment, configuration & event reference"), icon: BookOpen, external: true },
|
{
|
||||||
{ href: repo.value, label: t("GitHub 仓库", "GitHub Repository"), desc: t("源代码、问题与发布", "Source code, issues & releases"), icon: Github, external: true },
|
href: docs,
|
||||||
{ href: q("/terms"), label: t("服务条款", "Terms of Service"), desc: t("使用本服务的条款", "The terms for using this service"), icon: FileCheck2, external: false },
|
label: t("文档", "Documentation"),
|
||||||
{ href: q("/privacy"), label: t("隐私政策", "Privacy Policy"), desc: t("我们如何处理你的数据", "How we handle your data"), icon: ShieldCheck, external: false },
|
desc: t("部署、配置与事件参考", "Deployment, configuration & event reference"),
|
||||||
{ href: "/admin", label: t("登录控制台", "Sign in to Console"), desc: t("管理路由与分组", "Manage routes and groups"), icon: LogIn, external: false },
|
icon: BookOpen,
|
||||||
|
external: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
href: repo.value,
|
||||||
|
label: t("GitHub 仓库", "GitHub Repository"),
|
||||||
|
desc: t("源代码、问题与发布", "Source code, issues & releases"),
|
||||||
|
icon: Github,
|
||||||
|
external: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
href: q("/terms"),
|
||||||
|
label: t("服务条款", "Terms of Service"),
|
||||||
|
desc: t("使用本服务的条款", "The terms for using this service"),
|
||||||
|
icon: FileCheck2,
|
||||||
|
external: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
href: q("/privacy"),
|
||||||
|
label: t("隐私政策", "Privacy Policy"),
|
||||||
|
desc: t("我们如何处理你的数据", "How we handle your data"),
|
||||||
|
icon: ShieldCheck,
|
||||||
|
external: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
href: "/admin",
|
||||||
|
label: t("登录控制台", "Sign in to Console"),
|
||||||
|
desc: t("管理路由与分组", "Manage routes and groups"),
|
||||||
|
icon: LogIn,
|
||||||
|
external: false,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
title: "WebHooker",
|
title: "WebHooker",
|
||||||
meta: [{ name: "description", content: lang.value === "zh" ? "GitHub webhook 转发到 Discord" : "GitHub webhooks forwarded to Discord" }],
|
meta: [
|
||||||
|
{
|
||||||
|
name: "description",
|
||||||
|
content:
|
||||||
|
lang.value === "zh"
|
||||||
|
? "GitHub webhook 转发到 Discord"
|
||||||
|
: "GitHub webhooks forwarded to Discord",
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.landing-shell { position: relative; z-index: 1; width: min(100% - 2rem, 880px); min-height: 100vh; margin: 0 auto; padding: clamp(4rem, 10vh, 8rem) 0 2rem; overflow-x: clip; }
|
.landing-shell {
|
||||||
.landing-shell::before { position: absolute; z-index: -1; top: 3rem; right: -7rem; width: 24rem; height: 24rem; border-radius: 999px; background: radial-gradient(circle, color-mix(in srgb, rgb(var(--wh-accent)) 18%, transparent), transparent 68%); content: ""; filter: blur(10px); }
|
position: relative;
|
||||||
.landing-hero { max-width: 640px; animation: intro 500ms ease-out both; }
|
z-index: 1;
|
||||||
.brand-lockup { display: flex; align-items: center; gap: 1.1rem; margin: 1.5rem 0; }
|
width: min(100% - 2rem, 880px);
|
||||||
.brand-logo { box-shadow: 0 16px 38px rgb(var(--wh-accent) / .28); }
|
min-height: 100vh;
|
||||||
.eyebrow { margin: 0 0 .25rem; color: rgb(var(--wh-accent)); font-size: .7rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
|
margin: 0 auto;
|
||||||
h1 { margin: 0; font-size: clamp(2.55rem, 7vw, 4.6rem); font-weight: 800; letter-spacing: -.07em; line-height: .88; } h1 span { color: rgb(var(--wh-accent)); }
|
padding: clamp(4rem, 10vh, 8rem) 0 2rem;
|
||||||
.hero-copy { margin: 1.75rem 0 1.2rem; color: rgb(var(--wh-muted)); font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.8; }
|
overflow-x: clip;
|
||||||
.hero-meta { display: flex; align-items: center; gap: .75rem; color: rgb(var(--wh-faint)); font-size: .77rem; font-weight: 700; letter-spacing: .025em; } .hero-meta span:not(.meta-line) { display: inline-flex; align-items: center; gap: .35rem; } .meta-line { width: 1.5rem; height: 1px; background: rgb(var(--wh-border-strong)); }
|
}
|
||||||
.landing-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-top: clamp(2.5rem, 6vh, 4.5rem); }
|
.landing-shell::before {
|
||||||
.landing-action { overflow: hidden; animation: intro 500ms ease-out both; } .landing-action:nth-child(2) { animation-delay: 60ms; } .landing-action:nth-child(3) { animation-delay: 120ms; } .landing-action:nth-child(4) { animation-delay: 180ms; } .landing-action:nth-child(5) { animation-delay: 240ms; }
|
position: absolute;
|
||||||
.landing-action a { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: .85rem; min-height: 6.7rem; padding: 1.15rem; color: inherit; text-decoration: none; }
|
z-index: -1;
|
||||||
.action-index { align-self: start; color: rgb(var(--wh-faint)); font-family: var(--font-mono); font-size: .63rem; } .action-icon { color: rgb(var(--wh-accent)); } .action-copy { display: grid; gap: .22rem; min-width: 0; } .action-copy strong { font-size: .95rem; } .action-copy small { color: rgb(var(--wh-muted)); font-size: .77rem; line-height: 1.4; } .action-arrow { color: rgb(var(--wh-faint)); transition: transform 150ms ease; } .landing-action:hover .action-arrow { color: rgb(var(--wh-accent)); transform: translate(2px, -2px); }
|
top: 3rem;
|
||||||
.landing-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; color: rgb(var(--wh-faint)); font-size: .75rem; } .landing-footer span { display: flex; align-items: center; gap: .45rem; } .landing-footer i { width: .22rem; height: .22rem; border-radius: 999px; background: rgb(var(--wh-accent)); } .landing-footer-actions { display: flex; align-items: center; gap: .75rem; } .landing-footer a { display: inline-flex; align-items: center; gap: .4rem; color: rgb(var(--wh-muted)); text-decoration: none; } .landing-footer a:hover { color: rgb(var(--wh-accent)); }
|
right: -7rem;
|
||||||
@keyframes intro { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
|
width: 24rem;
|
||||||
@media (max-width: 580px) { .landing-shell { width: min(100% - 1.5rem, 880px); padding-top: 3rem; } .landing-actions { grid-template-columns: 1fr; } .landing-footer { align-items: flex-start; flex-direction: column; } .hero-meta { align-items: flex-start; flex-direction: column; } .meta-line { display: none; } }
|
height: 24rem;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: radial-gradient(
|
||||||
|
circle,
|
||||||
|
color-mix(in srgb, rgb(var(--wh-accent)) 18%, transparent),
|
||||||
|
transparent 68%
|
||||||
|
);
|
||||||
|
content: "";
|
||||||
|
filter: blur(10px);
|
||||||
|
}
|
||||||
|
.landing-hero {
|
||||||
|
max-width: 640px;
|
||||||
|
animation: intro 500ms ease-out both;
|
||||||
|
}
|
||||||
|
.brand-lockup {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1.1rem;
|
||||||
|
margin: 1.5rem 0;
|
||||||
|
}
|
||||||
|
.brand-logo {
|
||||||
|
box-shadow: 0 16px 38px rgb(var(--wh-accent) / 0.28);
|
||||||
|
}
|
||||||
|
.eyebrow {
|
||||||
|
margin: 0 0 0.25rem;
|
||||||
|
color: rgb(var(--wh-accent));
|
||||||
|
font-size: 0.7rem;
|
||||||
|
font-weight: 800;
|
||||||
|
letter-spacing: 0.15em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: clamp(2.55rem, 7vw, 4.6rem);
|
||||||
|
font-weight: 800;
|
||||||
|
letter-spacing: -0.07em;
|
||||||
|
line-height: 0.88;
|
||||||
|
}
|
||||||
|
h1 span {
|
||||||
|
color: rgb(var(--wh-accent));
|
||||||
|
}
|
||||||
|
.hero-copy {
|
||||||
|
margin: 1.75rem 0 1.2rem;
|
||||||
|
color: rgb(var(--wh-muted));
|
||||||
|
font-size: clamp(1rem, 2vw, 1.15rem);
|
||||||
|
line-height: 1.8;
|
||||||
|
}
|
||||||
|
.hero-meta {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.75rem;
|
||||||
|
color: rgb(var(--wh-faint));
|
||||||
|
font-size: 0.77rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: 0.025em;
|
||||||
|
}
|
||||||
|
.hero-meta span:not(.meta-line) {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.35rem;
|
||||||
|
}
|
||||||
|
.meta-line {
|
||||||
|
width: 1.5rem;
|
||||||
|
height: 1px;
|
||||||
|
background: rgb(var(--wh-border-strong));
|
||||||
|
}
|
||||||
|
.landing-actions {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
gap: 0.85rem;
|
||||||
|
margin-top: clamp(2.5rem, 6vh, 4.5rem);
|
||||||
|
}
|
||||||
|
.landing-action {
|
||||||
|
overflow: hidden;
|
||||||
|
animation: intro 500ms ease-out both;
|
||||||
|
}
|
||||||
|
.landing-action:nth-child(2) {
|
||||||
|
animation-delay: 60ms;
|
||||||
|
}
|
||||||
|
.landing-action:nth-child(3) {
|
||||||
|
animation-delay: 120ms;
|
||||||
|
}
|
||||||
|
.landing-action:nth-child(4) {
|
||||||
|
animation-delay: 180ms;
|
||||||
|
}
|
||||||
|
.landing-action:nth-child(5) {
|
||||||
|
animation-delay: 240ms;
|
||||||
|
}
|
||||||
|
.landing-action a {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto auto 1fr auto;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.85rem;
|
||||||
|
min-height: 6.7rem;
|
||||||
|
padding: 1.15rem;
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.action-index {
|
||||||
|
align-self: start;
|
||||||
|
color: rgb(var(--wh-faint));
|
||||||
|
font-family: var(--font-mono);
|
||||||
|
font-size: 0.63rem;
|
||||||
|
}
|
||||||
|
.action-icon {
|
||||||
|
color: rgb(var(--wh-accent));
|
||||||
|
}
|
||||||
|
.action-copy {
|
||||||
|
display: grid;
|
||||||
|
gap: 0.22rem;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.action-copy strong {
|
||||||
|
font-size: 0.95rem;
|
||||||
|
}
|
||||||
|
.action-copy small {
|
||||||
|
color: rgb(var(--wh-muted));
|
||||||
|
font-size: 0.77rem;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
.action-arrow {
|
||||||
|
color: rgb(var(--wh-faint));
|
||||||
|
transition: transform 150ms ease;
|
||||||
|
}
|
||||||
|
.landing-action:hover .action-arrow {
|
||||||
|
color: rgb(var(--wh-accent));
|
||||||
|
transform: translate(2px, -2px);
|
||||||
|
}
|
||||||
|
.landing-footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
gap: 1rem;
|
||||||
|
margin-top: 2rem;
|
||||||
|
color: rgb(var(--wh-faint));
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
|
.landing-footer span {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.45rem;
|
||||||
|
}
|
||||||
|
.landing-footer i {
|
||||||
|
width: 0.22rem;
|
||||||
|
height: 0.22rem;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgb(var(--wh-accent));
|
||||||
|
}
|
||||||
|
.landing-footer-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.75rem;
|
||||||
|
}
|
||||||
|
.landing-footer a {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.4rem;
|
||||||
|
color: rgb(var(--wh-muted));
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
.landing-footer a:hover {
|
||||||
|
color: rgb(var(--wh-accent));
|
||||||
|
}
|
||||||
|
@keyframes intro {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(12px);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 580px) {
|
||||||
|
.landing-shell {
|
||||||
|
width: min(100% - 1.5rem, 880px);
|
||||||
|
padding-top: 3rem;
|
||||||
|
}
|
||||||
|
.landing-actions {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
.landing-footer {
|
||||||
|
align-items: flex-start;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.hero-meta {
|
||||||
|
align-items: flex-start;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.meta-line {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -16,6 +16,11 @@ const lang = computed(() => pickLang(String(route.query.lang ?? "")));
|
|||||||
const contact = computed(() => legalContact(lang.value, String(config.public.legalContact ?? "")));
|
const contact = computed(() => legalContact(lang.value, String(config.public.legalContact ?? "")));
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
meta: [{ name: "description", content: lang.value === "zh" ? "WebHooker 隐私政策" : "WebHooker Privacy Policy" }],
|
meta: [
|
||||||
|
{
|
||||||
|
name: "description",
|
||||||
|
content: lang.value === "zh" ? "WebHooker 隐私政策" : "WebHooker Privacy Policy",
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
+6
-1
@@ -16,6 +16,11 @@ const lang = computed(() => pickLang(String(route.query.lang ?? "")));
|
|||||||
const contact = computed(() => legalContact(lang.value, String(config.public.legalContact ?? "")));
|
const contact = computed(() => legalContact(lang.value, String(config.public.legalContact ?? "")));
|
||||||
|
|
||||||
useHead({
|
useHead({
|
||||||
meta: [{ name: "description", content: lang.value === "zh" ? "WebHooker 服务条款" : "WebHooker Terms of Service" }],
|
meta: [
|
||||||
|
{
|
||||||
|
name: "description",
|
||||||
|
content: lang.value === "zh" ? "WebHooker 服务条款" : "WebHooker Terms of Service",
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -12,7 +12,8 @@ export function isDebugMode(env: Env): boolean {
|
|||||||
if (env.DEBUG_MODE === "true") return true;
|
if (env.DEBUG_MODE === "true") return true;
|
||||||
const anyEnv = env as unknown as Record<string, string | undefined>;
|
const anyEnv = env as unknown as Record<string, string | undefined>;
|
||||||
if (anyEnv["debug_mode"] === "true") return true;
|
if (anyEnv["debug_mode"] === "true") return true;
|
||||||
const proc = (globalThis as unknown as { process?: { env?: Record<string, string | undefined> } }).process;
|
const proc = (globalThis as unknown as { process?: { env?: Record<string, string | undefined> } })
|
||||||
|
.process;
|
||||||
if (proc?.env?.NODE_ENV !== "test") {
|
if (proc?.env?.NODE_ENV !== "test") {
|
||||||
if (proc?.env?.DEBUG_MODE === "true" || proc?.env?.debug_mode === "true") return true;
|
if (proc?.env?.DEBUG_MODE === "true" || proc?.env?.debug_mode === "true") return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user