mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
feat: add export diagnostic info functionality (#2856)
This commit is contained in:
1
src-tauri/src/module/mod.rs
Normal file
1
src-tauri/src/module/mod.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub mod sysinfo;
|
||||
19
src-tauri/src/module/sysinfo.rs
Normal file
19
src-tauri/src/module/sysinfo.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
use crate::model::sysinfo::PlatformSpecification;
|
||||
|
||||
use sysinfo::System;
|
||||
|
||||
impl PlatformSpecification {
|
||||
pub fn new() -> Self {
|
||||
let system_name = System::name().unwrap_or("Null".into());
|
||||
let system_version = System::long_os_version().unwrap_or("Null".into());
|
||||
let system_kernel_version = System::kernel_version().unwrap_or("Null".into());
|
||||
let system_arch = std::env::consts::ARCH.to_string();
|
||||
|
||||
Self {
|
||||
system_name,
|
||||
system_version,
|
||||
system_kernel_version,
|
||||
system_arch
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user