mirror of
https://github.com/obsqrbtz/goose-highlighter.git
synced 2026-04-08 20:19:06 +03:00
nit: show spinner while user settings are loaded
This commit is contained in:
@@ -37,6 +37,41 @@ body {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Loading Overlay */
|
||||||
|
.loading-overlay {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: var(--bg-color);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
z-index: 9999;
|
||||||
|
transition: opacity 0.2s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-overlay.hidden {
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-spinner {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
border: 3px solid var(--input-border);
|
||||||
|
border-top-color: var(--accent);
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: spin 0.8s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
body.light {
|
body.light {
|
||||||
--bg-color: #f8f9fa;
|
--bg-color: #f8f9fa;
|
||||||
--text-color: #1a1a1a;
|
--text-color: #1a1a1a;
|
||||||
|
|||||||
@@ -11,6 +11,9 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="dark">
|
<body class="dark">
|
||||||
|
<div class="loading-overlay">
|
||||||
|
<div class="loading-spinner"></div>
|
||||||
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<div class="header-bar">
|
<div class="header-bar">
|
||||||
|
|||||||
@@ -22,6 +22,15 @@ export class PopupController {
|
|||||||
this.translateTitles();
|
this.translateTitles();
|
||||||
this.setupEventListeners();
|
this.setupEventListeners();
|
||||||
this.render();
|
this.render();
|
||||||
|
this.hideLoadingOverlay();
|
||||||
|
}
|
||||||
|
|
||||||
|
private hideLoadingOverlay(): void {
|
||||||
|
const overlay = document.querySelector('.loading-overlay');
|
||||||
|
if (overlay) {
|
||||||
|
overlay.classList.add('hidden');
|
||||||
|
setTimeout(() => overlay.remove(), 200);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async loadData(): Promise<void> {
|
private async loadData(): Promise<void> {
|
||||||
|
|||||||
Reference in New Issue
Block a user