diff --git a/CubeTime/Helper/HelperUI.swift b/CubeTime/Helper/HelperUI.swift index 0a9e916..0c181e3 100644 --- a/CubeTime/Helper/HelperUI.swift +++ b/CubeTime/Helper/HelperUI.swift @@ -263,6 +263,11 @@ struct CTPuzzleBubble: View { text = PUZZLE_TYPES[scrambleType].name } + init(scrambleType: PuzzleType) { + icon = Image(scrambleType.name) + text = scrambleType.name + } + init(session: Session) { icon = session.icon() as! Image text = session.typeName diff --git a/CubeTime/Settings/AboutSettings.swift b/CubeTime/Settings/AboutSettings.swift index f90917d..d57661d 100644 --- a/CubeTime/Settings/AboutSettings.swift +++ b/CubeTime/Settings/AboutSettings.swift @@ -94,7 +94,7 @@ struct AboutSettingsView: View { .padding(.trailing, 6) VStack(alignment: .leading, spacing: 0) { - Text("CubeTime.") + Text("CubeTime") .recursiveMono(size: 28) .foregroundColor(Color("dark")) @@ -135,17 +135,11 @@ struct AboutSettingsView: View { guard let kofiLink = URL(string: "https://ko-fi.com/cubetime"), UIApplication.shared.canOpenURL(kofiLink) else { return } UIApplication.shared.open(kofiLink, options: [:], completionHandler: nil) } label: { - HStack { - Spacer() - - Image("kofiButton") - .resizable() - .aspectRatio(contentMode: .fit) - .frame(width: parentGeo.size.width * 0.618) - .frame(maxHeight: 40) - - Spacer() - } + Image("kofiButton") + .resizable() + .aspectRatio(contentMode: .fit) + .frame(width: parentGeo.size.width * 0.618) + .frame(maxHeight: 40) } .padding(.top, -8) @@ -166,6 +160,11 @@ struct AboutSettingsView: View { showOnboarding = true } #endif + + Text("© 2021–2024 Tim Xie & Reagan Bohan.") + .font(.system(size: 13)) + .foregroundColor(Color("grey").opacity(0.36)) + .padding(.top, 32) } .padding(.horizontal) .sheet(isPresented: $showLicenses) { diff --git a/CubeTime/Settings/Licenses.swift b/CubeTime/Settings/Licenses.swift index 2a69683..9ae1ccb 100644 --- a/CubeTime/Settings/Licenses.swift +++ b/CubeTime/Settings/Licenses.swift @@ -3,7 +3,7 @@ import SwiftUI struct CubeTimeLicense: View { var body: some View { VStack { - Text("© 2021-2023 Tim Xie and Reagan Bohan\nCubeTime is licensed under the GNU GPL v3 license, which is shown below.") + Text("© 2021–2024 Tim Xie & Reagan Bohan.\nCubeTime is licensed under the GNU GPL v3 license, which is shown below.") Divider() GPLLicense() diff --git a/CubeTime/Stats/StatsDetailView.swift b/CubeTime/Stats/StatsDetailView.swift index a0cc7c6..cd39df7 100644 --- a/CubeTime/Stats/StatsDetailView.swift +++ b/CubeTime/Stats/StatsDetailView.swift @@ -134,9 +134,9 @@ struct StatsDetailView: View { .background(RoundedRectangle(cornerRadius: 8, style: .continuous).fill(Color("overlay1"))) .padding(.top) - Text("CubeTime.") + Text("CubeTime") .recursiveMono(size: 13) - .foregroundColor(Color("grey").opacity(0.25)) + .foregroundColor(Color("grey").opacity(0.36)) .frame(maxWidth: .infinity, alignment: .trailing) .padding(.vertical, -4) diff --git a/CubeTime/TimeList/TimeDetailView.swift b/CubeTime/TimeList/TimeDetailView.swift index 528cab3..9db19d9 100644 --- a/CubeTime/TimeList/TimeDetailView.swift +++ b/CubeTime/TimeList/TimeDetailView.swift @@ -29,7 +29,7 @@ struct TimeDetailView: View { private let date: Date private let time: String - private let puzzle_type: PuzzleType + private let puzzleType: PuzzleType private let scramble: String private let phases: Array? @@ -44,7 +44,7 @@ struct TimeDetailView: View { self.solve = solve self.date = solve.date ?? Date(timeIntervalSince1970: 0) self.time = formatSolveTime(secs: solve.time, penalty: Penalty(rawValue: solve.penalty)!) - self.puzzle_type = PUZZLE_TYPES[Int(solve.scrambleType)] + self.puzzleType = PUZZLE_TYPES[Int(solve.scrambleType)] self.scramble = solve.scramble ?? "Retrieving scramble failed." if let multiphaseSolve = (solve as? MultiphaseSolve), let phases = multiphaseSolve.phases { @@ -113,9 +113,9 @@ struct TimeDetailView: View { HStack { HStack(alignment: .center, spacing: 4) { - Text(puzzle_type.name) + Text(puzzleType.name) - Image(puzzle_type.name) + Image(puzzleType.name) .resizable() .frame(width: 16, height: 16) } @@ -129,9 +129,10 @@ struct TimeDetailView: View { Spacer() } .font(.subheadline.weight(.medium)) + .frame(maxWidth: .infinity, alignment: .leading) Group { - if puzzle_type.name == "Megaminx" { + if puzzleType.name == "Megaminx" { Text(scramble) .fixedSize(horizontal: true, vertical: false) .multilineTextAlignment(.leading) @@ -186,9 +187,9 @@ struct TimeDetailView: View { HStack { Spacer() - Text("CubeTime.") + Text("CubeTime") .recursiveMono(size: 13) - .foregroundColor(Color("grey").opacity(0.25)) + .foregroundColor(Color("grey").opacity(0.36)) } .padding(.vertical, -4) diff --git a/CubeTime/Timer/ScrambleView.swift b/CubeTime/Timer/ScrambleView.swift index 36d8878..1b48331 100644 --- a/CubeTime/Timer/ScrambleView.swift +++ b/CubeTime/Timer/ScrambleView.swift @@ -28,6 +28,8 @@ struct AsyncSVGView: View { graal_create_isolate(nil, &isolate, &thread) + var svg = "" + /* var svg: String! #warning("todo: infinite loading if :boom:") @@ -40,6 +42,7 @@ struct AsyncSVGView: View { } graal_tear_down_isolate(thread); + */ return svg }