Add ServerEntry model and server list persistence to platform trait
Introduces a ServerEntry struct in common with name, address, port, username, and optional password fields. Extends PlatformInterface with load_servers/save_servers methods, implemented across all platforms (desktop persists to JSON config, web uses localStorage, mobile/stub are stubs). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,3 +16,13 @@ pub struct ServerStatus {
|
||||
pub max_users: Option<u32>,
|
||||
pub bandwidth: Option<u32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, Default, PartialEq)]
|
||||
pub struct ServerEntry {
|
||||
pub name: String,
|
||||
pub address: String,
|
||||
pub port: u16,
|
||||
pub username: String,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub password: Option<String>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user