Skip to content

Commit

Permalink
SMTP
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewstech committed Dec 7, 2023
1 parent b5b1946 commit 19bcaef
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
faGlobe,
faKeyboard,
faLock,
faRightFromBracket
faEnvelope,
faRightFromBracket,
} from '@fortawesome/free-solid-svg-icons';
// The ordering of these imports is critical to your app working properly
import '@skeletonlabs/skeleton/themes/theme-crimson.css';
Expand All @@ -32,10 +33,9 @@
icon: faKeyboard
},
{
name: 'Maintainers',
path: '/maintainers',
icon: faLock,
hidden: Maintainers
name: 'SMTP',
path: '/smtp',
icon: faEnvelope
}
];
</script>
Expand Down
16 changes: 16 additions & 0 deletions src/routes/smtp/+page.server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { getJWT } from '$lib/jwt.js'
import { redirect } from '@sveltejs/kit'
import {ListDomains} from '$lib/api.js'
export async function load({cookies}){
let jwt = cookies.get('jwt');
let user = getJWT(jwt);
if(!user) throw redirect(303, '/login');
let domains = await ListDomains(user.user.login);


return {
user: user.user,
subdomains: domains,
count: domains.length || 0
};
}
19 changes: 19 additions & 0 deletions src/routes/smtp/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<script>
import { Table } from '@skeletonlabs/skeleton';
import Fa from 'svelte-fa';
import { faBookReader, faGear } from '@fortawesome/free-solid-svg-icons';
export let data;
</script>

<h2 class="h2">SMTP settings</h2>
<br />

{#if data.count === 0}
<p class="text-center">You have no domains yet. <a href="/register">Let's change that!</a></p>
{:else}

<p class="text-center">Coming soon</p>

{/if}

0 comments on commit 19bcaef

Please sign in to comment.