Skip to content

Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.

Show only the status beside a game, not the signature days

v0lumehi91a75f3db0a9
diff --git a/frontend/Sources/NSPortBuilder/AppSignature.swift b/frontend/Sources/NSPortBuilder/AppSignature.swift
index 540552ca..4761a272 100644
--- a/frontend/Sources/NSPortBuilder/AppSignature.swift
+++ b/frontend/Sources/NSPortBuilder/AppSignature.swift
@@ -54,12 +54,4 @@ enum AppSignature {
if days == 0 { return String(format: t("dev.expiryToday"), day) }
return String(format: t("dev.expiry"), day, days)
}
-
- /// The compact form beside a game's status ("3 days left", "expired"): a card has no room for the date.
- static func short(_ date: Date, _ t: (String) -> String, now: Date = Date()) -> String {
- let days = daysLeft(to: date, now: now)
- if days < 0 { return t("dev.expiryExpiredShort") }
- if days == 0 { return t("dev.expiryTodayShort") }
- return String(format: t("dev.expiryShort"), days)
- }
}
diff --git a/frontend/Sources/NSPortBuilder/LauncherView.swift b/frontend/Sources/NSPortBuilder/LauncherView.swift
index 5682c12d..51f7621b 100644
--- a/frontend/Sources/NSPortBuilder/LauncherView.swift
+++ b/frontend/Sources/NSPortBuilder/LauncherView.swift
@@ -681,14 +681,6 @@ struct ContentView: View {
.font(.manrope(prominent ? 13 : 12)).foregroundStyle(.secondary).lineLimit(1)
.help(m.t("library.olderToolsHelp"))
}
- // A free Apple ID's profile lasts 7 days: the card says when it runs out, the hero offers to renew it.
- if !building, let expiry = signatureExpiry[game.id] {
- Text("· " + AppSignature.short(expiry, m.t))
- .font(.manrope(prominent ? 13 : 12))
- .foregroundStyle(AppSignature.isUrgent(expiry) ? LauncherPalette.building : .secondary)
- .lineLimit(1)
- .help(AppSignature.describe(expiry, m.t))
- }
}
.accessibilityElement(children: .combine)
}
diff --git a/frontend/Tests/NSPortBuilderTests/SignatureTests.swift b/frontend/Tests/NSPortBuilderTests/SignatureTests.swift
index 4922c6b1..eb775253 100644
--- a/frontend/Tests/NSPortBuilderTests/SignatureTests.swift
+++ b/frontend/Tests/NSPortBuilderTests/SignatureTests.swift
@@ -61,7 +61,5 @@ final class SignatureTests: XCTestCase {
XCTAssertTrue(today.contains("today"), today)
let zh = AppSignature.describe(inThree, { L10n.string($0, .zh) }, now: now, locale: Locale(identifier: "zh_CN"))
XCTAssertTrue(zh.contains("剩 3 天"), zh)
- XCTAssertEqual(AppSignature.short(inThree, { L10n.string($0, .en) }, now: now), "3 days of signature left")
- XCTAssertEqual(AppSignature.short(yesterday, { L10n.string($0, .en) }, now: now), "signature expired")
}
}