Skip to content

Commit

Permalink
add updates
Browse files Browse the repository at this point in the history
  • Loading branch information
pdtxie committed Mar 28, 2024
1 parent 9e702ad commit f4960be
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 119 deletions.
24 changes: 20 additions & 4 deletions CubeTime.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
233FE7B6274F109600C6F1DF /* Helper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 233FE7B5274F109600C6F1DF /* Helper.swift */; };
23418F592BB2A8C900398EE2 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 23418F582BB2A8C900398EE2 /* StoreKit.framework */; };
2359689327A367A0003ED9E1 /* StopwatchManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2359689227A367A0003ED9E1 /* StopwatchManager.swift */; };
235CD3022BB37C2200F6095A /* TNoodle.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5B1FCEC2BAD892A007C1688 /* TNoodle.xcframework */; };
235CD3032BB37C2200F6095A /* TNoodle.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E5B1FCEC2BAD892A007C1688 /* TNoodle.xcframework */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
235CDA0327A786D800F48C89 /* Updates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 235CDA0227A786D800F48C89 /* Updates.swift */; };
235D6A6729C2C060002D90D8 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = 235D6A6629C2C060002D90D8 /* Models.swift */; };
235D6A6929C2C0D3002D90D8 /* HelperShare.swift in Sources */ = {isa = PBXBuildFile; fileRef = 235D6A6829C2C0D3002D90D8 /* HelperShare.swift */; };
Expand Down Expand Up @@ -88,7 +90,6 @@
AFA444A229C4290500795434 /* SettingsWidgets.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFA444A129C4290400795434 /* SettingsWidgets.swift */; };
E5A559602B83456F004093B3 /* ExportViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5A5595F2B83456F004093B3 /* ExportViewModel.swift */; };
E5A742D42BA8184100321D24 /* ZIPFoundation in Frameworks */ = {isa = PBXBuildFile; productRef = E5A742D32BA8184100321D24 /* ZIPFoundation */; };
E5B1FCED2BAD892A007C1688 /* TNoodle.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5B1FCEC2BAD892A007C1688 /* TNoodle.xcframework */; };
E5B3B1532BA5B68600179BDC /* LZString in Frameworks */ = {isa = PBXBuildFile; productRef = E5B3B1522BA5B68600179BDC /* LZString */; };
/* End PBXBuildFile section */

