Skip to content

Commit 69b6d10

Browse files
committed
Show submodules
1 parent a21a18b commit 69b6d10

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

Trio.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@
511511
DDAA29852D2D1D9E006546A1 /* AdjustmentsRootView+TempTargets.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAA29842D2D1D98006546A1 /* AdjustmentsRootView+TempTargets.swift */; };
512512
DDB37CC52D05048F00D99BF4 /* ContactImageStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB37CC42D05048F00D99BF4 /* ContactImageStorage.swift */; };
513513
DDB37CC72D05127500D99BF4 /* FontExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB37CC62D05127500D99BF4 /* FontExtensions.swift */; };
514+
DDCE790F2D6F97FC000A4D7A /* SubmodulesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDCE790E2D6F97F7000A4D7A /* SubmodulesView.swift */; };
514515
DDCEBF5B2CC1B76400DF4C36 /* LiveActivity+Helper.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDCEBF5A2CC1B76400DF4C36 /* LiveActivity+Helper.swift */; };
515516
DDD163122C4C689900CD525A /* AdjustmentsStateModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDD163112C4C689900CD525A /* AdjustmentsStateModel.swift */; };
516517
DDD163142C4C68D300CD525A /* AdjustmentsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDD163132C4C68D300CD525A /* AdjustmentsProvider.swift */; };
@@ -1208,6 +1209,7 @@
12081209
DDB37CC32D05044D00D99BF4 /* ContactTrickEntryStored+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ContactTrickEntryStored+CoreDataProperties.swift"; sourceTree = "<group>"; };
12091210
DDB37CC42D05048F00D99BF4 /* ContactImageStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactImageStorage.swift; sourceTree = "<group>"; };
12101211
DDB37CC62D05127500D99BF4 /* FontExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontExtensions.swift; sourceTree = "<group>"; };
1212+
DDCE790E2D6F97F7000A4D7A /* SubmodulesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubmodulesView.swift; sourceTree = "<group>"; };
12111213
DDCEBF5A2CC1B76400DF4C36 /* LiveActivity+Helper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "LiveActivity+Helper.swift"; sourceTree = "<group>"; };
12121214
DDD163112C4C689900CD525A /* AdjustmentsStateModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdjustmentsStateModel.swift; sourceTree = "<group>"; };
12131215
DDD163132C4C68D300CD525A /* AdjustmentsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdjustmentsProvider.swift; sourceTree = "<group>"; };
@@ -2770,6 +2772,7 @@
27702772
DD1745112C54168300211FAC /* Subviews */ = {
27712773
isa = PBXGroup;
27722774
children = (
2775+
DDCE790E2D6F97F7000A4D7A /* SubmodulesView.swift */,
27732776
DD1745122C54169400211FAC /* DevicesView.swift */,
27742777
DD1745142C54388A00211FAC /* TherapySettingsView.swift */,
27752778
DD1745162C54389F00211FAC /* FeatureSettingsView.swift */,
@@ -3948,6 +3951,7 @@
39483951
DD1745132C54169400211FAC /* DevicesView.swift in Sources */,
39493952
7F7B756BE8543965D9FDF1A2 /* DataTableDataFlow.swift in Sources */,
39503953
1D845DF2E3324130E1D95E67 /* DataTableProvider.swift in Sources */,
3954+
DDCE790F2D6F97FC000A4D7A /* SubmodulesView.swift in Sources */,
39513955
19F95FFA29F1102A00314DDC /* StatRootView.swift in Sources */,
39523956
0D9A5E34A899219C5C4CDFAF /* DataTableStateModel.swift in Sources */,
39533957
6BCF84DD2B16843A003AD46E /* LiveActitiyAttributes.swift in Sources */,

Trio/Sources/Modules/Settings/View/SettingsRootView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ extension Settings {
8080
let versionNumber = Bundle.main.releaseVersionNumber ?? String(localized: "Unknown")
8181
let buildNumber = Bundle.main.buildVersionNumber ?? String(localized: "Unknown")
8282

83-
Group {
83+
NavigationLink(destination: SubmodulesView(buildDetails: buildDetails)) {
8484
HStack {
8585
Image(appIcons.appIcon.rawValue)
8686
.resizable()
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import SwiftUI
2+
3+
struct SubmodulesView: View {
4+
let buildDetails: BuildDetails
5+
6+
var body: some View {
7+
List {
8+
Section {
9+
ForEach(buildDetails.submodules.sorted(by: { $0.key < $1.key }), id: \.key) { name, info in
10+
KeyValueRow(key: name, value: info.commitSHA)
11+
}
12+
}
13+
}
14+
.listStyle(.insetGrouped)
15+
.navigationTitle("Submodules")
16+
.navigationBarTitleDisplayMode(.inline)
17+
}
18+
}
19+
20+
struct KeyValueRow: View {
21+
let key: String
22+
let value: String
23+
24+
var body: some View {
25+
HStack {
26+
Text(key)
27+
.foregroundColor(.primary)
28+
Spacer()
29+
Text(value)
30+
.foregroundColor(.secondary)
31+
.multilineTextAlignment(.trailing)
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)