Skip to content

Commit 107f5b5

Browse files
committed
Bump needed macOS v12 and add OnBoardingView.swift MIT licensed from @pixelspark/sushitrain
1 parent 0a935cc commit 107f5b5

File tree

5 files changed

+132
-4
lines changed

5 files changed

+132
-4
lines changed

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
* Jerry Jacobs ([@xor-gate](https://github.com/xor-gate))
22
* Victor Babenko ([@virusman](https://github.com/virusman))
33
* Jakob Borg ([@calmh](https://github.com/calmh))
4+
* Tommy van der Vorst ([@pixelspark](https://github.com/pixelspark))

Pods/Pods.xcodeproj/xcuserdata/jerry.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

syncthing.xcodeproj/project.pbxproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
C4A415681D0D579D00DC6018 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C4A415671D0D579D00DC6018 /* main.m */; };
3636
C4A4156A1D0D579D00DC6018 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C4A415691D0D579D00DC6018 /* Assets.xcassets */; };
3737
C4A4156D1D0D579D00DC6018 /* STApplication.xib in Resources */ = {isa = PBXBuildFile; fileRef = C4A4156B1D0D579D00DC6018 /* STApplication.xib */; };
38+
C4D434FE2E5CFF3600B91C7F /* OnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4D434FD2E5CFF3600B91C7F /* OnboardingView.swift */; };
3839
C4F0E82E1DA1B9CF00435310 /* STPreferencesWindowGeneralViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C4F0E82C1DA1B9CF00435310 /* STPreferencesWindowGeneralViewController.m */; };
3940
C4F0E82F1DA1B9CF00435310 /* STPreferencesWindowGeneralView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C4F0E82D1DA1B9CF00435310 /* STPreferencesWindowGeneralView.xib */; };
4041
C4FFB0661D0D7F870015D14A /* XGSyncthing.m in Sources */ = {isa = PBXBuildFile; fileRef = C4FFB0641D0D7E4C0015D14A /* XGSyncthing.m */; };
@@ -92,6 +93,7 @@
9293
C4A415691D0D579D00DC6018 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
9394
C4A4156C1D0D579D00DC6018 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/STApplication.xib; sourceTree = "<group>"; };
9495
C4A4156E1D0D579D00DC6018 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
96+
C4D434FD2E5CFF3600B91C7F /* OnboardingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = OnboardingView.swift; path = UI/OnboardingView.swift; sourceTree = "<group>"; };
9597
C4D6DD581D0D93D80024D20A /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
9698
C4D896121D0DF90900D42F73 /* syncthing-resource.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "syncthing-resource.sh"; path = "syncthing/Scripts/syncthing-resource.sh"; sourceTree = "<group>"; };
9799
C4F0E82B1DA1B9CF00435310 /* STPreferencesWindowGeneralViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STPreferencesWindowGeneralViewController.h; sourceTree = "<group>"; };
@@ -228,6 +230,7 @@
228230
C4D6DD601D0DB18A0024D20A /* UI */ = {
229231
isa = PBXGroup;
230232
children = (
233+
C4D434FD2E5CFF3600B91C7F /* OnboardingView.swift */,
231234
C4A4156B1D0D579D00DC6018 /* STApplication.xib */,
232235
C4946B001D5877F2008447A2 /* STAboutWindow.xib */,
233236
C4460A821D0DD38F00200C21 /* STPreferencesWindow.xib */,
@@ -405,6 +408,7 @@
405408
C4460A801D0DD2D500200C21 /* STPreferencesWindowController.m in Sources */,
406409
C4F0E82E1DA1B9CF00435310 /* STPreferencesWindowGeneralViewController.m in Sources */,
407410
C4A415651D0D579D00DC6018 /* STApplication.m in Sources */,
411+
C4D434FE2E5CFF3600B91C7F /* OnboardingView.swift in Sources */,
408412
);
409413
runOnlyForDeploymentPostprocessing = 0;
410414
};
@@ -574,7 +578,7 @@
574578
);
575579
INFOPLIST_FILE = syncthing/Info.plist;
576580
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
577-
MACOSX_DEPLOYMENT_TARGET = 10.13;
581+
MACOSX_DEPLOYMENT_TARGET = 12.4;
578582
PRODUCT_BUNDLE_IDENTIFIER = "com.github.xor-gate.syncthing-macosx";
579583
PRODUCT_NAME = Syncthing;
580584
PROVISIONING_PROFILE = "";
@@ -605,7 +609,7 @@
605609
);
606610
INFOPLIST_FILE = syncthing/Info.plist;
607611
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
608-
MACOSX_DEPLOYMENT_TARGET = 10.13;
612+
MACOSX_DEPLOYMENT_TARGET = 12.4;
609613
PRODUCT_BUNDLE_IDENTIFIER = "com.github.xor-gate.syncthing-macosx";
610614
PRODUCT_NAME = Syncthing;
611615
PROVISIONING_PROFILE = "";
Binary file not shown.

syncthing/UI/OnboardingView.swift

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
// The MIT License (MIT)
2+
//
3+
// Copyright (C) 2024-2025 Tommy van der Vorst
4+
// Copyright (C) 2026 The syncthing-macos Authors. All rights reserved.
5+
//
6+
// Permission is hereby granted, free of charge, to any person obtaining a copy
7+
// of this software and associated documentation files (the "Software"), to deal
8+
// in the Software without restriction, including without limitation the rights
9+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
// copies of the Software, and to permit persons to whom the Software is
11+
// furnished to do so, subject to the following conditions:
12+
13+
// The above copyright notice and this permission notice shall be included in all
14+
// copies or substantial portions of the Software.
15+
16+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
// SOFTWARE.
23+
import Foundation
24+
import SwiftUI
25+
26+
struct FeatureView: View {
27+
var image: String
28+
var title: String
29+
var description: String
30+
31+
var body: some View {
32+
HStack(alignment: .top, spacing: 15) {
33+
Image(systemName: image).foregroundColor(.accentColor)
34+
.font(.system(size: 38, weight: .light))
35+
VStack(alignment: .leading, spacing: 5) {
36+
Text(self.title).bold()
37+
Text(self.description)
38+
Spacer()
39+
}
40+
}
41+
}
42+
}
43+
44+
struct OnboardingView: View {
45+
@Environment(\.dismiss) private var dismiss
46+
47+
var body: some View {
48+
ScrollView(.vertical) {
49+
VStack(alignment: .leading, spacing: 20) {
50+
self.title
51+
52+
HStack(alignment: .center) {
53+
Text("Synchronize your files securely with your other devices.")
54+
.bold()
55+
.multilineTextAlignment(.leading)
56+
.fixedSize(horizontal: false, vertical: true)
57+
}.frame(
58+
minWidth: 0,
59+
minHeight: 0,
60+
maxHeight: .infinity,
61+
alignment: .topLeading
62+
)
63+
64+
Text("Before we start, we need to go over a few things:").multilineTextAlignment(
65+
.leading)
66+
67+
FeatureView(
68+
image: "bolt.horizontal.circle",
69+
title: String(localized: "Synchronization is not back-up"),
70+
description: String(
71+
localized:
72+
"When you synchronize files, all changes, including deleting files, also happen on your other devices. Do not use Syncthing for back-up purposes, and always keep a back-up of your data."
73+
))
74+
75+
FeatureView(
76+
image: "hand.raised.circle",
77+
title: String(localized: "Your devices, your data, your responsibility"),
78+
description: String(
79+
localized:
80+
"You decide with which devices you share which files. Syncthing is a selfhosted secure Peer-to-peer app without a central server or cloud service. This also means the app makers cannot help you access or recover any lost files."
81+
)
82+
)
83+
84+
FeatureView(
85+
image: "gear.circle",
86+
title: String(localized: "Powered by Syncthing"),
87+
description: String(
88+
localized:
89+
"This app is powered by the official Open source Syncthing."
90+
)
91+
)
92+
93+
self.footer.padding(.bottom).padding(10)
94+
95+
}.padding(.all).padding(20)
96+
}
97+
}
98+
99+
var title: some View {
100+
Text(
101+
"Welcome to Syncthing for macOS!"
102+
)
103+
.font(.largeTitle.bold())
104+
.multilineTextAlignment(.center)
105+
}
106+
107+
var footer: some View {
108+
Color.blue
109+
.frame(
110+
minHeight: 48, maxHeight: .infinity
111+
)
112+
.cornerRadius(9.0)
113+
.overlay(alignment: .center) {
114+
Text("I understand, let's get started!").bold().foregroundColor(.white)
115+
}.onTapGesture {
116+
self.dismiss()
117+
}
118+
}
119+
}
120+
121+
#Preview {
122+
OnboardingView()
123+
}

0 commit comments

Comments
 (0)