Restore native menu bar icon
This commit is contained in:
parent
a078e8a4ec
commit
2e1d40caad
@ -14,21 +14,9 @@ struct FchatiApp: App {
|
||||
RootView()
|
||||
.background(WindowConfigurator())
|
||||
} label: {
|
||||
MenuBarIcon()
|
||||
}
|
||||
.menuBarExtraStyle(.window)
|
||||
}
|
||||
}
|
||||
|
||||
private struct MenuBarIcon: View {
|
||||
var body: some View {
|
||||
if let url = Bundle.main.url(forResource: "MenuBarIcon", withExtension: "png"),
|
||||
let image = NSImage(contentsOf: url) {
|
||||
Image(nsImage: image)
|
||||
.renderingMode(.original)
|
||||
} else {
|
||||
Image(systemName: "message")
|
||||
}
|
||||
.menuBarExtraStyle(.window)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -200,7 +200,7 @@
|
||||
- The macOS app now has an always-visible quit control beside the top-level tabs, in addition to the existing Settings action.
|
||||
- The macOS app now includes a normal main window and Dock presence while retaining the menu-bar shortcut.
|
||||
- `FchatiApp/Resources/AppIcon.png` and `FchatiApp/Resources/Fchati.icns` provide the bundled Dock and application icon, and the installer copies the icon into the application bundle.
|
||||
- The supplied Teamwork Chat icon now replaces the app icon and provides the custom menu-bar icon from the signed application resources directory.
|
||||
- The supplied Teamwork Chat icon replaces the app icon; the menu bar uses the native monochrome message symbol for visual consistency with macOS.
|
||||
|
||||
## Bug Fixes — Post-Review ✅
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@ INSTALL_PATH="/Applications/Fchati.app"
|
||||
STAGING_DIR="$(mktemp -d "${TMPDIR:-/tmp}/fchati-install.XXXXXX")"
|
||||
STAGING_APP="$STAGING_DIR/Fchati.app"
|
||||
ICON_PATH="$PROJECT_DIR/Resources/Fchati.icns"
|
||||
MENU_BAR_ICON_PATH="$PROJECT_DIR/Resources/MenuBarIcon.png"
|
||||
|
||||
cleanup() {
|
||||
rm -rf "$STAGING_DIR"
|
||||
@ -47,17 +46,11 @@ if [[ ! -x "$EXECUTABLE_PATH" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "$MENU_BAR_ICON_PATH" ]]; then
|
||||
echo "Menu bar icon not found: $MENU_BAR_ICON_PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Creating the application bundle..."
|
||||
mkdir -p "$STAGING_APP/Contents/MacOS" "$STAGING_APP/Contents/Resources"
|
||||
cp "$PROJECT_DIR/Info.plist" "$STAGING_APP/Contents/Info.plist"
|
||||
cp "$EXECUTABLE_PATH" "$STAGING_APP/Contents/MacOS/$PRODUCT_NAME"
|
||||
cp "$ICON_PATH" "$STAGING_APP/Contents/Resources/Fchati.icns"
|
||||
cp "$MENU_BAR_ICON_PATH" "$STAGING_APP/Contents/Resources/MenuBarIcon.png"
|
||||
codesign --force --sign - --timestamp=none --entitlements "$PROJECT_DIR/FchatiApp.entitlements" "$STAGING_APP"
|
||||
|
||||
if [[ -d "$INSTALL_PATH" ]]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user