[App] basic menu bar layout UI #2

Merged
javier merged 6 commits from app/menu-bar-ui into main 2024-10-04 22:18:56 +00:00
5 changed files with 101 additions and 3 deletions

57
.gitignore vendored Normal file
View 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/

View File

@ -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)",

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

@ -11,6 +11,9 @@ import SwiftData
@main
struct PiperApp: App {
// MARK: Properties
var sharedModelContainer: ModelContainer = {
let schema = Schema([
Item.self,
@ -23,11 +26,29 @@ struct PiperApp: App {
fatalError("Could not create ModelContainer: \(error)")
}
}()
// MARK: Body
var body: some Scene {
WindowGroup {
ContentView()
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")
}
.modelContainer(sharedModelContainer)
.menuBarExtraStyle(.window)
}
}

1
README.md Normal file
View File

@ -0,0 +1 @@
# Piper