mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 05:40:26 +02:00
feat: Enhance entity tabs with global loading spinner and status text for improved user feedback
This commit is contained in:
@@ -367,6 +367,14 @@ def load_integration_settings() -> Dict[str, Dict[str, Any]]:
|
||||
|
||||
def stored_integration_config(name: str) -> Dict[str, Any]:
|
||||
cfg = load_config() or {}
|
||||
# Check under "integrations" first (new structure)
|
||||
integrations = cfg.get("integrations")
|
||||
if isinstance(integrations, Mapping):
|
||||
entry = integrations.get(name)
|
||||
if isinstance(entry, Mapping):
|
||||
return dict(entry)
|
||||
|
||||
# Fallback to top-level (legacy structure)
|
||||
entry = cfg.get(name)
|
||||
if isinstance(entry, Mapping):
|
||||
return dict(entry)
|
||||
|
||||
@@ -1159,6 +1159,7 @@ const initPrepare = (root = document) => {
|
||||
const entityRowTemplate = entityTabs.querySelector('template[data-role="entity-row-template"]');
|
||||
const entitiesRefreshButton = entitySummaryContainer?.querySelector('[data-role="entities-refresh"]');
|
||||
const entitySpinner = entitySummaryContainer?.querySelector('[data-role="entities-spinner"]');
|
||||
const globalEntitySpinner = entityTabs.querySelector('[data-role="global-entity-spinner"]');
|
||||
|
||||
const manualOverridesRoot = entityTabs.querySelector('[data-role="manual-overrides"]');
|
||||
const manualOverrideList = manualOverridesRoot?.querySelector('[data-role="manual-override-list"]');
|
||||
@@ -1331,6 +1332,9 @@ const initPrepare = (root = document) => {
|
||||
};
|
||||
|
||||
const setEntitiesLoading = (isLoading) => {
|
||||
if (globalEntitySpinner) {
|
||||
globalEntitySpinner.hidden = !isLoading;
|
||||
}
|
||||
if (!entitySummaryContainer) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4225,3 +4225,23 @@ input[data-state="locked"] {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.entity-tabs__status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
margin-left: auto;
|
||||
color: var(--muted);
|
||||
font-size: 0.875rem;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
.entity-tabs__status-text {
|
||||
font-weight: 500;
|
||||
animation: pulse 2s infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.6; }
|
||||
}
|
||||
|
||||
@@ -95,6 +95,10 @@
|
||||
role="tab">
|
||||
Manual Overrides
|
||||
</button>
|
||||
<div class="entity-tabs__status" data-role="global-entity-spinner" hidden>
|
||||
<span class="spinner spinner--sm"></span>
|
||||
<span class="entity-tabs__status-text">Scanning text...</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entity-tabs__panels">
|
||||
|
||||
Reference in New Issue
Block a user