.
This commit is contained in:
parent
bb21538731
commit
a68a1882f5
@ -1717,24 +1717,24 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- LOGIN -->
|
<!-- LOGIN -->
|
||||||
<div class="login-screen" id="login-screen">
|
<div class="login-screen show" id="login-screen">
|
||||||
<div class="login-box">
|
<div class="login-box">
|
||||||
<div class="login-logo">BLAIR</div>
|
<div class="login-logo">BLAIR</div>
|
||||||
<div class="login-sub">Ghost Investigation Dashboard</div>
|
<div class="login-sub">Ghost Investigation Dashboard</div>
|
||||||
<div class="login-desc">
|
<div class="login-desc">
|
||||||
Login with discord to <strong>submit tips</strong> and see the status of your submissions.<br><br>
|
Login with Discord to submit <strong>tips</strong> and check the status of your submissions.<br><br>
|
||||||
<strong>Admin-Access</strong> is only granted to approved Discord accounts.
|
<strong>Admin access</strong> is granted only to whitelisted Discord accounts.
|
||||||
</div>
|
</div>
|
||||||
<button class="btn-discord" onclick="location.href='/auth/discord'">
|
<a class="btn-discord" href="/auth/discord" style="text-decoration:none;">
|
||||||
<svg viewBox="0 0 24 24" fill="currentColor">
|
<svg viewBox="0 0 24 24" fill="currentColor">
|
||||||
<path
|
<path
|
||||||
d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057.101 18.08.114 18.1.134 18.114a19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03z" />
|
d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057.101 18.08.114 18.1.134 18.114a19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03z" />
|
||||||
</svg>
|
</svg>
|
||||||
Login with Discord
|
Login with Discord
|
||||||
</button>
|
</a>
|
||||||
<span class="login-or">or</span>
|
<span class="login-or">or</span>
|
||||||
<button class="btn-sm" onclick="guestMode()">Continue as guest (only read-access)</button>
|
<button class="btn-sm" id="guest-btn">Continue as Guest (read only)</button>
|
||||||
<div class="login-guest-note">Guests can only read Ghost Cards, Cheatsheet and Hunt Guide.</div>
|
<div class="login-guest-note">Guests can only view Ghost Cards, Cheatsheet and Hunt Guide.</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -1750,15 +1750,14 @@
|
|||||||
<div class="header-inner">
|
<div class="header-inner">
|
||||||
<div>
|
<div>
|
||||||
<div class="site-title">BLAIR</div>
|
<div class="site-title">BLAIR</div>
|
||||||
<div class="site-sub">Ghost Investigation Dashboard for Blair · made by non_player1 & qiqi.june
|
<div class="site-sub">Ghost Investigation Dashboard · Made by non_player1 & qiqi.june</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
<div class="auth-chip" id="auth-chip" style="display:none;">
|
<div class="auth-chip" id="auth-chip" style="display:none;">
|
||||||
<img class="auth-avatar" id="auth-av" src="" alt="">
|
<img class="auth-avatar" id="auth-av" src="" alt="">
|
||||||
<span class="auth-name" id="auth-nm"></span>
|
<span class="auth-name" id="auth-nm"></span>
|
||||||
<span class="auth-role" id="auth-rl"></span>
|
<span class="auth-role" id="auth-rl"></span>
|
||||||
<button class="btn-logout" onclick="doLogout()">Logout</button>
|
<button class="btn-logout" onclick="doLogout()">Abmelden</button>
|
||||||
</div>
|
</div>
|
||||||
<span id="guest-badge"
|
<span id="guest-badge"
|
||||||
style="display:none;font-family:'Share Tech Mono',monospace;font-size:9px;letter-spacing:2px;color:var(--muted);">GAST</span>
|
style="display:none;font-family:'Share Tech Mono',monospace;font-size:9px;letter-spacing:2px;color:var(--muted);">GAST</span>
|
||||||
@ -1782,7 +1781,7 @@
|
|||||||
</nav>
|
</nav>
|
||||||
<div class="panel active" id="vtab-cards">
|
<div class="panel active" id="vtab-cards">
|
||||||
<div class="filter-row" id="ev-filter">
|
<div class="filter-row" id="ev-filter">
|
||||||
<div class="filter-label-sm">Evidence Filter — single-click: found · twice: excluded</div>
|
<div class="filter-label-sm">Evidence Filter — einmal: gefunden · zweimal: ausgeschlossen</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ghost-grid" id="ghost-grid"></div>
|
<div class="ghost-grid" id="ghost-grid"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -2043,24 +2042,43 @@
|
|||||||
|
|
||||||
/* ── INIT ── */
|
/* ── INIT ── */
|
||||||
async function init() {
|
async function init() {
|
||||||
|
// Gast-Button Event hier setzen (kein inline onclick nötig)
|
||||||
|
document.getElementById('guest-btn').addEventListener('click', guestMode);
|
||||||
|
|
||||||
showLoading("Lade...");
|
showLoading("Lade...");
|
||||||
|
try {
|
||||||
const r = await fetch('/auth/me');
|
const r = await fetch('/auth/me');
|
||||||
|
if (!r.ok) throw new Error('auth failed');
|
||||||
const { user } = await r.json();
|
const { user } = await r.json();
|
||||||
currentUser = user;
|
currentUser = user;
|
||||||
|
|
||||||
if (!user) { hideLoading(); showLogin(); return; }
|
if (!user) {
|
||||||
|
hideLoading();
|
||||||
|
return; // login-screen ist schon sichtbar (show class per default)
|
||||||
|
}
|
||||||
|
|
||||||
await loadGhosts();
|
await loadGhosts();
|
||||||
setupUI();
|
setupUI();
|
||||||
hideLoading();
|
hideLoading();
|
||||||
|
hideLogin(); // erst jetzt verstecken
|
||||||
document.getElementById('app').style.display = 'block';
|
document.getElementById('app').style.display = 'block';
|
||||||
|
} catch (e) {
|
||||||
|
hideLoading();
|
||||||
|
console.error('Init error:', e);
|
||||||
|
// Login screen bleibt sichtbar
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function guestMode() {
|
function guestMode() {
|
||||||
hideLogin();
|
hideLogin();
|
||||||
|
showLoading("Lade...");
|
||||||
loadGhosts().then(() => {
|
loadGhosts().then(() => {
|
||||||
|
hideLoading();
|
||||||
setupGuestUI();
|
setupGuestUI();
|
||||||
document.getElementById('app').style.display = 'block';
|
document.getElementById('app').style.display = 'block';
|
||||||
|
}).catch(e => {
|
||||||
|
hideLoading();
|
||||||
|
console.error(e);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user