App no longer flashes the uninitialized page before auth

This commit is contained in:
Erik Thuning 2025-03-28 16:08:03 +01:00
parent c1538a8912
commit c24d3405d2
2 changed files with 2 additions and 1 deletions

@ -7,7 +7,7 @@
<script type="text/javascript" src="static/script.js?3"></script>
<title>WG-selfserve</title>
</head>
<body>
<body style="display: none;">
<header>
<h1>Your VPN Clients</h1>
<user id="banner-userid" aria-label="logged in as"></user>

@ -240,6 +240,7 @@
async function setup_page(route) {
try {
const configs = await make_api_request('GET', '/configs/');
document.querySelector('body').removeAttribute('style');
const cookies = get_cookies();
const settings = JSON.parse(atob(cookies['server_settings']));
sessionStorage.setItem('max_clients', settings['client_limit']);