Merge pull request #105 from ProjectSegfault/dev‎‎​

Merge the captcha frontend to master now.
This commit is contained in:
Midou36O 2023-07-10 22:39:31 +01:00 committed by GitHub
commit baef551cac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 189 additions and 47 deletions

View File

@ -36,6 +36,7 @@
"@auth/core": "^0.2.5", "@auth/core": "^0.2.5",
"@auth/sveltekit": "^0.1.12", "@auth/sveltekit": "^0.1.12",
"joi": "^17.7.0", "joi": "^17.7.0",
"snarkdown": "^2.0.0" "snarkdown": "^2.0.0",
"svelte-hcaptcha": "^0.1.1"
} }
} }

9
pnpm-lock.yaml generated
View File

@ -1,4 +1,4 @@
lockfileVersion: '6.1' lockfileVersion: '6.0'
settings: settings:
autoInstallPeers: true autoInstallPeers: true
@ -17,6 +17,9 @@ dependencies:
snarkdown: snarkdown:
specifier: ^2.0.0 specifier: ^2.0.0
version: 2.0.0 version: 2.0.0
svelte-hcaptcha:
specifier: ^0.1.1
version: 0.1.1
devDependencies: devDependencies:
'@iconify-json/ic': '@iconify-json/ic':
@ -1667,6 +1670,10 @@ packages:
resolution: {integrity: sha512-/QmIqWGwzcfE82FAMuHBlKFwudW7Vcos60Ii8j/mJZ0H6kGAXwL5EGlcc8voBJMJv/i0QZmhp5b1ZX/XKg9NJQ==} resolution: {integrity: sha512-/QmIqWGwzcfE82FAMuHBlKFwudW7Vcos60Ii8j/mJZ0H6kGAXwL5EGlcc8voBJMJv/i0QZmhp5b1ZX/XKg9NJQ==}
dev: true dev: true
/svelte-hcaptcha@0.1.1:
resolution: {integrity: sha512-iFF3HwfrCRciJnDs4Y9/rpP/BM2U/5zt+vh+9d4tALPAHVkcANiJIKqYuS835pIaTm6gt+xOzjfFI3cgiRI29A==}
dev: false
/svelte-hmr@0.15.1(svelte@3.55.1): /svelte-hmr@0.15.1(svelte@3.55.1):
resolution: {integrity: sha512-BiKB4RZ8YSwRKCNVdNxK/GfY+r4Kjgp9jCLEy0DuqAKfmQtpL38cQK3afdpjw4sqSs4PLi3jIPJIFp259NkZtA==} resolution: {integrity: sha512-BiKB4RZ8YSwRKCNVdNxK/GfY+r4Kjgp9jCLEy0DuqAKfmQtpL38cQK3afdpjw4sqSs4PLi3jIPJIFp259NkZtA==}
engines: {node: ^12.20 || ^14.13.1 || >= 16} engines: {node: ^12.20 || ^14.13.1 || >= 16}

View File

