2024-07-31 13:36:55 +00:00
|
|
|
<script lang="ts">
|
|
|
|
import { onMount } from 'svelte';
|
|
|
|
import { useConfig } from './utility/metadataLoaders';
|
|
|
|
import ErrorInfo from './elements/ErrorInfo.svelte';
|
|
|
|
import Link from './elements/Link.svelte';
|
2024-08-06 12:59:09 +00:00
|
|
|
import { internalRedirectTo } from './clientAuth';
|
2024-07-31 13:36:55 +00:00
|
|
|
|
|
|
|
const config = useConfig();
|
|
|
|
|
2024-08-05 10:56:43 +00:00
|
|
|
const params = new URLSearchParams(location.search);
|
|
|
|
const error = params.get('error');
|
|
|
|
|
2024-07-31 13:36:55 +00:00
|
|
|
onMount(() => {
|
|
|
|
const removed = document.getElementById('starting_dbgate_zero');
|
|
|
|
if (removed) removed.remove();
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="root theme-light theme-type-light">
|
|
|
|
<div class="text">DbGate</div>
|
|
|
|
<div class="wrap">
|
|
|
|
<div class="logo">
|
|
|
|
<img class="img" src="logo192.png" />
|
|
|
|
</div>
|
|
|
|
<div class="box">
|
|
|
|
<div class="heading">Configuration error</div>
|
2024-08-07 14:28:24 +00:00
|
|
|
{#if $config?.checkedLicense?.status == 'error'}
|
2024-08-05 10:56:43 +00:00
|
|
|
<ErrorInfo
|
2024-08-07 14:28:24 +00:00
|
|
|
message={`Invalid license. Please contact sales@dbgate.eu for more details. ${$config?.checkedLicense?.error}`}
|
2024-08-05 10:56:43 +00:00
|
|
|
/>
|
2024-08-08 07:46:42 +00:00
|
|
|
{:else if $config?.configurationError}
|
|
|
|
<ErrorInfo message={$config?.configurationError} />
|
2024-08-05 10:56:43 +00:00
|
|
|
{:else if error}
|
|
|
|
<ErrorInfo message={error} />
|
2024-07-31 13:36:55 +00:00
|
|
|
{:else}
|
|
|
|
<ErrorInfo message="No error found, try to open app again" />
|
2024-07-31 14:13:59 +00:00
|
|
|
<div class="m-2">
|
2024-08-06 12:59:09 +00:00
|
|
|
<Link onClick={() => internalRedirectTo('/')}>Back to app</Link>
|
2024-07-31 14:13:59 +00:00
|
|
|
</div>
|
2024-07-31 13:36:55 +00:00
|
|
|
{/if}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.logo {
|
|
|
|
display: flex;
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
.img {
|
|
|
|
width: 80px;
|
|
|
|
}
|
|
|
|
.text {
|
|
|
|
position: fixed;
|
|
|
|
top: 1rem;
|
|
|
|
left: 1rem;
|
|
|
|
font-size: 30pt;
|
|
|
|
font-family: monospace;
|
|
|
|
color: var(--theme-bg-2);
|
|
|
|
text-transform: uppercase;
|
|
|
|
}
|
|
|
|
|
|
|
|
.root {
|
|
|
|
color: var(--theme-font-1);
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
background-color: var(--theme-bg-1);
|
|
|
|
align-items: baseline;
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.box {
|
|
|
|
width: 600px;
|
|
|
|
max-width: 80vw;
|
|
|
|
/* max-width: 600px;
|
|
|
|
width: 40vw; */
|
|
|
|
border: 1px solid var(--theme-border);
|
|
|
|
border-radius: 4px;
|
|
|
|
background-color: var(--theme-bg-0);
|
|
|
|
}
|
|
|
|
|
|
|
|
.wrap {
|
|
|
|
margin-top: 20vh;
|
|
|
|
}
|
|
|
|
|
|
|
|
.heading {
|
|
|
|
text-align: center;
|
|
|
|
margin: 1em;
|
|
|
|
font-size: xx-large;
|
|
|
|
}
|
|
|
|
</style>
|