Redesign filter view
This commit is contained in:
16
js/app.js
16
js/app.js
@@ -132,6 +132,21 @@ function setupTabs() {
|
||||
|
||||
let initAppPromise = null;
|
||||
|
||||
function renderAppBootError(message) {
|
||||
const appContainer = document.getElementById('app-container');
|
||||
if (!appContainer) return;
|
||||
|
||||
appContainer.innerHTML = `
|
||||
<div class="flex h-full items-center justify-center px-6 text-center" style="background:#2d2e2b !important;">
|
||||
<div class="max-w-[18rem] rounded-[1.5rem] border px-5 py-6" style="background:#2f2f2d !important; border-color:#444442 !important;">
|
||||
<p class="text-sm font-semibold" style="color:#f2efe8 !important;">Nie udało się uruchomić aplikacji</p>
|
||||
<p class="mt-2 text-xs leading-relaxed" style="color:#b7ada1 !important;">${message}</p>
|
||||
<button type="button" onclick="window.location.reload()" class="mt-4 h-10 px-4 rounded-full border text-[12px] font-semibold" style="background:#23221e !important; border-color:#787876 !important; color:#f2efe8 !important;">Odśwież aplikację</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
async function initApp() {
|
||||
if (initAppPromise) return initAppPromise;
|
||||
|
||||
@@ -171,6 +186,7 @@ async function initApp() {
|
||||
function bootApp() {
|
||||
initApp().catch((error) => {
|
||||
console.error('Failed to initialize app', error);
|
||||
renderAppBootError('Spróbuj odświeżyć aplikację. Jeśli problem wróci, zamknij ją całkowicie i otwórz ponownie.');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user