Skip to content

Commit

Permalink
some small texts
Browse files Browse the repository at this point in the history
  • Loading branch information
pdtxie committed Mar 26, 2024
1 parent 58a0ee6 commit c01c706
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 22 deletions.
5 changes: 5 additions & 0 deletions CubeTime/Helper/HelperUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 11 additions & 12 deletions CubeTime/Settings/AboutSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"))

Expand Down Expand Up @@ -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)

Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion CubeTime/Settings/Licenses.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions CubeTime/Stats/StatsDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
15 changes: 8 additions & 7 deletions CubeTime/TimeList/TimeDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<Double>?

Expand All @@ -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 {
Expand Down Expand Up @@ -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)
}
Expand All @@ -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)
Expand Down Expand Up @@ -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)

Expand Down
3 changes: 3 additions & 0 deletions CubeTime/Timer/ScrambleView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ struct AsyncSVGView: View {

graal_create_isolate(nil, &isolate, &thread)

var svg = ""
/*
var svg: String!
#warning("todo: infinite loading if :boom:")
Expand All @@ -40,6 +42,7 @@ struct AsyncSVGView: View {
}
graal_tear_down_isolate(thread);
*/

return svg
}
Expand Down

0 comments on commit c01c706

Please sign in to comment.