mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
feat(common-config): show first-run notice dialog when editing providers
Display a one-time informational dialog explaining the Common Config Snippet feature when users first open the add/edit provider form. Uses a derived isOpen state from settings to avoid race conditions. Adds commonConfigConfirmed flag to both TS and Rust settings types.
This commit is contained in:
@@ -208,6 +208,9 @@ pub struct AppSettings {
|
||||
/// User has confirmed the first-run welcome notice
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub first_run_notice_confirmed: Option<bool>,
|
||||
/// User has confirmed the common config first-run notice
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub common_config_confirmed: Option<bool>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub language: Option<String>,
|
||||
|
||||
@@ -301,6 +304,7 @@ impl Default for AppSettings {
|
||||
enable_failover_toggle: false,
|
||||
failover_confirmed: None,
|
||||
first_run_notice_confirmed: None,
|
||||
common_config_confirmed: None,
|
||||
language: None,
|
||||
visible_apps: None,
|
||||
claude_config_dir: None,
|
||||
|
||||
Reference in New Issue
Block a user