Skip to content

Commit 11ece50

Browse files
authored
update admin homepage (#59)
* use ico instead of svg for favicon * update admin homepage; make alert closable and change button text
1 parent 6a060c6 commit 11ece50

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed
15 KB
Binary file not shown.

admin/src/portr_admin/static/favicon.svg

-4
This file was deleted.

admin/src/portr_admin/static/logo.svg

-3
This file was deleted.

admin/src/portr_admin/templates/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<link rel="icon" href="/static/favicon.svg" type="image/svg+xml" />
6+
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon" />
77
<title>Portr - Expose local ports to public URLs</title>
88
<style>
99
@font-face {

admin/src/web/src/pages/home.svelte

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script lang="ts">
22
import { onMount } from "svelte";
3-
43
import {
54
ExclamationTriangle,
65
LockClosed,
76
GithubLogo,
87
} from "radix-icons-svelte";
8+
import { X } from "lucide-svelte";
99
1010
import * as Alert from "$lib/components/ui/alert";
1111
import { Button } from "$lib/components/ui/button";
@@ -55,21 +55,17 @@
5555

5656
<div class="grid h-screen place-items-center">
5757
<div
58-
class="w-full max-w-sm p-6 m-auto mx-auto rounded-md dark:bg-gray-800 py-8 border"
58+
class="w-full max-w-sm p-6 m-auto mx-auto rounded-md dark:bg-gray-800 py-8"
5959
>
60-
<div class="flex justify-center mx-auto py-8 items-center space-x-2">
61-
<img class="w-auto h-12" src="/static/logo.svg" alt="" />
62-
</div>
63-
6460
<Button
65-
variant="default"
61+
variant="outline"
6662
class="w-full"
6763
href={encodeURIComponent(next) !== "null"
6864
? `/api/v1/auth/github?next=${encodeURIComponent(next)}`
6965
: `/api/v1/auth/github`}
7066
>
7167
<GithubLogo class="mr-2 h-4 w-4" />
72-
Continue with GitHub
68+
Login with GitHub
7369
</Button>
7470

7571
<div class="my-4">
@@ -87,10 +83,20 @@
8783
</div>
8884

8985
{#if message}
90-
<div class="mt-4">
86+
<div class="mt-4" id="error-message-box">
9187
<Alert.Root variant="destructive">
9288
<ExclamationTriangle class="h-4 w-4" />
93-
<Alert.Title>Error</Alert.Title>
89+
<Alert.Title>
90+
<p class="flex justify-between">
91+
<span>Error</span>
92+
<span
93+
on:click={() => {
94+
const element = document.getElementById("error-message-box");
95+
element?.remove();
96+
}}><X class="h-3 hover:cursor-pointer" /></span
97+
>
98+
</p>
99+
</Alert.Title>
94100
<Alert.Description>
95101
{message}
96102
</Alert.Description>

0 commit comments

Comments
 (0)