diff --git a/server/systems.go b/server/systems.go index b470f32..01e615f 100644 --- a/server/systems.go +++ b/server/systems.go @@ -48,6 +48,6 @@ func (s *Server) About(c *gin.Context) (interface{}, error) { "uptime": uptime.Uptime(), "chat_group": "https://t.me/+8R2nzrlSs2JhMDgx", "go_version": runtime.Version(), - "version": db.Version, + "version": db.Version, }, nil } diff --git a/ui/lib/providers/settings.dart b/ui/lib/providers/settings.dart index 952bc42..0d4b82b 100644 --- a/ui/lib/providers/settings.dart +++ b/ui/lib/providers/settings.dart @@ -336,6 +336,7 @@ class About { required this.homepage, required this.intro, required this.uptime, + required this.version, }); final String? chatGroup; @@ -343,6 +344,7 @@ class About { final String? homepage; final String? intro; final Duration? uptime; + final String? version; factory About.fromJson(Map json) { return About( @@ -350,7 +352,9 @@ class About { goVersion: json["go_version"], homepage: json["homepage"], intro: json["intro"], - uptime: Duration(microseconds: (json["uptime"]/1000.0 as double).round()), + version: json["version"], + uptime: + Duration(microseconds: (json["uptime"] / 1000.0 as double).round()), ); } } diff --git a/ui/lib/system_page.dart b/ui/lib/system_page.dart index daff599..4ba78f7 100644 --- a/ui/lib/system_page.dart +++ b/ui/lib/system_page.dart @@ -46,9 +46,9 @@ class _SystemPageState extends ConsumerState { return DataRow(cells: [ DataCell(Text(item.name ?? "")), - DataCell(Text((item.size??0).readableFileSize())), + DataCell(Text((item.size ?? 0).readableFileSize())), DataCell(InkWell( - child: Icon(Icons.download), + child: const Icon(Icons.download), onTap: () => launchUrl(uri, webViewConfiguration: WebViewConfiguration( headers: APIs.authHeaders)), @@ -82,6 +82,7 @@ class _SystemPageState extends ConsumerState { "#", style: TextStyle(height: 2.5), ), + Text("版本", style: TextStyle(height: 2.5)), Text("主页", style: TextStyle(height: 2.5)), Text("讨论组", style: TextStyle(height: 2.5)), Text("go version", style: TextStyle(height: 2.5)), @@ -104,8 +105,11 @@ class _SystemPageState extends ConsumerState { ), Text(v.intro ?? "", style: const TextStyle(height: 2.5)), + Text(v.version ?? "", + style: const TextStyle(height: 2.5)), InkWell( child: Text(v.homepage ?? "", + softWrap: false, style: const TextStyle(height: 2.5)), onTap: () => launchUrl(homepage), ),