feat: ipv4 and ipv6

This commit is contained in:
Andras Bacsai
2022-07-22 20:48:04 +00:00
parent bb2864a83f
commit 9e3ba295ea
7 changed files with 35 additions and 5 deletions

View File

@@ -1,6 +1,8 @@
import { writable, readable, type Writable, type Readable } from 'svelte/store';
interface AppSession {
ipv4: string | null,
ipv6: string | null,
version: string | null,
userId: string | null,
teamId: string | null,
@@ -17,6 +19,8 @@ interface AppSession {
}
export const loginEmail: Writable<string | undefined> = writable()
export const appSession: Writable<AppSession> = writable({
ipv4: null,
ipv6: null,
version: null,
userId: null,
teamId: null,

View File

@@ -65,6 +65,8 @@
<script lang="ts">
export let baseSettings: any;
$appSession.ipv4 = baseSettings.ipv4;
$appSession.ipv6 = baseSettings.ipv6;
$appSession.version = baseSettings.version;
$appSession.whiteLabeled = baseSettings.whiteLabeled;
$appSession.whiteLabeledDetails.icon = baseSettings.whiteLabeledIcon;

View File

@@ -51,7 +51,7 @@
return `${database.type}://${
databaseDbUser ? databaseDbUser + ':' : ''
}${databaseDbUserPassword}@${
isPublic ? (settings.fqdn ? getDomain(settings.fqdn) : window.location.hostname) : database.id
isPublic ? ($appSession.ipv4) : database.id
}:${isPublic ? database.publicPort : privatePort}/${databaseDefault}`;
}