[App] basic menu bar layout UI (#2)
This PR contains the work done to implement a very basic menu bar UI layout where to build the app. In addition, the .gitignore and the README file have been added to the project. Reviewed-on: #2 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit is contained in:
parent
f8a9667ee0
commit
40535054f3
57
.gitignore
vendored
Normal file
57
.gitignore
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
### macOS ###
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
### macOS Patch ###
|
||||
# iCloud generated files
|
||||
*.icloud
|
||||
|
||||
### Swift ###
|
||||
# Xcode
|
||||
|
||||
## User settings
|
||||
xcuserdata/
|
||||
|
||||
## Obj-C/Swift specific
|
||||
*.hmap
|
||||
|
||||
## App packaging
|
||||
*.ipa
|
||||
*.dSYM.zip
|
||||
*.dSYM
|
||||
|
||||
## Playgrounds
|
||||
timeline.xctimeline
|
||||
playground.xcworkspace
|
||||
|
||||
# Swift Package Manager
|
||||
Packages/
|
||||
Package.resolved
|
||||
*.xcodeproj
|
||||
.swiftpm
|
||||
.build/
|
@ -54,11 +54,21 @@
|
||||
);
|
||||
target = 46D4BEE12CB07CB600FCFB84 /* UITests */;
|
||||
};
|
||||
46D4BF532CB08A9500FCFB84 /* Exceptions for "Piper" folder in "Piper" target */ = {
|
||||
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
||||
membershipExceptions = (
|
||||
Resources/Plists/Info.plist,
|
||||
);
|
||||
target = 46D4BE762CB06ED300FCFB84 /* Piper */;
|
||||
};
|
||||
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
|
||||
|
||||
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
||||
46D4BE792CB06ED300FCFB84 /* Piper */ = {
|
||||
isa = PBXFileSystemSynchronizedRootGroup;
|
||||
exceptions = (
|
||||
46D4BF532CB08A9500FCFB84 /* Exceptions for "Piper" folder in "Piper" target */,
|
||||
);
|
||||
path = Piper;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@ -424,8 +434,10 @@
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = Piper/Resources/Plists/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = Piper;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
||||
INFOPLIST_KEY_LSUIElement = YES;
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -454,8 +466,10 @@
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = Piper/Resources/Plists/Info.plist;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = Piper;
|
||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
||||
INFOPLIST_KEY_LSUIElement = YES;
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
5
Piper/Resources/Plists/Info.plist
Normal file
5
Piper/Resources/Plists/Info.plist
Normal 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>
|
@ -11,6 +11,9 @@ import SwiftData
|
||||
|
||||
@main
|
||||
struct PiperApp: App {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
var sharedModelContainer: ModelContainer = {
|
||||
let schema = Schema([
|
||||
Item.self,
|
||||
@ -24,10 +27,28 @@ struct PiperApp: App {
|
||||
}
|
||||
}()
|
||||
|
||||
// MARK: Body
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView()
|
||||
}
|
||||
.modelContainer(sharedModelContainer)
|
||||
MenuBarExtra {
|
||||
VStack(alignment: .leading) {
|
||||
Text("Some text goes here...")
|
||||
.foregroundStyle(.primary)
|
||||
|
||||
Divider()
|
||||
|
||||
Button {
|
||||
// ...
|
||||
} label: {
|
||||
Text("Some text goes here...")
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
} label: {
|
||||
Image(systemName: "circle.fill")
|
||||
}
|
||||
.menuBarExtraStyle(.window)
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user