设置界面支持版本控制和github账号管理
This commit is contained in:
@@ -36,3 +36,45 @@ pub struct SystemLanguageSettings {
|
||||
pub mode: LanguageMode,
|
||||
pub language: AppLocale,
|
||||
}
|
||||
|
||||
// --- Version Control ---
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct GitDetectResult {
|
||||
pub installed: bool,
|
||||
pub version: Option<String>,
|
||||
pub path: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||
#[serde(default)]
|
||||
pub struct GitSettings {
|
||||
pub custom_path: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct GitHubAccount {
|
||||
pub id: String,
|
||||
pub server_url: String,
|
||||
pub username: String,
|
||||
pub token: String,
|
||||
pub scopes: Vec<String>,
|
||||
pub avatar_url: Option<String>,
|
||||
pub is_default: bool,
|
||||
pub created_at: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||
#[serde(default)]
|
||||
pub struct GitHubAccountsSettings {
|
||||
pub accounts: Vec<GitHubAccount>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct GitHubTokenValidation {
|
||||
pub success: bool,
|
||||
pub username: Option<String>,
|
||||
pub scopes: Vec<String>,
|
||||
pub avatar_url: Option<String>,
|
||||
pub message: Option<String>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user