Expand All @@ -109,6 +110,20 @@
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
235CD3042BB37C2200F6095A /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
235CD3032BB37C2200F6095A /* TNoodle.xcframework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
231827E629B5E86B00A40C78 /* FloatingPanel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = FloatingPanel.swift; path = CubeTime/Tabs/FloatingPanel.swift; sourceTree = SOURCE_ROOT; };
2319F8B8276872F200644EB3 /* TimeTrend.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeTrend.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -207,8 +222,8 @@
buildActionMask = 2147483647;
files = (
23329E9029C31CA60017AE99 /* libz.1.1.3.tbd in Frameworks */,
235CD3022BB37C2200F6095A /* TNoodle.xcframework in Frameworks */,
23418F592BB2A8C900398EE2 /* StoreKit.framework in Frameworks */,
E5B1FCED2BAD892A007C1688 /* TNoodle.xcframework in Frameworks */,
AF7697DC293C1EFA00FF1C50 /* SVGView in Frameworks */,
23A1CDBD29399FE000F0895D /* SwiftfulLoadingIndicators in Frameworks */,
E5B3B1532BA5B68600179BDC /* LZString in Frameworks */,
Expand Down Expand Up @@ -513,6 +528,7 @@
23DE3BD3274DDBE200254D29 /* Sources */,
23DE3BD4274DDBE200254D29 /* Frameworks */,
23DE3BD5274DDBE200254D29 /* Resources */,
235CD3042BB37C2200F6095A /* Embed Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -903,7 +919,7 @@
);
LIBRARY_SEARCH_PATHS = "";
LLVM_LTO = YES_THIN;
MARKETING_VERSION = 2.1.2;
MARKETING_VERSION = 3.0.0;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = com.cubetime.cubetime;
Expand Down Expand Up @@ -952,7 +968,7 @@
);
LIBRARY_SEARCH_PATHS = "";
LLVM_LTO = YES_THIN;
MARKETING_VERSION = 2.1.2;
MARKETING_VERSION = 3.0.0;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = com.cubetime.cubetime;
Expand Down
238 changes: 125 additions & 113 deletions CubeTime/Onboarding/Updates.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,54 @@ struct ListLine: View {
let updatesList: [String: (majorAdditions: [ListPoint]?,
minorAdditions: [ListPoint]?,
bugFixes: [ListPoint]?)] = [
"3.0.0": (
majorAdditions: [
ListPoint(1, "export functionality added"),
ListPoint(2, "Export options to CSV, JSON (csTimer), ODT / Excel"),
ListPoint(1, "interactive time trend graph added"),
ListPoint(2, "View time trend in more detail, and hover on points to view solve"),
ListPoint(1, "new icon!"),
],
minorAdditions: [
ListPoint(1, "many UI improvements throughout"),
ListPoint(1, "new rounded WCA icons"),
ListPoint(1, "added preference for last x solves in summarised time trend view"),
ListPoint(1, "added ability to select specific phase to view in time list"),
ListPoint(1, "added ability to search comments in time list"),
ListPoint(1, "added button to reset settings"),
ListPoint(1, "added 0s freeze time option"),
],
bugFixes: [
ListPoint(1, "many crashes fixed"),
ListPoint(1, "fixed rounding vs truncating of times"),
ListPoint(1, "fixed incorrect timer display when using 0 d.p"),
ListPoint(1, "fixed bug where regular solve could be moved to multiphase session")
]
),


"2.1.2": (
majorAdditions: nil,
minorAdditions: nil,
bugFixes: [
ListPoint(1, "fixed timelist column count on iPhone 11 Pro Max"),
]
),


"2.1.1": (
majorAdditions: nil,
minorAdditions: nil,
bugFixes: [
ListPoint(1, "fixed time trend graph bug"),
]
),


"2.1": (
majorAdditions: [
ListPoint(1, "added settings sync between devices"),
ListPoint(1, "**added ability to two-finger swipe on iPad trackpad to resize floating panel**")
ListPoint(1, "added ability to two-finger swipe on iPad trackpad to resize floating panel")
],
minorAdditions: [
ListPoint(1, "made 3-solve display show current average in compsim"),
Expand All @@ -78,34 +122,34 @@ let updatesList: [String: (majorAdditions: [ListPoint]?,

"2.0": (
majorAdditions: [
ListPoint(1, "**Fresh new UI design**"),
ListPoint(1, "fresh new UI design"),
ListPoint(2, "TONS of UI fixes throughout the app"),
ListPoint(2, "improved design consistency"),
ListPoint(1 , "**Dynamic type support!**"),
ListPoint(1 , "dynamic type support!"),
ListPoint(2, "all major UI elements now conform to Apple's DynamicType accessbility font sizes"),
ListPoint(2, "this is the first version, if you do notice anything out of place, please open an issue and tag it with 'DynamicType' on our Github page."),
ListPoint(1, "**Changed tnoodle compatibility layer**"),
ListPoint(1, "changed tnoodle compatibility layer"),
ListPoint(2, "**30x faster scramble generation**"),
ListPoint(2, "**20x less memory usage**"),
ListPoint(3, "fixes OOM crashes on older phones"),
ListPoint(3, "fixes launch crash on iPod 7th Gen"),
ListPoint(1, "**Improved stats engine**"),
ListPoint(2, "over 100x faster"),
ListPoint(1, "**iPad Mode is here!**"),
ListPoint(1, "improved stats engine"),
ListPoint(2, "**over 100x faster**"),
ListPoint(1, "iPad Mode is here!"),
ListPoint(2, "iPad mode supports many keyboard shortcuts, along with **trackpad gestures**"),
ListPoint(3, "you can two-finger swipe on your trackpad, just like using a finger"),
ListPoint(2, "new design with a floating panel"),
ListPoint(2, "to see your times, drag down on the panel handle"),
ListPoint(1, "**Added tools!**"),
ListPoint(1, "added tools!"),
ListPoint(2, "scramble generator: batch generate multiple scrambles to use or share"),
ListPoint(2, "timer and scramble only mode: for use at comps"),
ListPoint(2, "average calculator: to quickly calculate averages!"),
ListPoint(1, "**Added voice alerts for inspection**"),
ListPoint(1, "Added manual entry mode"),
ListPoint(1, "added voice alerts for inspection"),
ListPoint(1, "added manual entry mode"),
ListPoint(2, "you can switch to entering times by typing instead of a timer in General Settings > Timer Settings > Timer Mode > Typing"),
ListPoint(1, "Quick actions!"),
ListPoint(1, "quick actions!"),
ListPoint(2, "long press on icon to quickly go to your recently used sessions"),
ListPoint(1, "Cleaned up to make the app run smoother!"),
ListPoint(1, "cleaned up to make the app run smoother!"),
ListPoint(2, "we've written over 20,000 lines of code for this update!")],

minorAdditions: [
Expand Down Expand Up @@ -163,11 +207,28 @@ struct Updates: View {
NavigationView {
ScrollView {
VStack(alignment: .leading, spacing: 0) {
Text("CubeTime v3.0.0 is here!")
.foregroundStyle(getGradient(gradientSelected: 0, isStaticGradient: true))
.recursiveMono(size: 21, weight: .semibold)
.frame(maxWidth: .infinity, alignment: .center)
.padding(.vertical, 12)

Group {
Update(update: updatesList["2.0"]!)
Update("3.0.0")

Text("Thanks for using this app! If anything goes wrong, please message me on discord (tim#0911) or open an issue on our github page (https://github.com/CubeStuffs/CubeTime/issues).")
Text("Thanks for using this app! If you have any feedback (good or bad!), please open an issue on [our github page](https://github.com/CubeStuffs/CubeTime/issues) or [contact me personally](https://tim-xie.com/contact).")
.font(.body).fontWeight(.medium)
.accentColor(Color("accent"))

Text("Older changes")
.padding(.top, 64)
.font(.title3.weight(.semibold))

Update("2.1.2")

Update("2.1.1")

Update("2.0")
}

Spacer()
Expand All @@ -193,123 +254,74 @@ struct Update: View {
var minorAdditions: [ListPoint]?
var bugFixes: [ListPoint]?

init(update: (majorAdditions: [ListPoint]?,
minorAdditions: [ListPoint]?,
bugFixes: [ListPoint]?)) {
self.majorAdditions = update.majorAdditions
self.minorAdditions = update.minorAdditions
self.bugFixes = update.bugFixes
let version: String

init(_ version: String) {
self.version = version

if let update = updatesList[version] {
self.majorAdditions = update.majorAdditions
self.minorAdditions = update.minorAdditions
self.bugFixes = update.bugFixes
}
}

var body: some View {
VStack(alignment: .leading, spacing: 0) {
Text("CubeTime v2 is here!")
.foregroundStyle(getGradient(gradientSelected: 0, isStaticGradient: true))
.recursiveMono(size: 21, weight: .semibold)
.frame(maxWidth: .infinity, alignment: .center)
.padding(.vertical, 12)

Group {
Text("v2.1.2 changes:")
.foregroundStyle(getGradient(gradientSelected: 0, isStaticGradient: true))
Text("v\(version) changes:")
.recursiveMono(size: 15, weight: .semibold)
.padding(.top, 8)

ListLine(1, .init(stringLiteral: "fixed timelist column count on iPhone 11 Pro Max"))
.padding(.top)

CTDivider()
.padding(.top, 4)
.padding(.bottom, 8)

Text("v2.1.1 changes:")
.foregroundStyle(getGradient(gradientSelected: 0, isStaticGradient: true))
.recursiveMono(size: 15, weight: .semibold)
.padding(.top, 8)

ListLine(1, .init(stringLiteral: "fixed time trend graph bug"))
}



Group {
Text("v2.1 changes:")
.foregroundStyle(getGradient(gradientSelected: 0, isStaticGradient: true))
.recursiveMono(size: 15, weight: .semibold)
.padding(.top, 8)


Text("Major Additions: ")
.font(.title3).fontWeight(.semibold)

VStack(alignment: .leading, spacing: 2) {
ForEach(updatesList["2.1"]!.majorAdditions!, id: \.self) { point in
ListLine(point.depth, .init(stringLiteral: point.text))
}
}
.padding(.bottom)

Text("Minor Additions: ")
.font(.title3).fontWeight(.semibold)

VStack(alignment: .leading, spacing: 2) {
ForEach(updatesList["2.1"]!.minorAdditions!, id: \.self) { point in
ListLine(point.depth, .init(stringLiteral: point.text))
}
}
.padding(.bottom)

Text("Bug Fixes: ")
.font(.title3).fontWeight(.semibold)

VStack(alignment: .leading, spacing: 2) {
ForEach(updatesList["2.1"]!.bugFixes!, id: \.self) { point in
ListLine(point.depth, .init(stringLiteral: point.text))
if let majorAdditions = majorAdditions {
Text("Major Additions: ")
.font(.title3).fontWeight(.semibold)

VStack(alignment: .leading, spacing: 2) {
ForEach(majorAdditions, id: \.self) { point in
ListLine(point.depth, .init(stringLiteral: point.text))
.if(point.depth == 1) { body in
body.font(.body.weight(.semibold))
}
}
}
.padding(.bottom)
}
.padding(.bottom)
.font(.callout)
}



Text("v2.0 changes:")
.foregroundStyle(getGradient(gradientSelected: 0, isStaticGradient: true))
.recursiveMono(size: 15, weight: .semibold)

if let majorAdditions = majorAdditions {
Text("Major Additions: ")
.font(.title3).fontWeight(.semibold)

VStack(alignment: .leading, spacing: 2) {
ForEach(majorAdditions, id: \.self) { point in
ListLine(point.depth, .init(stringLiteral: point.text))
}
}
.padding(.bottom)
}

if let minorAdditions = minorAdditions {
Text("Minor Additions: ")
.font(.title3).fontWeight(.semibold)

VStack(alignment: .leading, spacing: 2) {
ForEach(minorAdditions, id: \.self) { point in
ListLine(point.depth, .init(stringLiteral: point.text))
if let minorAdditions = minorAdditions {
Text("Minor Additions: ")
.font(.title3).fontWeight(.semibold)

VStack(alignment: .leading, spacing: 2) {
ForEach(minorAdditions, id: \.self) { point in
ListLine(point.depth, .init(stringLiteral: point.text))
}
}
.padding(.bottom)
}
.padding(.bottom)
}

if let bugFixes = bugFixes {
Text("Bug Fixes: ")
.font(.title3).fontWeight(.semibold)

VStack(alignment: .leading, spacing: 2) {
ForEach(bugFixes, id: \.self) { point in
ListLine(point.depth, .init(stringLiteral: point.text))
if let bugFixes = bugFixes {
Text("Bug Fixes: ")
.font(.title3).fontWeight(.semibold)

VStack(alignment: .leading, spacing: 2) {
ForEach(bugFixes, id: \.self) { point in
ListLine(point.depth, .init(stringLiteral: point.text))
}
}
.padding(.bottom)
.font(.callout)
}
.padding(.bottom)
.font(.callout)
}
}
.padding(.bottom)
}
}

#Preview {
Updates(showUpdates: .constant(true))
}
2 changes: 1 addition & 1 deletion CubeTime/StopwatchManager/ScrambleController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ScrambleController: ObservableObject {
var thread: OpaquePointer? = nil

let ret = graal_create_isolate(nil, &isolate, &thread)

let s = String(cString: tnoodle_lib_scramble(thread!, scrambleType))

graal_tear_down_isolate(thread);
Expand Down
1 change: 0 additions & 1 deletion CubeTimeTests/StopwatchManagerStatsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ struct TestSolveWrapper {
solveItem.scramble = "Scramble"
solveItem.session = session
solveItem.scrambleType = 1
solveItem.scrambleSubtype = 0
return solveItem
}
}
Expand Down

0 comments on commit f4960be

Please sign in to comment.