From 9c289753dd4a8d7add6bfce73fdb5b6b8889a24a Mon Sep 17 00:00:00 2001 From: pluja Date: Tue, 20 May 2025 11:00:28 +0000 Subject: [PATCH] fix generate --- web/.env.example | 4 +++- web/astro.config.mjs | 12 ++++++++++++ web/src/components/Captcha.astro | 1 + web/src/components/Footer.astro | 16 ++++++++++++++-- web/src/pages/admin/users/index.astro | 8 ++++++++ 5 files changed, 38 insertions(+), 3 deletions(-) diff --git a/web/.env.example b/web/.env.example index 56f0455..a64bebe 100644 --- a/web/.env.example +++ b/web/.env.example @@ -1,4 +1,6 @@ DATABASE_URL="postgresql://kycnot:kycnot@localhost:3399/kycnot?schema=public" REDIS_URL="redis://localhost:6379" SOURCE_CODE_URL="https://github.com" -SITE_URL="https://localhost:4321" \ No newline at end of file +SITE_URL="https://localhost:4321" +ONION_ADDRESS="http://kycnotmezdiftahfmc34pqbpicxlnx3jbf5p7jypge7gdvduu7i6qjqd.onion" +I2P_ADDRESS="http://nti3rj4j4disjcm2kvp4eno7otcejbbxv3ggxwr5tpfk4jucah7q.b32.i2p" diff --git a/web/astro.config.mjs b/web/astro.config.mjs index 9cdb5ef..eb228e8 100644 --- a/web/astro.config.mjs +++ b/web/astro.config.mjs @@ -74,6 +74,18 @@ export default defineConfig({ url: true, optional: false, }), + I2P_ADDRESS: envField.string({ + context: 'server', + access: 'public', + url: true, + optional: false, + }), + ONION_ADDRESS: envField.string({ + context: 'server', + access: 'public', + url: true, + optional: false, + }), REDIS_URL: envField.string({ context: 'server', diff --git a/web/src/components/Captcha.astro b/web/src/components/Captcha.astro index 4e20df5..a9cb8fa 100644 --- a/web/src/components/Captcha.astro +++ b/web/src/components/Captcha.astro @@ -1,6 +1,7 @@ --- import { Icon } from 'astro-icon/components' import { isInputError, type ActionAccept, type ActionClient } from 'astro:actions' +import { Image } from 'astro:assets' import { CAPTCHA_LENGTH, generateCaptcha } from '../lib/captcha' import { cn } from '../lib/cn' diff --git a/web/src/components/Footer.astro b/web/src/components/Footer.astro index 984e668..3161448 100644 --- a/web/src/components/Footer.astro +++ b/web/src/components/Footer.astro @@ -1,6 +1,6 @@ --- import { Icon } from 'astro-icon/components' -import { SOURCE_CODE_URL } from 'astro:env/server' +import { SOURCE_CODE_URL, I2P_ADDRESS, ONION_ADDRESS } from 'astro:env/server' import { cn } from '../lib/cn' @@ -11,10 +11,22 @@ type Props = HTMLAttributes<'footer'> const links = [ { href: SOURCE_CODE_URL, - label: 'Source Code', + label: 'Code', icon: 'ri:git-repository-line', external: true, }, + { + href: ONION_ADDRESS, + label: 'Tor', + icon: 'onion', + external: true, + }, + { + href: I2P_ADDRESS, + label: 'I2P', + icon: 'i2p', + external: true, + }, { href: '/about', label: 'About', diff --git a/web/src/pages/admin/users/index.astro b/web/src/pages/admin/users/index.astro index 7bc26e9..efcd8c7 100644 --- a/web/src/pages/admin/users/index.astro +++ b/web/src/pages/admin/users/index.astro @@ -336,6 +336,14 @@ const makeSortUrl = (slug: NonNullable<(typeof filters)['sort-by']>) => { > + + +