Skip to content

Commit 30eb4a5

Browse files
committed
Quick fixes before v1.2
1 parent 2769cfe commit 30eb4a5

File tree

6 files changed

+38
-41
lines changed

6 files changed

+38
-41
lines changed

Applite.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@
670670
"@executable_path/../Frameworks",
671671
);
672672
MACOSX_DEPLOYMENT_TARGET = 13.0;
673-
MARKETING_VERSION = 1.1;
673+
MARKETING_VERSION = 1.2;
674674
PRODUCT_BUNDLE_IDENTIFIER = dev.aerolite.Applite;
675675
PRODUCT_NAME = "$(TARGET_NAME)";
676676
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -705,7 +705,7 @@
705705
"@executable_path/../Frameworks",
706706
);
707707
MACOSX_DEPLOYMENT_TARGET = 13.0;
708-
MARKETING_VERSION = 1.1;
708+
MARKETING_VERSION = 1.2;
709709
PRODUCT_BUNDLE_IDENTIFIER = dev.aerolite.Applite;
710710
PRODUCT_NAME = "$(TARGET_NAME)";
711711
SWIFT_EMIT_LOC_STRINGS = YES;

Applite/Model/Cask Data/Cask.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,15 +281,15 @@ final class Cask: Identifiable, Decodable, Hashable, ObservableObject {
281281
}
282282
}
283283

284-
appPath = "\(applicationsDirectory)/\(self.name).app"
284+
appPath = "\"\(applicationsDirectory)/\(self.name).app\""
285285
} else {
286286
// Open normal app
287287
let brewDirectory = BrewPaths.currentBrewDirectory
288288

289289
appPath = "\(brewDirectory.replacingOccurrences(of: " ", with: "\\ ") )/Caskroom/\(self.id)/*/*.app"
290290
}
291291

292-
let result = shell("open \"\(appPath)\"")
292+
let result = shell("open \(appPath)")
293293

294294
if result.didFail {
295295
Self.logger.error("Couldn't launch app at path: \(appPath). Output: \(result.output)")

Applite/Views/Detail Views/BrewManagementView.swift

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,36 @@ struct BrewManagementView: View {
1616

1717
var body: some View {
1818
ScrollView {
19-
VStack(alignment: .leading) {
20-
// Title
21-
Text("Manage Homebrew")
22-
.font(.system(size: 32, weight: .bold))
23-
24-
Text("This application uses the [Homebrew](https://brew.sh/) (brew for short) package manager to download apps. Homebrew is a free and open source command line utility that can download useful developer tools as well as desktop applications.")
19+
VStack {
20+
VStack(alignment: .leading) {
21+
// Title
22+
Text("Manage Homebrew")
23+
.font(.system(size: 32, weight: .bold))
24+
25+
Text("This application uses the [Homebrew](https://brew.sh/) (brew for short) package manager to download apps. Homebrew is a free and open source command line utility that can download useful developer tools as well as desktop applications.")
26+
.padding(.bottom)
27+
28+
section(title: "Info") {
29+
InfoView()
30+
}
2531
.padding(.bottom)
26-
27-
section(title: "Info") {
28-
InfoView()
29-
}
30-
.padding(.bottom)
31-
32-
section(title: "Actions") {
33-
ActionsView(modifyingBrew: $modifyingBrew)
34-
}
35-
.padding(.bottom)
36-
37-
section(title: "Import/Export apps") {
38-
ExportView()
32+
33+
section(title: "Actions") {
34+
ActionsView(modifyingBrew: $modifyingBrew)
35+
}
36+
.padding(.bottom)
37+
38+
section(title: "Import/Export apps") {
39+
ExportView()
40+
}
41+
42+
Spacer()
3943
}
40-
41-
Spacer()
44+
.frame(maxWidth: 800)
45+
.padding(12)
4246
}
43-
.padding(12)
47+
.frame(maxWidth: .infinity)
4448
}
45-
.frame(maxWidth: 800)
4649
}
4750

4851
func section<Content: View>(title: LocalizedStringKey, @ViewBuilder content: ()->Content) -> some View {
@@ -151,6 +154,10 @@ struct BrewManagementView: View {
151154
// Reinstall brew button
152155
HStack {
153156
reinstallButton
157+
.task {
158+
// Check if brew is installed in application support
159+
isAppBrewInstalled = isBrewPathValid(path: BrewPaths.getBrewExectuablePath(for: .appPath))
160+
}
154161

155162
if reinstallDone {
156163
Image(systemName: "checkmark")
@@ -172,14 +179,6 @@ struct BrewManagementView: View {
172179
SmallProgressView()
173180
}
174181
}
175-
176-
EmptyView()
177-
.task {
178-
// Check if brew is installed in application support
179-
print("checking \(BrewPaths.getBrewExectuablePath(for: .appPath))")
180-
isAppBrewInstalled = isBrewPathValid(path: BrewPaths.getBrewExectuablePath(for: .appPath))
181-
print("result \(isAppBrewInstalled)")
182-
}
183182
}
184183

185184
private var updateButton: some View {
@@ -328,8 +327,6 @@ struct BrewManagementView: View {
328327
do {
329328
let casks = try readCaskFile(url: url[0])
330329

331-
print(casks)
332-
333330
installImported(casks: casks)
334331
} catch {
335332
logger.error("Failed to import cask. Reason: \(error.localizedDescription)")

Applite/Views/SettingsView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ fileprivate struct GeneralSettingsView: View {
102102
// Set color scheme to system
103103
colorSchemePreference = darkMode ? .dark : .light
104104
// Wait
105-
try? await Task.sleep(for: .seconds(0.001))
105+
try? await Task.sleep(for: .seconds(0.1))
106106
// Set it back to nil (.system)
107107
colorSchemePreference = .system
108108
// Wait
109-
try? await Task.sleep(for: .seconds(0.001))
109+
try? await Task.sleep(for: .seconds(0.1))
110110
// Set fixing color back to false
111111
await MainActor.run { self.fixingColor = false }
112112
}

Applite/Views/SetupView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,11 @@ struct SetupView: View {
198198

199199
VStack(alignment: .leading) {
200200
BrewPathSelectorView(isSelectedPathValid: $isBrewPathValid)
201-
.padding(.bottom)
202201

203202
Text("Selected brew path is invalid!")
204203
.foregroundColor(.red)
205204
.opacity(isBrewPathValid ? 0 : 1)
205+
.padding(.bottom)
206206

207207
Text("Appdir (optional)")
208208
.font(.system(size: 16, weight: .bold))

Localizable.xcstrings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,7 @@
15971597
"hu" : {
15981598
"stringUnit" : {
15991599
"state" : "translated",
1600-
"value" : "Függőségek telepítése"
1600+
"value" : "Tartozékok telepítése"
16011601
}
16021602
}
16031603
}

0 commit comments

Comments
 (0)