-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5b1946
commit 19bcaef
Showing
3 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |