Skip to content

Commit c0c4c9a

Browse files
authored
Merge pull request #5 from dunkmann00/prepare-1_1
Prepare 1.1
2 parents 7aaa2fb + ab7b333 commit c0c4c9a

File tree

4 files changed

+77
-7
lines changed

4 files changed

+77
-7
lines changed

PrusaLink.xcodeproj/project.pbxproj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
05C394AD2B0C147900156E9F /* PrinterItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05C394AC2B0C147900156E9F /* PrinterItem.swift */; };
4545
05C394AF2B0C14C500156E9F /* NavLogoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05C394AE2B0C14C500156E9F /* NavLogoView.swift */; };
4646
05C394B12B0C15F100156E9F /* Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05C394B02B0C15F100156E9F /* Environment.swift */; };
47+
05C394B52B0C756900156E9F /* TestPrinters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05C394B42B0C756900156E9F /* TestPrinters.swift */; };
4748
/* End PBXBuildFile section */
4849

4950
/* Begin PBXContainerItemProxy section */
@@ -106,6 +107,7 @@
106107
05C394AC2B0C147900156E9F /* PrinterItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrinterItem.swift; sourceTree = "<group>"; };
107108
05C394AE2B0C14C500156E9F /* NavLogoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavLogoView.swift; sourceTree = "<group>"; };
108109
05C394B02B0C15F100156E9F /* Environment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Environment.swift; sourceTree = "<group>"; };
110+
05C394B42B0C756900156E9F /* TestPrinters.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestPrinters.swift; sourceTree = "<group>"; };
109111
/* End PBXFileReference section */
110112

111113
/* Begin PBXFrameworksBuildPhase section */
@@ -234,6 +236,7 @@
234236
05C3949C2B0C11C200156E9F /* SettingsDataStore.swift */,
235237
05C3949F2B0C120B00156E9F /* DiskIO.swift */,
236238
05C394B02B0C15F100156E9F /* Environment.swift */,
239+
05C394B42B0C756900156E9F /* TestPrinters.swift */,
237240
);
238241
path = Utils;
239242
sourceTree = "<group>";
@@ -415,6 +418,7 @@
415418
05C02DBC2AA7D4DE008852EA /* PrusaWebViewController.swift in Sources */,
416419
05C394A02B0C120B00156E9F /* DiskIO.swift in Sources */,
417420
0540DB2E2AB9363000B61BC9 /* SettingsView.swift in Sources */,
421+
05C394B52B0C756900156E9F /* TestPrinters.swift in Sources */,
418422
05C3949D2B0C11C200156E9F /* SettingsDataStore.swift in Sources */,
419423
05C3948F2B0C08BE00156E9F /* PrinterBox.swift in Sources */,
420424
05C394A52B0C12C600156E9F /* SettingsTextField.swift in Sources */,
@@ -606,7 +610,7 @@
606610
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
607611
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
608612
CODE_SIGN_STYLE = Automatic;
609-
CURRENT_PROJECT_VERSION = 6;
613+
CURRENT_PROJECT_VERSION = 8;
610614
DEVELOPMENT_TEAM = HWDVZ7FBT2;
611615
GENERATE_INFOPLIST_FILE = YES;
612616
INFOPLIST_FILE = PrusaLink/Info.plist;
@@ -620,7 +624,7 @@
620624
"$(inherited)",
621625
"@executable_path/Frameworks",
622626
);
623-
MARKETING_VERSION = 1.0;
627+
MARKETING_VERSION = 1.1;
624628
PRODUCT_BUNDLE_IDENTIFIER = com.geoh2os8295.PrusaLink;
625629
PRODUCT_NAME = "$(TARGET_NAME)";
626630
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -635,7 +639,7 @@
635639
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
636640
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
637641
CODE_SIGN_STYLE = Automatic;
638-
CURRENT_PROJECT_VERSION = 6;
642+
CURRENT_PROJECT_VERSION = 8;
639643
DEVELOPMENT_TEAM = HWDVZ7FBT2;
640644
GENERATE_INFOPLIST_FILE = YES;
641645
INFOPLIST_FILE = PrusaLink/Info.plist;
@@ -649,7 +653,7 @@
649653
"$(inherited)",
650654
"@executable_path/Frameworks",
651655
);
652-
MARKETING_VERSION = 1.0;
656+
MARKETING_VERSION = 1.1;
653657
PRODUCT_BUNDLE_IDENTIFIER = com.geoh2os8295.PrusaLink;
654658
PRODUCT_NAME = "$(TARGET_NAME)";
655659
SWIFT_EMIT_LOC_STRINGS = YES;

