Skip to content

Commit

Permalink
tidy up cody + ui improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
pdtxie committed Mar 26, 2024
1 parent 8e99331 commit 4dbe64c
Show file tree
Hide file tree
Showing 8 changed files with 243 additions and 286 deletions.
26 changes: 17 additions & 9 deletions CubeTime.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
239560A629C3056E00735035 /* SplashPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 239560A529C3056E00735035 /* SplashPad.storyboard */; };
2397131F2791032300268DFA /* AveragePhases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2397131E2791032300268DFA /* AveragePhases.swift */; };
23A1CDBD29399FE000F0895D /* SwiftfulLoadingIndicators in Frameworks */ = {isa = PBXBuildFile; productRef = 23A1CDBC29399FE000F0895D /* SwiftfulLoadingIndicators */; };
23AAF99629B0219200C5C1FF /* ScrollableLineChart.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23AAF99529B0219200C5C1FF /* ScrollableLineChart.swift */; };
23AAF99629B0219200C5C1FF /* TimeTrendViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23AAF99529B0219200C5C1FF /* TimeTrendViewController.swift */; };
23AAF99829B072F900C5C1FF /* StatsDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23AAF99729B072F900C5C1FF /* StatsDetailView.swift */; };
23AB648429385D310049993B /* NewSessionRootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23AB648329385D310049993B /* NewSessionRootView.swift */; };
23AB648C293867EA0049993B /* 12sec-audio.wav in Resources */ = {isa = PBXBuildFile; fileRef = 23AB648A293867EA0049993B /* 12sec-audio.wav */; };
Expand Down Expand Up @@ -60,7 +60,7 @@
23E81E73275D8DEA00B741E3 /* AboutSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23E81E72275D8DEA00B741E3 /* AboutSettings.swift */; };
23EB8A1E2779B6D3000F6663 /* TimeBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23EB8A1D2779B6D3000F6663 /* TimeBar.swift */; };
23F4113829ADDA77002C4E23 /* ToolsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23F4113729ADDA77002C4E23 /* ToolsViewModel.swift */; };
23F445812B46552D002B7B81 /* TimeTrendDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23F445802B46552D002B7B81 /* TimeTrendDetail.swift */; };
23F445812B46552D002B7B81 /* TimeTrendDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23F445802B46552D002B7B81 /* TimeTrendDetailView.swift */; };
7D2B805E279422BD0006AEDD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D2B805D279422BD0006AEDD /* AppDelegate.swift */; };
7D3D3154278D3CA400BBDF55 /* TimerTouchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D3D3153278D3CA400BBDF55 /* TimerTouchView.swift */; };
7D6159F92751B53E00DC9A4C /* TimeCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D6159F82751B53E00DC9A4C /* TimeCard.swift */; };
Expand Down Expand Up @@ -133,7 +133,7 @@
238FB41F29B8175C008EC1D4 /* GradientManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientManager.swift; sourceTree = "<group>"; };
239560A529C3056E00735035 /* SplashPad.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = SplashPad.storyboard; sourceTree = "<group>"; };
2397131E2791032300268DFA /* AveragePhases.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AveragePhases.swift; sourceTree = "<group>"; };
23AAF99529B0219200C5C1FF /* ScrollableLineChart.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollableLineChart.swift; sourceTree = "<group>"; };
23AAF99529B0219200C5C1FF /* TimeTrendViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeTrendViewController.swift; sourceTree = "<group>"; };
23AAF99729B072F900C5C1FF /* StatsDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatsDetailView.swift; sourceTree = "<group>"; };
23AB648329385D310049993B /* NewSessionRootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewSessionRootView.swift; sourceTree = "<group>"; };
23AB648A293867EA0049993B /* 12sec-audio.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = "12sec-audio.wav"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -170,7 +170,7 @@
23E81E72275D8DEA00B741E3 /* AboutSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutSettings.swift; sourceTree = "<group>"; };
23EB8A1D2779B6D3000F6663 /* TimeBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeBar.swift; sourceTree = "<group>"; };
23F4113729ADDA77002C4E23 /* ToolsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToolsViewModel.swift; sourceTree = "<group>"; };
23F445802B46552D002B7B81 /* TimeTrendDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeTrendDetail.swift; sourceTree = "<group>"; };
23F445802B46552D002B7B81 /* TimeTrendDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeTrendDetailView.swift; sourceTree = "<group>"; };
73B7136529BA3FF00064E02F /* CubeTime.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = CubeTime.entitlements; sourceTree = "<group>"; };
7D2B805D279422BD0006AEDD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7D3D3153278D3CA400BBDF55 /* TimerTouchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimerTouchView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -241,6 +241,16 @@
path = Fonts;
sourceTree = "<group>";
};
23418F5D2BB2C39700398EE2 /* TimeTrend */ = {
isa = PBXGroup;
children = (
2319F8B8276872F200644EB3 /* TimeTrend.swift */,
23F445802B46552D002B7B81 /* TimeTrendDetailView.swift */,
23AAF99529B0219200C5C1FF /* TimeTrendViewController.swift */,
);
path = TimeTrend;
sourceTree = "<group>";
};
235D6A6429C2BEFA002D90D8 /* Helper */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -464,9 +474,7 @@
7D7A9EBF274F38CD00C2E125 /* StatsView.swift */,
23C85EAB29388C9C00C7C3EC /* StatsSubviews.swift */,
23AAF99729B072F900C5C1FF /* StatsDetailView.swift */,
2319F8B8276872F200644EB3 /* TimeTrend.swift */,
23F445802B46552D002B7B81 /* TimeTrendDetail.swift */,
23AAF99529B0219200C5C1FF /* ScrollableLineChart.swift */,
23418F5D2BB2C39700398EE2 /* TimeTrend */,
23E647C52775B2AC00561780 /* TimeDistribution.swift */,
23CA845F2783EBA1003901FB /* ReachedTargets.swift */,
2397131E2791032300268DFA /* AveragePhases.swift */,
Expand Down Expand Up @@ -649,7 +657,7 @@
231827E729B5E86B00A40C78 /* FloatingPanel.swift in Sources */,
23CA8A0829AAF96C006676BF /* StopwatchManager+Stats.swift in Sources */,
23DE3BE4274DDBE300254D29 /* Persistence.swift in Sources */,
23AAF99629B0219200C5C1FF /* ScrollableLineChart.swift in Sources */,
23AAF99629B0219200C5C1FF /* TimeTrendViewController.swift in Sources */,
7D3D3154278D3CA400BBDF55 /* TimerTouchView.swift in Sources */,
231F37C52B81FD290016A137 /* ImportExport.swift in Sources */,
E5A559602B83456F004093B3 /* ExportViewModel.swift in Sources */,
Expand All @@ -663,7 +671,7 @@
23EB8A1E2779B6D3000F6663 /* TimeBar.swift in Sources */,
AF8874C129AAC8C0001E49D0 /* ToolsList.swift in Sources */,
235D6A6929C2C0D3002D90D8 /* HelperShare.swift in Sources */,
23F445812B46552D002B7B81 /* TimeTrendDetail.swift in Sources */,
23F445812B46552D002B7B81 /* TimeTrendDetailView.swift in Sources */,
AF8B305B29B5C7010023D23B /* SettingsManager.swift in Sources */,
AF8A157429AF15B500F6818E /* ScrambleOnlyTool.swift in Sources */,
2359689327A367A0003ED9E1 /* StopwatchManager.swift in Sources */,
Expand Down
2 changes: 1 addition & 1 deletion CubeTime/Sessions/SessionCard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ struct SessionCard: View {
.tint(Color("accent"))
}

