mirror of
https://github.com/gurucomputing/headscale-ui.git
synced 2026-01-23 02:34:43 +00:00
added base path, upgraded dependencies
This commit is contained in:
parent
11d1a82301
commit
6d5a76e10f
8 changed files with 358 additions and 366 deletions
696
package-lock.json
generated
696
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -28,7 +28,10 @@
|
|||
"svelte-check": "^2.7.1",
|
||||
"svelte-preprocess": "^4.10.7",
|
||||
"tailwindcss": "^3.0.23",
|
||||
"typescript": "^4.7.2"
|
||||
"typescript": "^4.7.2",
|
||||
"@vitejs/plugin-basic-ssl": "^0.1.1"
|
||||
},
|
||||
"type": "module"
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
import { onMount } from 'svelte';
|
||||
import { fade } from 'svelte/transition';
|
||||
import { writable } from 'svelte/store';
|
||||
import { base } from '$app/paths';
|
||||
|
||||
// navigation bar variables
|
||||
let navExpanded = writable('');
|
||||
|
|
@ -39,19 +40,19 @@
|
|||
<span class="indent-4 text-primary font-extrabold">Headscale</span>
|
||||
</button>
|
||||
<div />
|
||||
<a href="/" class="nav-item">
|
||||
<a href="{base}/" class="nav-item">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" />
|
||||
</svg>
|
||||
<span class="indent-4">User View</span>
|
||||
</a>
|
||||
<a href="/devices.html" class="nav-item">
|
||||
<a href="{base}/devices.html" class="nav-item">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />
|
||||
</svg>
|
||||
<span class="indent-4">Device View</span>
|
||||
</a>
|
||||
<a href="/settings.html" class="nav-item">
|
||||
<a href="{base}/settings.html" class="nav-item">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
import { headscaleUserStore, headscaleDeviceStore } from '$lib/common/stores';
|
||||
import { getDevices, newDevice } from '$lib/common/apiFunctions.svelte';
|
||||
import { alertStore } from '$lib/common/stores.js';
|
||||
import { base } from '$app/paths';
|
||||
|
||||
// whether the new card html element is visible
|
||||
let newDeviceCardVisible = false;
|
||||
|
|
@ -102,7 +103,7 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 inline flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
<span class="pl-2">Preauth Keys can be managed in the <a href="/" class="link link-primary">User Section</a> of the UI</span>
|
||||
<span class="pl-2">Preauth Keys can be managed in the <a href="{base}/" class="link link-primary">User Section</a> of the UI</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
import { fade } from 'svelte/transition';
|
||||
import { apiTestStore, headscaleUserStore, headscaleDeviceStore } from '$lib/common/stores.js';
|
||||
import { getUsers, getDevices } from '$lib/common/apiFunctions.svelte';
|
||||
import { base } from '$app/paths';
|
||||
|
||||
//
|
||||
// Component Variables
|
||||
|
|
@ -54,7 +55,7 @@
|
|||
{/if}
|
||||
{#if $apiTestStore === 'failed'}
|
||||
<div in:fade class="max-w-lg mx-auto p-4 border-4 text-sm text-base-content shadow-lg text-center">
|
||||
<p>API test did not succeed.<br />Headscale might be down or API settings may need to be set<br />change server settings in the <a href="/settings.html" class="link link-primary">settings</a> page</p>
|
||||
<p>API test did not succeed.<br />Headscale might be down or API settings may need to be set<br />change server settings in the <a href="{base}/settings.html" class="link link-primary">settings</a> page</p>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
import { onMount } from 'svelte';
|
||||
import { fade } from 'svelte/transition';
|
||||
import { getUsers } from '$lib/common/apiFunctions.svelte';
|
||||
import { base } from '$app/paths';
|
||||
|
||||
//
|
||||
// Component Variables
|
||||
|
|
@ -45,7 +46,7 @@
|
|||
{/if}
|
||||
{#if $apiTestStore === 'failed'}
|
||||
<div in:fade class="max-w-lg mx-auto p-4 border-4 text-sm text-base-content shadow-lg text-center">
|
||||
<p>API test did not succeed.<br />Headscale might be down or API settings may need to be set<br />change server settings in the <a href="/settings.html" class="link link-primary">settings</a> page</p>
|
||||
<p>API test did not succeed.<br />Headscale might be down or API settings may need to be set<br />change server settings in the <a href="{base}/settings.html" class="link link-primary">settings</a> page</p>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ const config = {
|
|||
precompress: false
|
||||
})
|
||||
},
|
||||
|
||||
preprocess: [
|
||||
preprocess({
|
||||
postcss: true
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
// vite.config.js
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import basicSsl from '@vitejs/plugin-basic-ssl'
|
||||
|
||||
|
||||
/** @type {import('vite').UserConfig} */
|
||||
const config = {
|
||||
plugins: [sveltekit()]
|
||||
plugins: [sveltekit(), basicSsl()]
|
||||
};
|
||||
|
||||
export default config;
|
||||
Loading…
Add table
Add a link
Reference in a new issue