feat: 关于软件页创造者显示 Gitee 头像并点击跳转主页(新增 openUrl 原生通道)
This commit is contained in:
1 parent
4277dc9f84
commit
211680b9ae
4 files changed
+76
-4
No files matched your search
@@ -414,6 +414,8 @@ class S {
|
||||
'我知道了': 'Got it',
|
||||
'创造者': 'Creators',
|
||||
'ZV Manager 是一款 Minecraft 服务器远程管理工具,本软件与 Mojang、微软无任何隶属关系。': 'ZV Manager is a remote management tool for Minecraft servers. Not affiliated with Mojang or Microsoft.',
|
||||
'开发者 · Gitee: DriftinBlock': 'Developer · Gitee: DriftinBlock',
|
||||
'协作者 · Gitee: venti1112': 'Collaborator · Gitee: venti1112',
|
||||
};
|
||||
|
||||
static String t(String zh) => en ? (_en[zh] ?? zh) : zh;
|
||||
|
||||
@@ -35,6 +35,13 @@ class UpdateService {
|
||||
/// 是否正在下载,用于防止重复触发并发下载到同一文件。
|
||||
static bool _downloading = false;
|
||||
|
||||
/// 调用系统浏览器打开外部链接。
|
||||
static Future<void> openUrl(String url) async {
|
||||
try {
|
||||
await _channel.invokeMethod('openUrl', {'url': url});
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
/// 从 Gitee 拉取最新发布信息;接口异常返回 null(调用方决定是否静默处理)。
|
||||
static Future<UpdateInfo?> fetchInfo({String userAgent = ''}) async {
|
||||
final client = HttpClient();
|
||||
|
||||
Reference in new issue
Block a user