diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..d3c3a0a --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +PUBLIC_HEADSCALE_URL=https://tailscale.example.com +PUBLIC_API_KEY=abcdefghijklmnopqrstuvwxyz diff --git a/src/app.css b/src/app.css new file mode 100644 index 0000000..b89e7ad --- /dev/null +++ b/src/app.css @@ -0,0 +1,22 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + --toastContainerBottom: 1.5rem; + --toastContainerRight: 2rem; + --toastContainerLeft: auto; + --toastContainerTop: auto; + + --toastBorderRadius: 0.5rem; + --toastBackground: #1f2937; + --toastMsgPadding: 0.5rem 0.75rem; +} + +._toastBtn { + display: none !important; +} + +._toastBar { + display: none !important; +} diff --git a/src/app.d.ts b/src/app.d.ts new file mode 100644 index 0000000..1c6eb6c --- /dev/null +++ b/src/app.d.ts @@ -0,0 +1,13 @@ +import 'unplugin-icons/types/svelte' + +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface PageState {} + // interface Platform {} + } +} + +export { }; diff --git a/src/app.html b/src/app.html new file mode 100644 index 0000000..77a5ff5 --- /dev/null +++ b/src/app.html @@ -0,0 +1,12 @@ + + +
+ + + + %sveltekit.head% + + +Loading...
+{:else if $query.isError} +Error: {$query.error.message}
+{:else if $query.isSuccess} +| Name | +IP Addresses | +Last Seen | +
|---|---|---|
+ {machine.givenName}+ {machine.name} + |
+ + {#each machine.ipAddresses as ip, i} + 0 && "text-sm text-gray-400", + )} + > + {ip} + + + {/each} + | +
+
+ + {machine.online + ? "Connected" + : new Date( + machine.lastSeen, + ).toLocaleString()} + + + |
+