@@ -35,6 +35,7 @@ use crate::state::ServiceState;
3535
3636const APP_WINDOW_TITLE : & str = "Linux.do Accelerator" ;
3737const APP_ID : & str = "linuxdo-accelerator" ;
38+ const APP_VERSION : & str = env ! ( "CARGO_PKG_VERSION" ) ;
3839
3940pub fn run ( config_path : PathBuf ) -> Result < ( ) > {
4041 let native_options = eframe:: NativeOptions {
@@ -525,6 +526,12 @@ impl eframe::App for AcceleratorApp {
525526 . color ( egui:: Color32 :: from_rgb ( 247 , 247 , 243 ) ) ,
526527 ) ;
527528 ui. add_space ( 6.0 ) ;
529+ ui. label (
530+ RichText :: new ( format ! ( "v{APP_VERSION}" ) )
531+ . font ( FontId :: proportional ( 11.5 ) )
532+ . color ( egui:: Color32 :: from_rgb ( 157 , 168 , 177 ) ) ,
533+ ) ;
534+ ui. add_space ( 6.0 ) ;
528535 egui:: Frame :: new ( )
529536 . fill ( accent. linear_multiply ( 0.18 ) )
530537 . stroke ( egui:: Stroke :: new ( 1.0 , accent. linear_multiply ( 0.75 ) ) )
@@ -786,6 +793,7 @@ impl eframe::App for AcceleratorApp {
786793 egui:: ScrollArea :: vertical ( ) . show ( ui, |ui| {
787794 ui. add ( egui:: Image :: new ( ( self . logo . id ( ) , egui:: vec2 ( 42.0 , 42.0 ) ) ) ) ;
788795 ui. label ( RichText :: new ( "Linux.do Accelerator" ) . strong ( ) ) ;
796+ ui. label ( format ! ( "版本 v{APP_VERSION}" ) ) ;
789797 ui. label ( "原生 Rust 桌面壳 + CLI" ) ;
790798 ui. label ( "支持证书安装、hosts 接管和本地 80/443 监听" ) ;
791799 ui. label ( "DoH 与子域支持列表统一放在 linuxdo-accelerator.toml" ) ;
0 commit comments