Initial commit, first views

This commit is contained in:
Patrick Müller 2023-01-12 23:07:37 +01:00
parent 830cb8785a
commit f87c712e41
19 changed files with 319 additions and 78 deletions

View File

@ -7,14 +7,20 @@
objects = {
/* Begin PBXBuildFile section */
344B1BB92970B4680047A1FF /* Localizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 344B1BB82970B4680047A1FF /* Localizer.swift */; };
344B1BBC2970B4E00047A1FF /* General.strings in Resources */ = {isa = PBXBuildFile; fileRef = 344B1BBE2970B4E00047A1FF /* General.strings */; };
349639EB297061D6002B1FB8 /* FirebonkApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 349639EA297061D6002B1FB8 /* FirebonkApp.swift */; };
349639ED297061D6002B1FB8 /* FirebonkDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = 349639EC297061D6002B1FB8 /* FirebonkDocument.swift */; };
349639EF297061D6002B1FB8 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 349639EE297061D6002B1FB8 /* ContentView.swift */; };
349639F1297061D7002B1FB8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 349639F0297061D7002B1FB8 /* Assets.xcassets */; };
349639F6297061D7002B1FB8 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 349639F5297061D7002B1FB8 /* Preview Assets.xcassets */; };
34963A00297061D8002B1FB8 /* FirebonkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 349639FF297061D8002B1FB8 /* FirebonkTests.swift */; };
34963A0A297061D8002B1FB8 /* FirebonkUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34963A09297061D8002B1FB8 /* FirebonkUITests.swift */; };
34963A0C297061D8002B1FB8 /* FirebonkUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34963A0B297061D8002B1FB8 /* FirebonkUITestsLaunchTests.swift */; };
34963A1A297062E7002B1FB8 /* Dashboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34963A19297062E7002B1FB8 /* Dashboard.swift */; };
34963A1C297062F2002B1FB8 /* People.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34963A1B297062F2002B1FB8 /* People.swift */; };
34963A1E297062FA002B1FB8 /* Spaces.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34963A1D297062FA002B1FB8 /* Spaces.swift */; };
34963A2029706305002B1FB8 /* Profile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34963A1F29706305002B1FB8 /* Profile.swift */; };
34963A24297063F8002B1FB8 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 34963A26297063F8002B1FB8 /* Localizable.strings */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -35,9 +41,11 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
344B1BB82970B4680047A1FF /* Localizer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Localizer.swift; sourceTree = "<group>"; };
344B1BBD2970B4E00047A1FF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/General.strings; sourceTree = "<group>"; };
344B1BBF2970B4E30047A1FF /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/General.strings; sourceTree = "<group>"; };
349639E7297061D6002B1FB8 /* Firebonk.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Firebonk.app; sourceTree = BUILT_PRODUCTS_DIR; };
349639EA297061D6002B1FB8 /* FirebonkApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebonkApp.swift; sourceTree = "<group>"; };
349639EC297061D6002B1FB8 /* FirebonkDocument.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebonkDocument.swift; sourceTree = "<group>"; };
349639EE297061D6002B1FB8 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
349639F0297061D7002B1FB8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
349639F2297061D7002B1FB8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@ -48,6 +56,12 @@
34963A05297061D8002B1FB8 /* FirebonkUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FirebonkUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
34963A09297061D8002B1FB8 /* FirebonkUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebonkUITests.swift; sourceTree = "<group>"; };
34963A0B297061D8002B1FB8 /* FirebonkUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebonkUITestsLaunchTests.swift; sourceTree = "<group>"; };
34963A19297062E7002B1FB8 /* Dashboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dashboard.swift; sourceTree = "<group>"; };
34963A1B297062F2002B1FB8 /* People.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = People.swift; sourceTree = "<group>"; };
34963A1D297062FA002B1FB8 /* Spaces.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Spaces.swift; sourceTree = "<group>"; };
34963A1F29706305002B1FB8 /* Profile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Profile.swift; sourceTree = "<group>"; };
34963A25297063F8002B1FB8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
34963A272970642A002B1FB8 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -75,6 +89,21 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
344B1BC02970BA6F0047A1FF /* Utils */ = {
isa = PBXGroup;
children = (
344B1BC12970BA790047A1FF /* API */,
);
path = Utils;
sourceTree = "<group>";
};
344B1BC12970BA790047A1FF /* API */ = {
isa = PBXGroup;
children = (
);
path = API;
sourceTree = "<group>";
};
349639DE297061D6002B1FB8 = {
isa = PBXGroup;
children = (
@ -98,12 +127,11 @@
349639E9297061D6002B1FB8 /* Firebonk */ = {
isa = PBXGroup;
children = (
349639EA297061D6002B1FB8 /* FirebonkApp.swift */,
349639EC297061D6002B1FB8 /* FirebonkDocument.swift */,
349639EE297061D6002B1FB8 /* ContentView.swift */,
349639F0297061D7002B1FB8 /* Assets.xcassets */,
349639F2297061D7002B1FB8 /* Info.plist */,
349639F3297061D7002B1FB8 /* Firebonk.entitlements */,
344B1BC02970BA6F0047A1FF /* Utils */,
34963A28297064D2002B1FB8 /* App */,
34963A2929706503002B1FB8 /* Views */,
34963A2A29706510002B1FB8 /* SupportingFiles */,
34963A2129706390002B1FB8 /* i18n */,
349639F4297061D7002B1FB8 /* Preview Content */,
);
path = Firebonk;
@ -134,6 +162,54 @@
path = FirebonkUITests;
sourceTree = "<group>";
};
34963A18297062B5002B1FB8 /* Tabs */ = {
isa = PBXGroup;
children = (
34963A19297062E7002B1FB8 /* Dashboard.swift */,
34963A1B297062F2002B1FB8 /* People.swift */,
34963A1D297062FA002B1FB8 /* Spaces.swift */,
34963A1F29706305002B1FB8 /* Profile.swift */,
);
path = Tabs;
sourceTree = "<group>";
};
34963A2129706390002B1FB8 /* i18n */ = {
isa = PBXGroup;
children = (
344B1BB82970B4680047A1FF /* Localizer.swift */,
34963A26297063F8002B1FB8 /* Localizable.strings */,
344B1BBE2970B4E00047A1FF /* General.strings */,
);
path = i18n;
sourceTree = "<group>";
};
34963A28297064D2002B1FB8 /* App */ = {
isa = PBXGroup;
children = (
349639EA297061D6002B1FB8 /* FirebonkApp.swift */,
349639EE297061D6002B1FB8 /* ContentView.swift */,
);
path = App;
sourceTree = "<group>";
};
34963A2929706503002B1FB8 /* Views */ = {
isa = PBXGroup;
children = (
34963A18297062B5002B1FB8 /* Tabs */,
);
path = Views;
sourceTree = "<group>";
};
34963A2A29706510002B1FB8 /* SupportingFiles */ = {
isa = PBXGroup;
children = (
349639F0297061D7002B1FB8 /* Assets.xcassets */,
349639F3297061D7002B1FB8 /* Firebonk.entitlements */,
349639F2297061D7002B1FB8 /* Info.plist */,
);
path = SupportingFiles;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@ -220,6 +296,7 @@
knownRegions = (
en,
Base,
de,
);
mainGroup = 349639DE297061D6002B1FB8;
productRefGroup = 349639E8297061D6002B1FB8 /* Products */;
@ -239,6 +316,8 @@
buildActionMask = 2147483647;
files = (
349639F6297061D7002B1FB8 /* Preview Assets.xcassets in Resources */,
344B1BBC2970B4E00047A1FF /* General.strings in Resources */,
34963A24297063F8002B1FB8 /* Localizable.strings in Resources */,
349639F1297061D7002B1FB8 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -264,9 +343,13 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
349639ED297061D6002B1FB8 /* FirebonkDocument.swift in Sources */,
349639EB297061D6002B1FB8 /* FirebonkApp.swift in Sources */,
34963A1A297062E7002B1FB8 /* Dashboard.swift in Sources */,
34963A2029706305002B1FB8 /* Profile.swift in Sources */,
349639EF297061D6002B1FB8 /* ContentView.swift in Sources */,
34963A1E297062FA002B1FB8 /* Spaces.swift in Sources */,
344B1BB92970B4680047A1FF /* Localizer.swift in Sources */,
34963A1C297062F2002B1FB8 /* People.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -302,11 +385,33 @@
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
344B1BBE2970B4E00047A1FF /* General.strings */ = {
isa = PBXVariantGroup;
children = (
344B1BBD2970B4E00047A1FF /* en */,
344B1BBF2970B4E30047A1FF /* de */,
);
name = General.strings;
sourceTree = "<group>";
};
34963A26297063F8002B1FB8 /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
34963A25297063F8002B1FB8 /* en */,
34963A272970642A002B1FB8 /* de */,
);
name = Localizable.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
34963A0D297061D8002B1FB8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
@ -365,6 +470,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
@ -417,7 +523,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Firebonk/Firebonk.entitlements;
CODE_SIGN_ENTITLEMENTS = Firebonk/SupportingFiles/Firebonk.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Firebonk/Preview Content\"";
@ -425,7 +531,7 @@
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Firebonk/Info.plist;
INFOPLIST_FILE = Firebonk/SupportingFiles/Info.plist;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
@ -443,7 +549,7 @@
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.1;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = de.plutodev.apps.Firebonk;
PRODUCT_BUNDLE_IDENTIFIER = de.plutodev.apps.firebonk;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
@ -458,7 +564,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Firebonk/Firebonk.entitlements;
CODE_SIGN_ENTITLEMENTS = Firebonk/SupportingFiles/Firebonk.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Firebonk/Preview Content\"";
@ -466,7 +572,7 @@
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Firebonk/Info.plist;
INFOPLIST_FILE = Firebonk/SupportingFiles/Info.plist;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
@ -484,7 +590,7 @@
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.1;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = de.plutodev.apps.Firebonk;
PRODUCT_BUNDLE_IDENTIFIER = de.plutodev.apps.firebonk;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = auto;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";

View File

@ -0,0 +1,41 @@
//
// ContentView.swift
// Firebonk
//
// Created by Patrick Müller on 12.01.23.
//
import SwiftUI
struct ContentView: View {
var body: some View {
TabView {
Dashboard()
// Badge can show e.g. number of notifications or new posts
//.badge(2)
.tabItem {
Label("dashboard".localized(tableName: "General"), systemImage: "house.fill")
}
People()
.tabItem {
Label("people".localized(tableName: "General"), systemImage: "person.3.fill")
}
Spaces()
.tabItem {
Label("spaces".localized(tableName: "General"), systemImage: "circle.circle")
}
Profile()
.tabItem{
Label("profile".localized(tableName: "General"), systemImage: "person")
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
.preferredColorScheme(.dark)
}
}

View File

@ -10,8 +10,8 @@ import SwiftUI
@main
struct FirebonkApp: App {
var body: some Scene {
DocumentGroup(newDocument: FirebonkDocument()) { file in
ContentView(document: file.$document)
WindowGroup {
ContentView()
}
}
}

View File

@ -1,22 +0,0 @@
//
// ContentView.swift
// Firebonk
//
// Created by Patrick Müller on 12.01.23.
//
import SwiftUI
struct ContentView: View {
@Binding var document: FirebonkDocument
var body: some View {
TextEditor(text: $document.text)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView(document: .constant(FirebonkDocument()))
}
}

View File

@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>com.example.plain-text</string>
</array>
<key>NSUbiquitousDocumentUserActivityType</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).example-document</string>
</dict>
</array>
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.plain-text</string>
</array>
<key>UTTypeDescription</key>
<string>Example Text</string>
<key>UTTypeIdentifier</key>
<string>com.example.plain-text</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>exampletext</string>
</array>
</dict>
</dict>
</array>
</dict>
</plist>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>

View File

@ -0,0 +1,20 @@
//
// Dashboard.swift
// Firebonk
//
// Created by Patrick Müller on 12.01.23.
//
import SwiftUI
struct Dashboard: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}
struct Dashboard_Previews: PreviewProvider {
static var previews: some View {
Dashboard()
}
}

View File

@ -0,0 +1,20 @@
//
// People.swift
// Firebonk
//
// Created by Patrick Müller on 12.01.23.
//
import SwiftUI
struct People: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}
struct People_Previews: PreviewProvider {
static var previews: some View {
People()
}
}

View File

@ -0,0 +1,20 @@
//
// Profile.swift
// Firebonk
//
// Created by Patrick Müller on 12.01.23.
//
import SwiftUI
struct Profile: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}
struct Profile_Previews: PreviewProvider {
static var previews: some View {
Profile()
}
}

View File

@ -0,0 +1,20 @@
//
// Spaces.swift
// Firebonk
//
// Created by Patrick Müller on 12.01.23.
//
import SwiftUI
struct Spaces: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}
struct Spaces_Previews: PreviewProvider {
static var previews: some View {
Spaces()
}
}

View File

@ -0,0 +1,30 @@
//
// Localizer.swift
// Firebonk
//
// Created by Patrick Müller on 12.01.23.
//
import Foundation
private class Localizer {
static let sharedInstance = Localizer()
func localize(string: String, tableName: String, plural: Bool) -> String {
var localizedString: String
if plural{
localizedString = NSLocalizedString(string, tableName: tableName, value:"**\(self)**", comment: "plural")
}else{
localizedString = NSLocalizedString(string, tableName: tableName, value:"**\(self)**", comment: "")
}
return localizedString
}
}
extension String {
func localized(tableName: String = "Localizable", plural: Bool = false) -> String {
return Localizer.sharedInstance.localize(string: self, tableName: tableName, plural: plural)
}
}

View File

@ -0,0 +1,13 @@
/*
General.strings
Firebonk
Created by Patrick Müller on 12.01.23.
*/
/* Tab Names */
"dashboard" = "Dashboard";
"people" = "Personen";
"spaces" = "Spaces";
"profile" = "Profil";

View File

@ -0,0 +1,7 @@
/*
Localizable.strings
Firebonk
Created by Patrick Müller on 12.01.23.
*/

View File

@ -0,0 +1,13 @@
/*
General.strings
Firebonk
Created by Patrick Müller on 12.01.23.
*/
/* Tab Names */
"dashboard" = "Dashboard";
"people" = "People";
"spaces" = "Spaces";
"profile" = "Profile";

View File

@ -0,0 +1,7 @@
/*
Localizable.strings
Firebonk
Created by Patrick Müller on 12.01.23.
*/