fix(ios): unify toolbar controls and release build 3
This commit is contained in:
@@ -2,5 +2,5 @@ public enum AppMetadata {
|
|||||||
public static let name = "MultiSimAdmin"
|
public static let name = "MultiSimAdmin"
|
||||||
public static let bundleIdentifier = "fun.chick.multi-simadmin"
|
public static let bundleIdentifier = "fun.chick.multi-simadmin"
|
||||||
public static let marketingVersion = "0.2.0"
|
public static let marketingVersion = "0.2.0"
|
||||||
public static let buildVersion = "2"
|
public static let buildVersion = "3"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,28 +118,19 @@ struct FleetView: View {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ToolbarItemGroup(placement: .primaryAction) {
|
ToolbarItemGroup(placement: .primaryAction) {
|
||||||
Button {
|
AIIconButton("管理分组", systemImage: "folder.badge.gearshape") {
|
||||||
model.showingGroupManager = true
|
model.showingGroupManager = true
|
||||||
} label: {
|
|
||||||
Image(systemName: "folder.badge.gearshape")
|
|
||||||
}
|
}
|
||||||
.accessibilityLabel("管理分组")
|
|
||||||
.disabled(model.isLoading)
|
.disabled(model.isLoading)
|
||||||
|
|
||||||
Button {
|
AIIconButton("批量选择", systemImage: "checklist") {
|
||||||
model.selectionMode = true
|
model.selectionMode = true
|
||||||
} label: {
|
|
||||||
Image(systemName: "checklist")
|
|
||||||
}
|
}
|
||||||
.accessibilityLabel("批量选择")
|
|
||||||
.disabled(model.visibleRows.isEmpty)
|
.disabled(model.visibleRows.isEmpty)
|
||||||
|
|
||||||
Button {
|
AIIconButton("添加实例", systemImage: "plus") {
|
||||||
model.showingForm = true
|
model.showingForm = true
|
||||||
} label: {
|
|
||||||
Image(systemName: "plus")
|
|
||||||
}
|
}
|
||||||
.accessibilityLabel("添加实例")
|
|
||||||
.disabled(model.isLoading)
|
.disabled(model.isLoading)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ public struct AIButtonStyle: ButtonStyle {
|
|||||||
case compact
|
case compact
|
||||||
case regular
|
case regular
|
||||||
case large
|
case large
|
||||||
|
case icon
|
||||||
case toolbar
|
case toolbar
|
||||||
case toolbarInline
|
case toolbarInline
|
||||||
}
|
}
|
||||||
@@ -67,6 +68,7 @@ public struct AIButtonStyle: ButtonStyle {
|
|||||||
switch size {
|
switch size {
|
||||||
case .compact: AITheme.compactButtonHeight
|
case .compact: AITheme.compactButtonHeight
|
||||||
case .large: AITheme.largeButtonHeight
|
case .large: AITheme.largeButtonHeight
|
||||||
|
case .icon: AITheme.iconButtonSize
|
||||||
case .regular: AITheme.buttonHeight
|
case .regular: AITheme.buttonHeight
|
||||||
case .toolbar: AITheme.toolbarButtonHeight
|
case .toolbar: AITheme.toolbarButtonHeight
|
||||||
case .toolbarInline: AITheme.toolbarButtonHeight
|
case .toolbarInline: AITheme.toolbarButtonHeight
|
||||||
@@ -129,11 +131,12 @@ public struct AIButtonStyle: ButtonStyle {
|
|||||||
case .compact: return AITheme.compactButtonMinWidth
|
case .compact: return AITheme.compactButtonMinWidth
|
||||||
case .regular: return AITheme.regularButtonMinWidth
|
case .regular: return AITheme.regularButtonMinWidth
|
||||||
case .large: return 92
|
case .large: return 92
|
||||||
|
case .icon: return AITheme.iconButtonSize
|
||||||
case .toolbar, .toolbarInline: return AITheme.toolbarButtonMinWidth
|
case .toolbar, .toolbarInline: return AITheme.toolbarButtonMinWidth
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private var fixedWidth: CGFloat? {
|
private var fixedWidth: CGFloat? {
|
||||||
fixedWidthRequest ?? (size == .toolbar ? AITheme.toolbarButtonWidth : nil)
|
fixedWidthRequest ?? (size == .icon ? AITheme.iconButtonSize : (size == .toolbar ? AITheme.toolbarButtonWidth : nil))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -697,3 +697,33 @@ public struct AIToolbarButton: View {
|
|||||||
.accessibilityLabel(title)
|
.accessibilityLabel(title)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public struct AIIconButton: View {
|
||||||
|
private let title: String
|
||||||
|
private let systemImage: String
|
||||||
|
private let kind: AIButtonStyle.Kind
|
||||||
|
private let action: () -> Void
|
||||||
|
|
||||||
|
public init(
|
||||||
|
_ title: String,
|
||||||
|
systemImage: String,
|
||||||
|
kind: AIButtonStyle.Kind = .secondary,
|
||||||
|
action: @escaping () -> Void
|
||||||
|
) {
|
||||||
|
self.title = title
|
||||||
|
self.systemImage = systemImage
|
||||||
|
self.kind = kind
|
||||||
|
self.action = action
|
||||||
|
}
|
||||||
|
|
||||||
|
public var body: some View {
|
||||||
|
Button {
|
||||||
|
action()
|
||||||
|
} label: {
|
||||||
|
Image(systemName: systemImage)
|
||||||
|
.font(.system(size: 16, weight: .semibold))
|
||||||
|
}
|
||||||
|
.buttonStyle(AIButtonStyle(kind: kind, size: .icon))
|
||||||
|
.accessibilityLabel(title)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ final class AppMetadataTests: XCTestCase {
|
|||||||
XCTAssertEqual(AppMetadata.name, "MultiSimAdmin")
|
XCTAssertEqual(AppMetadata.name, "MultiSimAdmin")
|
||||||
XCTAssertEqual(AppMetadata.bundleIdentifier, "fun.chick.multi-simadmin")
|
XCTAssertEqual(AppMetadata.bundleIdentifier, "fun.chick.multi-simadmin")
|
||||||
XCTAssertEqual(AppMetadata.marketingVersion, "0.2.0")
|
XCTAssertEqual(AppMetadata.marketingVersion, "0.2.0")
|
||||||
XCTAssertEqual(AppMetadata.buildVersion, "2")
|
XCTAssertEqual(AppMetadata.buildVersion, "3")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ final class SettingsViewModelTests: XCTestCase {
|
|||||||
|
|
||||||
XCTAssertEqual(model.runtime?.appName, "MultiSimAdmin")
|
XCTAssertEqual(model.runtime?.appName, "MultiSimAdmin")
|
||||||
XCTAssertEqual(model.runtime?.marketingVersion, "0.2.0")
|
XCTAssertEqual(model.runtime?.marketingVersion, "0.2.0")
|
||||||
XCTAssertEqual(model.runtime?.buildVersion, "2")
|
XCTAssertEqual(model.runtime?.buildVersion, "3")
|
||||||
XCTAssertEqual(model.runtime?.platform, "iOS")
|
XCTAssertEqual(model.runtime?.platform, "iOS")
|
||||||
XCTAssertTrue(model.runtime?.deviceModel.isEmpty == false)
|
XCTAssertTrue(model.runtime?.deviceModel.isEmpty == false)
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ MultiSimAdmin 0.2.0 是面向 iPhone 的原生 IPA 版本。应用直接连接
|
|||||||
- 隐私说明改为“隐私与数据”,明确节点信息、实例密码和登录会话的实际保存方式。
|
- 隐私说明改为“隐私与数据”,明确节点信息、实例密码和登录会话的实际保存方式。
|
||||||
- 节点详情重排为更清晰的状态、连接、SIM、设备和会话分区。
|
- 节点详情重排为更清晰的状态、连接、SIM、设备和会话分区。
|
||||||
- 应用图标重做为黑金风格。
|
- 应用图标重做为黑金风格。
|
||||||
|
- 节点总览展示硬件、控制、SIM、蜂窝链路状态。
|
||||||
|
- 分组头和节点详情头部使用固定尺寸指标卡,加载完成后不会跳变。
|
||||||
|
- 节点总览工具栏统一为 44pt 圆角图标按钮,补齐无障碍标签。
|
||||||
|
|
||||||
## 数据与安全
|
## 数据与安全
|
||||||
|
|
||||||
@@ -32,10 +35,10 @@ MultiSimAdmin 0.2.0 是面向 iPhone 的原生 IPA 版本。应用直接连接
|
|||||||
- `build/ipa/MultiSimAdmin.ipa`
|
- `build/ipa/MultiSimAdmin.ipa`
|
||||||
- `build/ipa/MultiSimAdmin.ipa.sha256`
|
- `build/ipa/MultiSimAdmin.ipa.sha256`
|
||||||
|
|
||||||
0.2.0 (2) 校验值:
|
0.2.0 (3) 校验值:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
0320d746e231725b6f94283da0df39108cb0fc2443064201e75142cdd49fe62b MultiSimAdmin.ipa
|
1ddba7399d74705a7d31835dc6dff30c3b2fc3b3cada23c68eaa84a8fb2c832f MultiSimAdmin.ipa
|
||||||
```
|
```
|
||||||
|
|
||||||
IPA 目标为 iOS 16.0 及以上,`arm64`,Bundle ID 为 `fun.chick.multi-simadmin`。构建脚本不要求开发者证书,TrollStore 或自有签名流程可以后续处理。
|
IPA 目标为 iOS 16.0 及以上,`arm64`,Bundle ID 为 `fun.chick.multi-simadmin`。构建脚本不要求开发者证书,TrollStore 或自有签名流程可以后续处理。
|
||||||
|
|||||||
Reference in New Issue
Block a user