mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
feat: add JSON export and import for settings persistence (#800)
* feat: add JSON export and import for settings persistence * Update src/components/UnifiedSettings.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/utils/settings-persistence.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/settings-main.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * feat: Add localization for unified settings data management, export, and import. * fix(settings): address PR feedback on export/import security and i18n * style(i18n): ensure trailing newline in locale files * fix: address review feedback on settings export/import - Replace denylist with allowlist of known settings key prefixes - Add version check and Array.isArray guard on import - Remove window.alert/confirm — use inline toast and setActionStatus - Restore deleted countryBrief.noMarkets and components i18n keys - Move settings i18n keys to components.settings namespace - Replace inline styles with CSS classes - Return ImportResult from importSettings for caller feedback --------- Co-authored-by: ValMtp3 <ValMtp3@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Elie Habib <elie.habib@gmail.com>
This commit is contained in:
@@ -14490,6 +14490,45 @@ a.prediction-link:hover {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Data management buttons in settings */
|
||||
.us-data-mgmt {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
padding: 0 16px 12px;
|
||||
}
|
||||
|
||||
.us-data-mgmt .settings-btn {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.us-hidden-input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.us-data-mgmt-toast {
|
||||
padding: 0 16px;
|
||||
font-size: 12px;
|
||||
min-height: 0;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.us-data-mgmt-toast:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.us-data-mgmt-toast.ok {
|
||||
color: #34d399;
|
||||
}
|
||||
|
||||
.us-data-mgmt-toast.error {
|
||||
color: #f87171;
|
||||
}
|
||||
|
||||
.us-toast-reload {
|
||||
color: #60a5fa;
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
/* Footer status */
|
||||
.ai-flow-popup-footer {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user