feat(providers): add notes field for provider management

- Add notes field to Provider model (backend and frontend)
- Display notes with higher priority than URL in provider card
- Style notes as non-clickable text to differentiate from URLs
- Add notes input field in provider form
- Add i18n support (zh/en) for notes field
This commit is contained in:
YoVinchen
2025-11-17 16:40:28 +08:00
parent f79efb86cd
commit ec1ae7073f
8 changed files with 56 additions and 2 deletions

View File

@@ -22,6 +22,9 @@ pub struct Provider {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(rename = "sortIndex")]
pub sort_index: Option<usize>,
/// 备注信息
#[serde(skip_serializing_if = "Option::is_none")]
pub notes: Option<String>,
/// 供应商元数据(不写入 live 配置,仅存于 ~/.cc-switch/config.json
#[serde(skip_serializing_if = "Option::is_none")]
pub meta: Option<ProviderMeta>,
@@ -43,6 +46,7 @@ impl Provider {
category: None,
created_at: None,
sort_index: None,
notes: None,
meta: None,
}
}