PrusaLink/InfoView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct InfoView: View {
2828
.bold()
2929
HStack(alignment: .firstTextBaseline) {
3030
Text("1.")
31-
Text("Load the PrusaLink web app from your printer at the provided IP Address.")
31+
Text("Load the PrusaLink web app from your printer at the provided IP Address. (Multiple printers are supported.)")
3232
}
3333
HStack(alignment: .firstTextBaseline) {
3434
Text("2.")
@@ -39,7 +39,7 @@ struct InfoView: View {
3939
Text("Why is that useful?")
4040
.font(.system(.title3))
4141
.bold()
42-
Text("As of the release date of version \(Bundle.main.getAppVersion()) of this app, due to an unknown issue, you can't view PrusaLink with Safari on iOS. It will keep asking for the credentials but never load the webpage.")
42+
Text("As of the release date of version \(Bundle.main.getAppVersion()) of this app, due to an issue, you can't view PrusaLink with Safari on iOS. It will keep asking for the credentials but never load the webpage.")
4343
Text("It is also kind of nice to have a dedicated app for viewing your printer's status...well I think it is anyway. 😁")
4444
}
4545
Text("If you have any issues or questions, please visit the link above.")

PrusaLink/PrusaLinkApp.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ struct PrusaLinkApp: App {
1919
self.settingsDataStore = settingsDataStore
2020
let settings = settingsDataStore.loadSettings()
2121
_settings = StateObject(wrappedValue: settings)
22-
if let selectedPrinterID = settings.selectedPrinterID {
22+
if let selectedPrinterID = settings.selectedPrinterID,
23+
settings.printers.contains(where: { $0.id == selectedPrinterID }) {
2324
_navigationViews = State(wrappedValue: [.webView(selectedPrinterID)])
2425
}
2526
}

PrusaLink/Utils/TestPrinters.swift

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
//
2+
// TestPrinters.swift
3+
// PrusaLink
4+
//
5+
// Created by George Waters on 11/21/23.
6+
//
7+
8+
import Foundation
9+
10+
struct TestPrinters {
11+
let printers: [Printer]
12+
13+
static var `default` = TestPrinters(printers: [
14+
Printer(
15+
id: .init(),
16+
name: "MK4",
17+
imageType: .generic,
18+
genericImageColor: Printer.ColorData.defaultColor,
19+
customImageData: nil,
20+
ipAddress: "192.168.1.95",
21+
username: "maker",
22+
password: "helloworld"
23+
),
24+
Printer(
25+
id: .init(),
26+
name: "MINI",
27+
imageType: .generic,
28+
genericImageColor: Printer.ColorData(h: 59/360, s: 0.53, b: 1),
29+
customImageData: nil,
30+
ipAddress: "192.168.1.95",
31+
username: "maker",
32+
password: "helloworld"
33+
),
34+
Printer(
35+
id: .init(),
36+
name: "XL",
37+
imageType: .generic,
38+
genericImageColor: Printer.ColorData(h: 195/360, s: 0.55, b: 1),
39+
customImageData: nil,
40+
ipAddress: "192.168.1.95",
41+
username: "maker",
42+
password: "helloworld"
43+
),
44+
Printer(
45+
id: .init(),
46+
name: "Top Secret",
47+
imageType: .generic,
48+
genericImageColor: Printer.ColorData(h: 280/360, s: 0.61, b: 0.96),
49+
customImageData: nil,
50+
ipAddress: "192.168.1.95",
51+
username: "maker",
52+
password: "helloworld"
53+
),
54+
Printer(
55+
id: .init(),
56+
name: "Printer 5",
57+
imageType: .generic,
58+
genericImageColor: Printer.ColorData(h: 113/360, s: 0.47, b: 0.82),
59+
customImageData: nil,
60+
ipAddress: "192.168.1.95",
61+
username: "maker",
62+
password: "helloworld"
63+
)
64+
])
65+
}

0 commit comments

Comments
 (0)