.confirmationDialog(String("Are you sure you want to delete \"\(self.item.name)\"? All solves will be deleted and this cannot be undone."), isPresented: $isShowingDeleteDialog, titleVisibility: .visible) {
.confirmationDialog(String("Are you sure you want to delete \"\(self.item.name ?? "this session")\"? All solves will be deleted and this cannot be undone."), isPresented: $isShowingDeleteDialog, titleVisibility: .visible) {
Button("Confirm", role: .destructive) {
if item == stopwatchManager.currentSession {
var next: Session? = nil
Expand Down
3 changes: 1 addition & 2 deletions CubeTime/Stats/StatsDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,11 @@ struct StatsDetailView: View {
.frame(width: 16, height: 16)

} else {
Text(PUZZLE_TYPES[Int(session.scrambleType)].name)

Image(PUZZLE_TYPES[Int(session.scrambleType)].name)
.resizable()
.frame(width: 16, height: 16)

Text(PUZZLE_TYPES[Int(session.scrambleType)].name)
}
}

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ struct TimeTrendDetail: View {

}

#warning("TODO URGENT FIX: READD COLOURFORBUTTONTYPE")
#warning("TODO URGENT FIX: READD COLOURFORBUTTONTYPE")
LazyVGrid(columns: Array(repeating: GridItem(.flexible(minimum: 36, maximum: 100), spacing: 16), count: 3), alignment: .leading) {
ForEach(self.labels, id: \.0) { label, type in
LegendLabel(colour: .accentColor, label: label)
Expand All @@ -114,10 +114,10 @@ struct TimeTrendDetail: View {

GeometryReader { proxy in
if proxy.size.height > 0 {
DetailTimeTrendBase(rawDataPoints: stopwatchManager.solvesByDate,
limits: (stopwatchManager.solvesByDate.min(by: { $0.timeIncPen < $1.timeIncPen })!.timeIncPen, stopwatchManager.solvesByDate.max(by: { $0.timeIncPen < $1.timeIncPen })!.timeIncPen),
averageValue: 5, interval: interval,
proxy: proxy)
TimeTrendViewRepresentable(rawDataPoints: stopwatchManager.solvesByDate,
limits: (stopwatchManager.solvesByDate.min(by: { $0.timeIncPen < $1.timeIncPen })!.timeIncPen, stopwatchManager.solvesByDate.max(by: { $0.timeIncPen < $1.timeIncPen })!.timeIncPen),
averageValue: 5, interval: interval,
proxy: proxy)
}
}
.padding(.top, 8)
Expand Down
Loading

0 comments on commit 4dbe64c

Please sign in to comment.