mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-05-05 06:41:59 +02:00
feat: consolidate settings into unified tabbed modal with variant-aware source regions (#319)
Replace 4 scattered settings UIs (gear popup, panels modal, sources modal, language dropdown) with a single 3-tab modal (General/Panels/Sources). Sources tab features region pills that dynamically adapt per variant: - Full: Worldwide, US, Europe, Middle East, Africa, Latin America, Asia-Pacific, Topical, Intelligence - Tech: Tech News, AI & ML, Startups & VC, Regional Ecosystems, Developer, Cybersecurity, Policy & Research, Media & Podcasts - Finance: Markets & Analysis, Fixed Income & FX, Commodities, Crypto & Digital, Central Banks & Economy, Deals & Corporate, Financial Regulation, Gulf & MENA Also reclassifies full-variant feeds: splits monolithic politics into politics (worldwide), us, and europe; redistributes misplaced sources. Additional fixes: - Variant switcher works on localhost via localStorage (no multiple dev servers) - mapNewsFlash toggle no longer triggers expensive AI re-analysis - Remove dead intel-findings toggle from desktop settings window - LiveNewsPanel uses shared SITE_VARIANT (respects localStorage override)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
@import './lang-switcher.css';
|
||||
@import './rtl-overrides.css';
|
||||
@import './panels.css';
|
||||
|
||||
@@ -584,20 +583,6 @@ canvas,
|
||||
border-color: var(--text-dim);
|
||||
}
|
||||
|
||||
.settings-btn {
|
||||
padding: 4px 8px;
|
||||
background: transparent;
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
font-family: inherit;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.settings-btn:hover {
|
||||
border-color: var(--text-dim);
|
||||
}
|
||||
|
||||
.fullscreen-btn {
|
||||
padding: 4px 8px;
|
||||
background: transparent;
|
||||
@@ -710,6 +695,7 @@ canvas,
|
||||
|
||||
.map-section .panel-header {
|
||||
flex-shrink: 0;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.map-section .map-container {
|
||||
@@ -5150,20 +5136,6 @@ a.prediction-link:hover {
|
||||
}
|
||||
|
||||
/* Sources Modal */
|
||||
.sources-btn {
|
||||
padding: 4px 8px;
|
||||
background: transparent;
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
font-family: inherit;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.sources-btn:hover {
|
||||
border-color: var(--text-dim);
|
||||
}
|
||||
|
||||
.sources-modal {
|
||||
max-width: 600px;
|
||||
width: 95%;
|
||||
@@ -5248,6 +5220,7 @@ a.prediction-link:hover {
|
||||
|
||||
.sources-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
@@ -11012,28 +10985,6 @@ a.prediction-link:hover {
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
.intel-findings-context-menu {
|
||||
position: fixed;
|
||||
z-index: 10000;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
|
||||
padding: 4px 0;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.context-menu-item {
|
||||
padding: 8px 14px;
|
||||
font-size: 12px;
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.context-menu-item:hover {
|
||||
background: var(--bg-hover);
|
||||
}
|
||||
|
||||
/* ===== Tech Events Panel ===== */
|
||||
.tech-events-panel {
|
||||
@@ -12582,111 +12533,175 @@ a.prediction-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* ============ AI Flow Settings Popup ============ */
|
||||
/* ============ Unified Settings Modal ============ */
|
||||
|
||||
.ai-flow-popup-wrapper {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.ai-flow-gear-btn {
|
||||
.unified-settings-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
background: none;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
background: var(--surface);
|
||||
color: var(--text-dim);
|
||||
cursor: pointer;
|
||||
transition: color 0.3s, transform 0.3s;
|
||||
transition: color 0.2s, border-color 0.2s, transform 0.3s;
|
||||
}
|
||||
|
||||
.ai-flow-gear-btn:hover {
|
||||
.unified-settings-btn:hover {
|
||||
color: var(--accent);
|
||||
border-color: var(--text-faint);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.ai-flow-gear-btn svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
.unified-settings-btn svg {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.ai-flow-popup {
|
||||
position: absolute;
|
||||
top: calc(100% + 8px);
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 280px;
|
||||
background: #1a1a1a;
|
||||
border: 1px solid #444;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.15s, visibility 0.15s;
|
||||
.unified-settings-modal {
|
||||
max-width: 600px;
|
||||
width: 95%;
|
||||
max-height: 80vh;
|
||||
}
|
||||
|
||||
.ai-flow-popup.visible {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.ai-flow-popup::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid #444;
|
||||
}
|
||||
|
||||
.ai-flow-popup::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;
|
||||
border-bottom: 5px solid #1a1a1a;
|
||||
}
|
||||
|
||||
.ai-flow-popup-header {
|
||||
.unified-settings-tabs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid #333;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
letter-spacing: 0.5px;
|
||||
text-transform: uppercase;
|
||||
border-bottom: 1px solid var(--border);
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.ai-flow-popup-close {
|
||||
.unified-settings-tab {
|
||||
flex: 1;
|
||||
padding: 10px 12px;
|
||||
background: none;
|
||||
border: none;
|
||||
border-bottom: 2px solid transparent;
|
||||
color: var(--text-dim);
|
||||
font-family: inherit;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.5px;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
transition: color 0.15s, border-color 0.15s;
|
||||
}
|
||||
|
||||
.unified-settings-tab:hover {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.unified-settings-tab.active {
|
||||
border-bottom-color: var(--text);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.unified-settings-tab-panel {
|
||||
display: none;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
.unified-settings-tab-panel.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Source region pills */
|
||||
.unified-settings-region-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.unified-settings-region-wrapper::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 40px;
|
||||
background: linear-gradient(to right, transparent, var(--surface));
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.unified-settings-region-bar {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
overflow-x: auto;
|
||||
padding: 8px 0;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.unified-settings-region-bar::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.unified-settings-region-pill {
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 16px;
|
||||
padding: 5px 12px;
|
||||
font-family: inherit;
|
||||
font-size: 10px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.3px;
|
||||
color: var(--text-dim);
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
padding: 0 2px;
|
||||
white-space: nowrap;
|
||||
transition: border-color 0.15s, color 0.15s, background 0.15s;
|
||||
}
|
||||
|
||||
.ai-flow-popup-close:hover {
|
||||
color: var(--text-primary);
|
||||
.unified-settings-region-pill:hover {
|
||||
border-color: var(--text-dim);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.ai-flow-popup-body {
|
||||
padding: 10px 12px;
|
||||
.unified-settings-region-pill.active {
|
||||
background: rgba(68, 255, 136, 0.08);
|
||||
border-color: rgba(68, 255, 136, 0.4);
|
||||
color: var(--green);
|
||||
}
|
||||
|
||||
/* Language select */
|
||||
.unified-settings-lang-select {
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--border);
|
||||
color: var(--text);
|
||||
width: 100%;
|
||||
padding: 8px 10px;
|
||||
font-family: inherit;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.unified-settings-lang-select:focus {
|
||||
outline: none;
|
||||
border-color: var(--text-dim);
|
||||
}
|
||||
|
||||
/* Responsive grids */
|
||||
@media (max-width: 500px) {
|
||||
.unified-settings-modal .panel-toggle-grid,
|
||||
.unified-settings-modal .sources-toggle-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* ============ AI Flow Toggle Styles (shared) ============ */
|
||||
|
||||
.ai-flow-section-label {
|
||||
font-size: 9px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
color: var(--text-faint);
|
||||
padding: 10px 0 4px;
|
||||
border-top: 1px solid #333;
|
||||
}
|
||||
|
||||
.ai-flow-section-label:first-child {
|
||||
border-top: none;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.ai-flow-toggle-row {
|
||||
@@ -12698,10 +12713,6 @@ a.prediction-link:hover {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.ai-flow-toggle-row + .ai-flow-toggle-row {
|
||||
border-top: 1px solid #333;
|
||||
}
|
||||
|
||||
.ai-flow-toggle-label-wrap {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
Reference in New Issue
Block a user