From 28d9a0faf21188b4d5cb18cbf54546866fa1ed08 Mon Sep 17 00:00:00 2001 From: True Zhuanjia Date: Sat, 14 Feb 2026 02:07:28 +0800 Subject: [PATCH] update aboutView --- VoidLink/AboutView.swift | 36 +++++---- VoidLink/AboutViewController.swift | 2 +- VoidLink/Localization/Localizable.xcstrings | 73 ++++++++++++------- .../ViewControllers/MainFrameViewController.m | 11 +-- 4 files changed, 78 insertions(+), 44 deletions(-) diff --git a/VoidLink/AboutView.swift b/VoidLink/AboutView.swift index 116b1ff8..6a664bc5 100644 --- a/VoidLink/AboutView.swift +++ b/VoidLink/AboutView.swift @@ -16,12 +16,12 @@ public struct AboutView: View { public var aboutVC:UIViewController public var body: some View { - VStack(spacing: 10) { + VStack(spacing: 7) { // App 图标 Image(uiImage: UIImage(named: "AppIconMedium") ?? UIImage()) // .resizable() .resizable(capInsets:EdgeInsets(top: 3.5, leading: 3.5, bottom: 3.5, trailing: 3.5)) - .frame(width: 100, height: 100) + .frame(width: 90, height: 90) .clipShape(RoundedRectangle(cornerRadius: 28)) // App 名称 @@ -35,31 +35,41 @@ public struct AboutView: View { .font(.subheadline) .foregroundColor(.gray) } - - // 说明文字 - Text(SwiftLocalizationHelper.localizedString(forKey: "From the player community, to the player community.")) - .multilineTextAlignment(.center) - .lineLimit(nil) - .frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行 if Locale.preferredLanguages.first!.hasPrefix("zh-Hans") { if #available(iOS 14.0, *) { - Text("闽ICP备17012590号-3A\n主办单位:福州创图信息技术有限公司").font(.caption2) + Text("闽ICP备17012590号-3A 主办单位:福州创图信息技术有限公司").font(.caption2) .multilineTextAlignment(.center) .lineLimit(nil) .frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行 - .padding() + //.padding() } else { - Text("闽ICP备17012590号-3A\n主办单位:福州创图信息技术有限公司").font(.caption) + Text("闽ICP备17012590号-3A 主办单位:福州创图信息技术有限公司").font(.caption) .multilineTextAlignment(.center) .lineLimit(nil) .frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行 - .padding() + //.padding() } } + + // 说明文字 + Text(SwiftLocalizationHelper.localizedString(forKey: "From the player community, to the player community.")) + .multilineTextAlignment(.center) + .font(Font.caption.italic()) + .lineLimit(nil) + .frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行 + .padding() + + + Text(SwiftLocalizationHelper.localizedString(forKey: "VoidLink has better performance now!")) + .multilineTextAlignment(.center) + .font(Font.callout.bold()) + .lineLimit(nil) + .frame(maxWidth: 570) // ✅ 避免 Text 被拉得太宽无法换行 + // 链接按钮 if #available(iOS 14.0, *) { - Link(SwiftLocalizationHelper.localizedString(forKey: "Join us"), destination: URL(string: SwiftLocalizationHelper.localizedString(forKey: "supportLink"))!) + Link(SwiftLocalizationHelper.localizedString(forKey: "Learn more & join us"), destination: URL(string: SwiftLocalizationHelper.localizedString(forKey: "supportLink"))!) .padding(.top, 10) Spacer() // OK 按钮 diff --git a/VoidLink/AboutViewController.swift b/VoidLink/AboutViewController.swift index ea1fdcb6..2cda1277 100644 --- a/VoidLink/AboutViewController.swift +++ b/VoidLink/AboutViewController.swift @@ -29,7 +29,7 @@ import SwiftUI ]) // 🎯 设置弹窗大小 - preferredContentSize = CGSize(width: 530, height: 450) + preferredContentSize = CGSize(width: 530, height: 430) // ⚠️ 一定要设置以下样式才会生效 preferredContentSize modalPresentationStyle = .formSheet diff --git a/VoidLink/Localization/Localizable.xcstrings b/VoidLink/Localization/Localizable.xcstrings index a86a3bde..0112fccd 100644 --- a/VoidLink/Localization/Localizable.xcstrings +++ b/VoidLink/Localization/Localizable.xcstrings @@ -4118,29 +4118,6 @@ } } }, - "Join us" : { - "extractionState" : "manual", - "localizations" : { - "zh-Hans" : { - "stringUnit" : { - "state" : "translated", - "value" : "加入我们" - } - }, - "zh-Hant" : { - "stringUnit" : { - "state" : "translated", - "value" : "加入我們" - } - }, - "zh-HK" : { - "stringUnit" : { - "state" : "translated", - "value" : "加入我們" - } - } - } - }, "Label alpha: %.2f" : { "extractionState" : "manual", "localizations" : { @@ -4279,6 +4256,29 @@ } } }, + "Learn more & join us" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "了解并加入社区" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "瞭解並加入社群" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "瞭解並加入社群" + } + } + } + }, "left" : { "extractionState" : "manual", "localizations" : { @@ -8695,6 +8695,29 @@ } } }, + "VoidLink has better performance now!" : { + "extractionState" : "manual", + "localizations" : { + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "VoidLink现已具备更强性能!" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "VoidLink現已具備更強效能!" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "VoidLink現已具備更強效能!" + } + } + } + }, "Waiting for controller..." : { "extractionState" : "manual", "localizations" : { @@ -8775,7 +8798,7 @@ }, "zh-Hans" : { "stringUnit" : { - "state" : "needs_review", + "state" : "translated", "value" : "开发者: True砖家 (B站)" } }, @@ -8920,7 +8943,7 @@ } } }, - "闽ICP备17012590号-3A\n主办单位:福州创图信息技术有限公司" : { + "闽ICP备17012590号-3A 主办单位:福州创图信息技术有限公司" : { } }, diff --git a/VoidLink/ViewControllers/MainFrameViewController.m b/VoidLink/ViewControllers/MainFrameViewController.m index 0eb7321b..9babbe02 100644 --- a/VoidLink/ViewControllers/MainFrameViewController.m +++ b/VoidLink/ViewControllers/MainFrameViewController.m @@ -1347,11 +1347,12 @@ static NSMutableSet* hostList; } } -- (BOOL)isFirstLaunch { - NSString *key = @"appHasLaunchedBefore"; - BOOL launchedBefore = [[NSUserDefaults standardUserDefaults] boolForKey:key]; +- (BOOL)needPopupAboutView { + // NSString *key = @"appHasLaunchedBefore"; + NSString *key = @"needPopupAboutView20260215"; + BOOL keyExists = [[NSUserDefaults standardUserDefaults] boolForKey:key]; - if (!launchedBefore) { + if (!keyExists) { [[NSUserDefaults standardUserDefaults] setBool:YES forKey:key]; [[NSUserDefaults standardUserDefaults] synchronize]; // iOS 12+ 可省略 return YES; @@ -1964,7 +1965,7 @@ static NSMutableSet* hostList; //[self simulateSettingsButtonPress]; //force reload resolution table in the setting //[self simulateSettingsButtonPress]; [self updateResolutionAccordingly]; - if([self isFirstLaunch])[self helpButtonTapped]; + if([self needPopupAboutView])[self helpButtonTapped]; } - (void)viewWillDisappear:(BOOL)animated{