@ -2,6 +2,12 @@
import type { PageData } from "./$types"; import type { PageData } from "./$types";
export let data: PageData; export let data: PageData;
let insturl: "short" | "long";
let toggle = () => {
insturl = insturl === "long" ? "short" : "long";
};
insturl = "long";
</script> </script>
<div class="h1-no-lg flex flex-col sm:(flex-row items-center) gap-4 !mb-0"> <div class="h1-no-lg flex flex-col sm:(flex-row items-center) gap-4 !mb-0">
@ -15,6 +21,22 @@
</div> </div>
<div class="flex flex-col"> <div class="flex flex-col">
<button
on:click={toggle}
class="text-text flex items-center text-sm"
>
<div
class="i-ic:{insturl === 'long'
? 'baseline-toggle-off'
: 'baseline-toggle-on'} h-10 w-10"
/>
{#if insturl === "long"}
Long URL
{:else}
Short URL
{/if}
</button>
{#if insturl === "long"}
{#each data.instances as category} {#each data.instances as category}
<div class="flex flex-col"> <div class="flex flex-col">
<h2>{category.name}</h2> <h2>{category.name}</h2>
@ -40,4 +62,31 @@
</div> </div>
</div> </div>
{/each} {/each}
{:else}
{#each data.instances as category}
<div class="flex flex-col">
<h2>{category.name}</h2>
<div class="flex flex-row flex-wrap gap-4">
{#each category.data as instance}
<a
href={instance.short_geo || instance.short_eu || instance.geo || instance.eu}
class="flex flex-row items-center gap-4 rounded bg-secondary p-4 w-110 no-underline text-text"
>
{#if instance.icon}
<img
src={instance.icon}
alt="{instance.name} logo"
class="h-20 rounded"
/>
{/if}
<div>
<span class="text-2xl">{instance.name}</span>
<p>{instance.description}</p>
</div>
</a>
{/each}
</div>
</div>
{/each}
{/if}
</div> </div>

View File

@ -34,6 +34,21 @@
{#if instance.bp} {#if instance.bp}
<a href={instance.bp}>Backup</a> <a href={instance.bp}>Backup</a>
{/if} {/if}
{#if instance.short_geo}
<a href={instance.short_geo}>GeoDNS (Short URL)</a>
{/if}
{#if instance.short_eu}
<a href={instance.short_eu}>EU (Short URL)</a>
{/if}
{#if instance.short_us}
<a href={instance.short_us}>US (Short URL)</a>
{/if}
{#if instance.short_in}
<a href={instance.short_in}>IN (Short URL)</a>
{/if}
{#if instance.short_bp}
<a href={instance.short_bp}>Backup (Short URL)</a>
{/if}
{#if instance.tor} {#if instance.tor}
<a href={instance.tor}>Tor</a> <a href={instance.tor}>Tor</a>
{/if} {/if}

View File

@ -7,10 +7,15 @@ interface Instance {
name: string; name: string;
description: string; description: string;
geo?: string; geo?: string;
short_geo?: string;
eu?: string; eu?: string;
short_eu?: string;
us?: string; us?: string;
short_us?: string;
in?: string; in?: string;
short_in?: string;
bp?: string; bp?: string;
short_bp?: string;
tor?: string; tor?: string;
torBp?: string; torBp?: string;
i2p?: string; i2p?: string;
@ -26,9 +31,13 @@ const instances: Instances[] = [
name: "Invidious", name: "Invidious",
description: "A frontend for YouTube.", description: "A frontend for YouTube.",
eu: "https://invidious.projectsegfau.lt/", eu: "https://invidious.projectsegfau.lt/",
us: "https://inv.us.projectsegfau.lt", short_eu: "https://i.psf.lt/",
in: "https://inv.in.projectsegfau.lt", us: "https://inv.us.projectsegfau.lt/",
bp: "https://inv.bp.projectsegfau.lt", short_us: "https://i.us.psf.lt/",
in: "https://inv.in.projectsegfau.lt/",
short_in: "https://i.in.psf.lt/",
bp: "https://inv.bp.projectsegfau.lt/",
short_bp: "https://i.bp.psf.lt/",
tor: "http://inv.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", tor: "http://inv.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
torBp: "http://invbp.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", torBp: "http://invbp.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
i2p: "http://pjsfhqamc7k6htnumrvn4cwqqdoggeepj7u5viyimgnxg3gar72q.b32.i2p", i2p: "http://pjsfhqamc7k6htnumrvn4cwqqdoggeepj7u5viyimgnxg3gar72q.b32.i2p",
@ -39,17 +48,24 @@ const instances: Instances[] = [
name: "Piped", name: "Piped",
description: "Another frontend for YouTube.", description: "Another frontend for YouTube.",
eu: "https://piped.projectsegfau.lt/", eu: "https://piped.projectsegfau.lt/",
us: "https://piped.us.projectsegfau.lt", short_eu: "https://pi.psf.lt/",
in: "https://piped.in.projectsegfau.lt", us: "https://piped.us.projectsegfau.lt/",
short_us: "https://pi.us.psf.lt/",
in: "https://piped.in.projectsegfau.lt/",
short_in: "https://piped.in.projectsegfau.lt/",
icon: "/icons/piped.svg" icon: "/icons/piped.svg"
}, },
{ {
name: "Libreddit", name: "Libreddit",
description: "A frontend for Reddit.", description: "A frontend for Reddit.",
geo: "https://libreddit.projectsegfau.lt/", geo: "https://libreddit.projectsegfau.lt/",
short_geo: "https://lr.psf.lt/",
eu: "https://libreddit.eu.projectsegfau.lt/", eu: "https://libreddit.eu.projectsegfau.lt/",
us: "https://libreddit.us.projectsegfau.lt", short_eu: "https://lr.eu.psf.lt/",
in: "https://libreddit.in.projectsegfau.lt", us: "https://libreddit.us.projectsegfau.lt/",
short_us: "https://lr.us.psf.lt/",
in: "https://libreddit.in.projectsegfau.lt/",
short_in: "https://lr.in.psf.lt/",
tor: "http://libreddit.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", tor: "http://libreddit.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
i2p: "http://pjsfkref7g66mji45kyccqnn5hmjtjp3cfodozabpyplj2rmv5sa.b32.i2p", i2p: "http://pjsfkref7g66mji45kyccqnn5hmjtjp3cfodozabpyplj2rmv5sa.b32.i2p",
icon: "/icons/libreddit.png" icon: "/icons/libreddit.png"
@ -58,9 +74,13 @@ const instances: Instances[] = [
name: "Nitter", name: "Nitter",
description: "A frontend for Twitter.", description: "A frontend for Twitter.",
geo: "https://nitter.projectsegfau.lt/", geo: "https://nitter.projectsegfau.lt/",
short_geo: "https://n.psf.lt/",
eu: "https://nitter.eu.projectsegfau.lt/", eu: "https://nitter.eu.projectsegfau.lt/",
us: "https://nitter.us.projectsegfau.lt", short_eu: "https://n.eu.psf.lt/",
in: "https://nitter.in.projectsegfau.lt", us: "https://nitter.us.projectsegfau.lt/",
short_us: "https://n.us.psf.lt/",
in: "https://nitter.in.projectsegfau.lt/",
short_in: "https://n.in.psf.lt/",
tor: "http://nitter.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", tor: "http://nitter.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
i2p: "http://pjsfs4ukb6prmfx3qx3a5ef2cpcupkvcrxdh72kqn2rxc2cw4nka.b32.i2p", i2p: "http://pjsfs4ukb6prmfx3qx3a5ef2cpcupkvcrxdh72kqn2rxc2cw4nka.b32.i2p",
icon: "/icons/nitter.png" icon: "/icons/nitter.png"
@ -68,10 +88,14 @@ const instances: Instances[] = [
{ {
name: "AnonymousOverflow", name: "AnonymousOverflow",
description: "A frontend for StackOverflow.", description: "A frontend for StackOverflow.",
geo: "https://overflow.projectsegfau.lt", geo: "https://overflow.projectsegfau.lt/",
eu: "https://overflow.eu.projectsegfau.lt", short_geo: "https://o.psf.lt/",
us: "https://overflow.us.projectsegfau.lt", eu: "https://overflow.eu.projectsegfau.lt/",
in: "https://overflow.in.projectsegfau.lt", short_eu: "https://o.eu.psf.lt/",
us: "https://overflow.us.projectsegfau.lt/",
short_us: "https://o.us.psf.lt/",
in: "https://overflow.in.projectsegfau.lt/",
short_in: "https://o.in.psf.lt/",
tor: "http://overflow.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", tor: "http://overflow.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
icon: "/icons/anonymousoverflow.png" icon: "/icons/anonymousoverflow.png"
}, },
@ -79,6 +103,7 @@ const instances: Instances[] = [
name: "Beatbump", name: "Beatbump",
description: "A frontend for YouTube Music.", description: "A frontend for YouTube Music.",
geo: "https://bb.projectsegfau.lt/", geo: "https://bb.projectsegfau.lt/",
short_geo: "https://bb.projectsegfau.lt/",
eu: "https://bb.eu.projectsegfau.lt/", eu: "https://bb.eu.projectsegfau.lt/",
us: "https://bb.us.projectsegfau.lt/", us: "https://bb.us.projectsegfau.lt/",
in: "https://bb.in.projectsegfau.lt/", in: "https://bb.in.projectsegfau.lt/",
@ -90,9 +115,13 @@ const instances: Instances[] = [
name: "BreezeWiki", name: "BreezeWiki",
description: "A frontend for Fandom.", description: "A frontend for Fandom.",
geo: "https://bw.projectsegfau.lt/", geo: "https://bw.projectsegfau.lt/",
short_geo: "https://bw.psf.lt/",
eu: "https://bw.eu.projectsegfau.lt/", eu: "https://bw.eu.projectsegfau.lt/",
short_eu: "https://bw.eu.psf.lt/",
us: "https://bw.us.projectsegfau.lt/", us: "https://bw.us.projectsegfau.lt/",
short_us: "https://bw.us.psf.lt/",
in: "https://bw.in.projectsegfau.lt/", in: "https://bw.in.projectsegfau.lt/",
short_in: "https://bw.in.psf.lt/",
tor: "http://breezewiki.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", tor: "http://breezewiki.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
i2p: "http://pjsfk4xvekoc7wx4pteevp3q2wy7jmzlem7rvl74nx33zkdr4vyq.b32.i2p", i2p: "http://pjsfk4xvekoc7wx4pteevp3q2wy7jmzlem7rvl74nx33zkdr4vyq.b32.i2p",
icon: "/icons/breezewiki.svg" icon: "/icons/breezewiki.svg"
@ -100,31 +129,28 @@ const instances: Instances[] = [
{ {
name: "GotHub", name: "GotHub",
description: "A frontend for GitHub.", description: "A frontend for GitHub.",
geo: "https://gothub.projectsegfau.lt", geo: "https://gothub.projectsegfau.lt/",
eu: "https://gothub.eu.projectsegfau.lt", short_geo: "https://gh.psf.lt/",
us: "https://gothub.us.projectsegfau.lt", eu: "https://gothub.eu.projectsegfau.lt/",
in: "https://gothub.in.projectsegfau.lt", short_eu: "https://gh.eu.psf.lt/",
us: "https://gothub.us.projectsegfau.lt/",
short_us: "https://gh.us.psf.lt/",
in: "https://gothub.in.projectsegfau.lt/",
short_in: "https://gh.in.psf.lt/",
tor: "http://gothub.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", tor: "http://gothub.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
icon: "/icons/gothub.svg" icon: "/icons/gothub.svg"
}, },
{
name: "Librarian",
description: "A frontend for LBRY/Odysee.",
geo: "https://lbry.projectsegfau.lt/",
eu: "https://lbry.eu.projectsegfau.lt/",
us: "https://lbry.us.projectsegfau.lt/",
in: "https://lbry.in.projectsegfau.lt/",
tor: "http://lbry.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
i2p: "http://pjsf7uucpqf2crcmfo3nvwdmjhirxxjfyuvibdfp5x3af2ghqnaa.b32.i2p",
icon: "/icons/librarian.png"
},
{ {
name: "Rimgo", name: "Rimgo",
description: "A frontend for Imgur.", description: "A frontend for Imgur.",
geo: "https://rimgo.projectsegfau.lt/", geo: "https://rimgo.projectsegfau.lt/",
short_geo: "https://rg.psf.lt/",
eu: "https://rimgo.eu.projectsegfau.lt/", eu: "https://rimgo.eu.projectsegfau.lt/",
short_eu: "https://rg.eu.psf.lt/",
us: "https://rimgo.us.projectsegfau.lt/", us: "https://rimgo.us.projectsegfau.lt/",
short_us: "https://rg.us.psf.lt/",
in: "https://rimgo.in.projectsegfau.lt/", in: "https://rimgo.in.projectsegfau.lt/",
short_in: "https://rg.in.psf.lt/",
tor: "http://rimgo.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", tor: "http://rimgo.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
icon: "/icons/rimgo.png" icon: "/icons/rimgo.png"
}, },
@ -132,9 +158,13 @@ const instances: Instances[] = [
name: "Scribe", name: "Scribe",
description: "A frontend for Medium.", description: "A frontend for Medium.",
geo: "https://scribe.projectsegfau.lt/", geo: "https://scribe.projectsegfau.lt/",
short_geo: "https://sc.psf.lt/",
eu: "https://scribe.eu.projectsegfau.lt/", eu: "https://scribe.eu.projectsegfau.lt/",
short_eu: "https://sc.eu.psf.lt/",
us: "https://scribe.us.projectsegfau.lt/", us: "https://scribe.us.projectsegfau.lt/",
short_us: "https://sc.us.psf.lt/",
in: "https://scribe.in.projectsegfau.lt/", in: "https://scribe.in.projectsegfau.lt/",
short_in: "https://sc.in.psf.lt/",
tor: "http://scribe.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", tor: "http://scribe.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
i2p: "http://pjsflkkkcn33ahmzmpyq6idy2knkzh4atp7zaetqfsnenpyori6a.b32.i2p" i2p: "http://pjsflkkkcn33ahmzmpyq6idy2knkzh4atp7zaetqfsnenpyori6a.b32.i2p"
}, },
@ -142,9 +172,13 @@ const instances: Instances[] = [
name: "Teddit", name: "Teddit",
description: "Another frontend for Reddit.", description: "Another frontend for Reddit.",
geo: "https://teddit.projectsegfau.lt/", geo: "https://teddit.projectsegfau.lt/",
short_geo: "https://t.psf.lt/",
eu: "https://teddit.eu.projectsegfau.lt/", eu: "https://teddit.eu.projectsegfau.lt/",
short_eu: "https://t.eu.psf.lt/",
us: "https://teddit.us.projectsegfau.lt/", us: "https://teddit.us.projectsegfau.lt/",
short_us: "https://t.us.psf.lt/",
in: "https://teddit.in.projectsegfau.lt/", in: "https://teddit.in.projectsegfau.lt/",
short_in: "https://t.in.psf.lt/",
tor: "http://teddit.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", tor: "http://teddit.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
icon: "/icons/teddit.png" icon: "/icons/teddit.png"
}, },
@ -157,43 +191,52 @@ const instances: Instances[] = [
name: "Matrix", name: "Matrix",
description: "An open network for secure, decentralized communication.", description: "An open network for secure, decentralized communication.",
eu: "https://wiki.projectsegfau.lt/Matrix", eu: "https://wiki.projectsegfau.lt/Matrix",
short_eu: "https://w.psf.lt/Matrix",
icon: "/icons/matrix.svg" icon: "/icons/matrix.svg"
}, },
{ {
name: "Element", name: "Element",
description: "A feature-rich Matrix client.", description: "A feature-rich Matrix client.",
eu: "https://chat.projectsegfau.lt/", eu: "https://chat.projectsegfau.lt/",
short_eu: "https://el.psf.lt/",
icon: "/icons/element.svg" icon: "/icons/element.svg"
}, },
{ {
name: "Hydrogen", name: "Hydrogen",
description: "A lightweight Matrix client.", description: "A lightweight Matrix client.",
eu: "https://hydrogen.projectsegfau.lt/", eu: "https://hydrogen.projectsegfau.lt/",
short_eu: "https://h2.psf.lt/",
icon: "/icons/hydrogen.svg" icon: "/icons/hydrogen.svg"
}, },
{ {
name: "Cinny", name: "Cinny",
description: "An elegant Matrix client.", description: "An elegant Matrix client.",
eu: "https://cinny.projectsegfau.lt/", eu: "https://cinny.projectsegfau.lt/",
short_eu: "https://cy.psf.lt/",
icon: "/icons/cinny.svg" icon: "/icons/cinny.svg"
}, },
{ {
name: "XMPP", name: "XMPP",
description: "The universal messaging standard.", description: "The universal messaging standard.",
eu: "https://wiki.projectsegfau.lt/XMPP", eu: "https://wiki.projectsegfau.lt/XMPP",
short_eu: "https://w.psf.lt/XMPP",
icon: "/icons/xmpp.svg" icon: "/icons/xmpp.svg"
}, },
{ {
name: "XMPP Web", name: "XMPP Web",
description: "Lightweight web chat client for XMPP.", description: "Lightweight web chat client for XMPP.",
eu: "https://xmpp-web.projectsegfau.lt/" eu: "https://xmpp-web.projectsegfau.lt/",
short_eu: "https://x.psf.lt/"
}, },
{ {
name: "SearXNG", name: "SearXNG",
description: "A private meta-search engine.", description: "A private meta-search engine.",
eu: "https://search.projectsegfau.lt/", eu: "https://search.projectsegfau.lt/",
us: "https://search.us.projectsegfau.lt", short_eu: "https://s.psf.lt/",
in: "https://search.in.projectsegfau.lt", us: "https://search.us.projectsegfau.lt/",
short_us: "https://s.us.psf.lt/",
in: "https://search.in.projectsegfau.lt/",
short_in: "https://s.in.psf.lt/",
tor: "http://search.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", tor: "http://search.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
i2p: "http://pjsfwklrellqoj275kzeu2tz4c3j5zktnqod56s7l5dc25ro3wgq.b32.i2p", i2p: "http://pjsfwklrellqoj275kzeu2tz4c3j5zktnqod56s7l5dc25ro3wgq.b32.i2p",
icon: "/icons/searxng.svg" icon: "/icons/searxng.svg"
@ -202,6 +245,7 @@ const instances: Instances[] = [
name: "Gitea", name: "Gitea",
description: "A web interface for Git, alternative to GitHub.", description: "A web interface for Git, alternative to GitHub.",
eu: "https://git.projectsegfau.lt/", eu: "https://git.projectsegfau.lt/",
short_eu: "https://git.psf.lt/",
tor: "http://git.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", tor: "http://git.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
i2p: "http://pjsfdrtv2465bisenvzhfvdleznx4arlih2hlnrhpzugailnm7iq.b32.i2p", i2p: "http://pjsfdrtv2465bisenvzhfvdleznx4arlih2hlnrhpzugailnm7iq.b32.i2p",
icon: "/icons/gitea.svg" icon: "/icons/gitea.svg"
@ -209,19 +253,22 @@ const instances: Instances[] = [
{ {
name: "Hedgedoc", name: "Hedgedoc",
description: "Collaborative markdown notes.", description: "Collaborative markdown notes.",
eu: "https://doc.projectsegfau.lt", eu: "https://doc.projectsegfau.lt/",
short_eu: "https://d.psf.lt/",
icon: "/icons/hedgedoc.svg" icon: "/icons/hedgedoc.svg"
}, },
{ {
name: "Akkoma", name: "Akkoma",
description: "Federated microblogging platform.", description: "Federated microblogging platform.",
eu: "https://social.projectsegfau.lt/", eu: "https://social.projectsegfau.lt/",
short_eu: "https://ak.psf.lt/",
icon: "/icons/akkoma.png" icon: "/icons/akkoma.png"
}, },
{ {
name: "Vikunja", name: "Vikunja",
description: "A task management platform.", description: "A task management platform.",
eu: "https://todo.projectsegfau.lt/", eu: "https://todo.projectsegfau.lt/",
short_eu: "https://vi.psf.lt/",
tor: "http://todo.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", tor: "http://todo.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
i2p: "http://pjsfivs2sxudfy65kojxqophc6vqjqdr6woczy6hzaxvxvbj3bkq.b32.i2p", i2p: "http://pjsfivs2sxudfy65kojxqophc6vqjqdr6woczy6hzaxvxvbj3bkq.b32.i2p",
icon: "/icons/vikunja.png" icon: "/icons/vikunja.png"
@ -229,26 +276,29 @@ const instances: Instances[] = [
{ {
name: "Jitsi", name: "Jitsi",
description: "An open source video conferencing platform.", description: "An open source video conferencing platform.",
eu: "https://jitsi.projectsegfau.lt", eu: "https://jitsi.projectsegfau.lt/",
short_eu: "https://j.psf.lt/",
icon: "/icons/jitsi.svg" icon: "/icons/jitsi.svg"
}, },
{ {
name: "Vaultwarden", name: "Vaultwarden",
description: "An open source password manager.", description: "An open source password manager.",
eu: "https://pass.projectsegfau.lt", eu: "https://pass.projectsegfau.lt/",
short_eu: "https://vw.psf.lt/",
tor: "http://pass.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", tor: "http://pass.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
icon: "/icons/vaultwarden.svg" icon: "/icons/vaultwarden.svg"
}, },
{ {
name: "Plausible analytics", name: "Plausible analytics",
description: "Analytics for our website.", description: "Analytics for our website.",
eu: "https://analytics.projectsegfau.lt/projectsegfau.lt", eu: "https://analytics.projectsegfau.lt/",
icon: "/icons/plausible.png" icon: "/icons/plausible.png"
}, },
{ {
name: "Healthchecks", name: "Healthchecks",
description: "Simple and Effective Cron Job Monitoring.", description: "Simple and Effective Cron Job Monitoring.",
eu: "https://healthchecks.projectsegfau.lt", eu: "https://healthchecks.projectsegfau.lt/",
short_eu: "https://hc.psf.lt/",
icon: "/icons/healthchecks.svg" icon: "/icons/healthchecks.svg"
} }
] ]
@ -259,19 +309,20 @@ const instances: Instances[] = [
{ {
name: "Pubnix", name: "Pubnix",
description: "A Unix server open to the public with non-commercial recreational goals.", description: "A Unix server open to the public with non-commercial recreational goals.",
eu: "https://p.projectsegfau.lt", eu: "https://p.projectsegfau.lt/",
short_eu: "https://p.psf.lt/",
icon: "/icons/pubnix.png" icon: "/icons/pubnix.png"
}, },
{ {
name: "Public Authentik", name: "Public Authentik",
description: "Authentik for signup to our services.", description: "Authentik for signup to our services.",
eu: "https://auth.p.projectsegfau.lt", eu: "https://auth.p.projectsegfau.lt/",
icon: "/icons/authentik.svg" icon: "/icons/authentik.svg"
}, },
{ {
name: "Cockpit", name: "Cockpit",
description: "WebUI for users to access the pubnix services.", description: "WebUI for users to access the pubnix services.",
eu: "https://cockpit.p.projectsegfau.lt", eu: "https://cockpit.p.projectsegfau.lt/",
icon: "/icons/cockpit.svg" icon: "/icons/cockpit.svg"
}, },
{ {
@ -282,7 +333,8 @@ const instances: Instances[] = [
{ {
name: "Gemini Proxy", name: "Gemini Proxy",
description: "Access Gemini sites from the web.", description: "Access Gemini sites from the web.",
eu: "https://geminiproxy.p.projectsegfau.lt", eu: "https://geminiproxy.p.projectsegfau.lt/",
short_eu: "https://gp.p.psf.lt/"
} }
] ]
}, },
@ -311,12 +363,14 @@ const instances: Instances[] = [
name: "SimpleLogin", name: "SimpleLogin",
description: "An open source email alias creator/manager", description: "An open source email alias creator/manager",
eu: "https://sl.projectsegfau.lt/", eu: "https://sl.projectsegfau.lt/",
short_eu: "https://sl.psf.lt/",
icon: "/icons/simplelogin.svg" icon: "/icons/simplelogin.svg"
}, },
{ {
name: "MediaWiki", name: "MediaWiki",
description: "Our wiki.", description: "Our wiki.",
eu: "https://wiki.projectsegfau.lt/", eu: "https://wiki.projectsegfau.lt/",
short_eu: "https://w.psf.lt/",
tor: "http://wiki.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion", tor: "http://wiki.pjsfkvpxlinjamtawaksbnnaqs2fc2mtvmozrzckxh7f3kis6yea25ad.onion",
icon: "/icons/mediawiki.svg" icon: "/icons/mediawiki.svg"
} }

View File

@ -15,9 +15,7 @@ export const actions: Actions = {
const BodyTypeSchema = Joi.object({ const BodyTypeSchema = Joi.object({
username: Joi.string() username: Joi.string()
.required() .required()
.pattern( .pattern(/^[a-z_][a-z0-9_]{0,20}$/)
/^[a-z_][a-z0-9_]{0,20}$/
)
.message("Invalid username ([A-Za-z0-9_])"), .message("Invalid username ([A-Za-z0-9_])"),
email: Joi.string().email().required(), email: Joi.string().email().required(),
ssh: Joi.string() ssh: Joi.string()
@ -26,7 +24,10 @@ export const actions: Actions = {
/^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp256|ecdsa-sha2-nistp384|ecdsa-sha2-nistp521) [A-Za-z0-9+/]+[=]{0,3}( [^@]+@[^@]+)?$/ /^(ssh-rsa|ssh-ed25519|ecdsa-sha2-nistp256|ecdsa-sha2-nistp384|ecdsa-sha2-nistp521) [A-Za-z0-9+/]+[=]{0,3}( [^@]+@[^@]+)?$/
) )
.message("Invalid SSH key"), .message("Invalid SSH key"),
ip: Joi.string().required().ip() ip: Joi.string().required().ip(),
"h-captcha-response": Joi.string().required().messages({
"any.only": "Captcha is required."
})
}); });
formData.append("ip", getClientAddress()); formData.append("ip", getClientAddress());

View File

@ -1,7 +1,11 @@
<script lang="ts"> <script lang="ts">
import type { ActionData, PageData } from "./$types"; import type { ActionData, PageData } from "./$types";
import HCaptcha from "svelte-hcaptcha";
export let form: ActionData; export let form: ActionData;
export let data: PageData; export let data: PageData;
let siteKey = "cb477b1b-6f87-43ee-aa79-71e3302fbb34";
//export const hcaptchaSiteKey = env.HCAPTCHA_SITE_KEY;
</script> </script>
<h1>{data.title}</h1> <h1>{data.title}</h1>
@ -43,6 +47,13 @@
rows="5" rows="5"
required required
/> />
<div>
<label for="h-captcha-response"
><HCaptcha sitekey={siteKey} />
</label>
</div>
</div> </div>
{#if form?.success} {#if form?.success}
@ -53,6 +64,10 @@
{form.message} {form.message}
{/if} {/if}
<div style="display:block;" >
<input type="checkbox" style="display:inline-block;width: 1em;margin-right: 10px;" required><p style="display:inline-block;word-break: break-all;">I agree to the <a href="/legal/tos">Terms of Service</p>.
</div>
<button <button
type="submit" type="submit"
class="transition-filter duration-200 hover:brightness-75" class="transition-filter duration-200 hover:brightness-75"

View File

@ -22,7 +22,7 @@ export default defineConfig({
transformers: [transformerVariantGroup(), transformerDirectives()], transformers: [transformerVariantGroup(), transformerDirectives()],
safelist: ["i-ic:outline-dark-mode", "i-ic:outline-light-mode"], safelist: ["i-ic:outline-dark-mode", "i-ic:outline-light-mode", "i-ic:baseline-toggle-on", "i-ic:baseline-toggle-off"],
theme: { theme: {
fontFamily: { fontFamily: {