feat(macos): UI overhaul -- toolbar, unified log, PM windows, settings window, hotkeys
Mirrors the Windows client's UI overhaul (commit97fa659+540ec13) adapted to Mac-native conventions. The main window is now just toolbar + channels + users + chat; audio device settings moved to a modeless Settings window. - NSToolbar: Join Voice, Share Screen Audio, Mute, Deafen (SF Symbol toggle buttons) + Output Volume slider (NSSlider 0-100, default 80). Voice actions, mute/deafen, and output volume moved out of the bottom panel into the toolbar - Audio device settings (input mode, VAD sensitivity, PTT key, device picker, level meter) moved to a new SettingsWindowController -- a modeless window opened via the app menu's "Settings..." (Cmd+,) item. Source-of-truth for audio state lives in MainWindowController so voice start applies settings even before the window has been opened; SettingsWindowController reads from / writes back to those properties and applies changes live when voice is active. Level meter forwarded from handleLevel -> updateLevel(rms:) - Unified log: chat NSTextView + activity NSTableView collapsed into a single NSTextView -- activity events in secondaryLabelColor (gray), chat in default - Private messaging: scope dropdown removed; compose always sends to the current channel. Each PM conversation opens in its own modeless PrivateMessageWindowController. Incoming .textMessage with .private scope routed to the right window; outgoing PMs echoed by server arrive through the same path. "Send Private Message..." added to user context menu. - Messages menu: "New Private Message..." (Cmd+Shift+N) opens a UserPickerSheet listing all server users so you can PM anyone on the server - Channel tree now shows live user counts, e.g. "General (3)"; refreshChannelTree called on .userJoined/.userLeft (was missing) - Voice menu: Join Voice (Cmd+Shift+V), Share Screen Audio (Cmd+Shift+S), Mute (Cmd+Shift+M), Deafen (Cmd+Shift+D) -- NSMenuItem key equivalents with [.command, .shift] mask, dispatched by the responder chain - setOutputVolume(_:) wrapper added to VoiceCatClient.swift (was missing -- the C ABI + C# wrapper shipped in commit97fa659but the Swift wrapper was never added); wired end-to-end: toolbar slider -> client.setOutputVolume(gain) Part A -- fixed and verified the previously-uncompiled Swift from the external PCM feed/tap commit (615d2a8): - Rebuilt the macOS xcframework slice (regenerated the module map from current voicecat.h, exposing vc_pcm_sink_cb / vc_stream_feed_pcm / vc_set_pcm_sink) - Fixed feedPcm type bug: size_t imports as Int in Swift not UInt; the original UInt(samplesPerChannel) was wrong - Added VoiceCatPcmSinkCallback typealias -- a Swift-idiomatic public alias for the C vc_pcm_sink_cb so consumers (tests, the macOS app) can declare a sink callback without directly importing the VoiceCatC C module. Mirrors the C# VcPcmSinkCallback delegate - keyCodeName helper deduplicated (was in PttKeyCaptureSheet.swift + MainWindowController.swift -- now shared) Platform-specific adaptations (vs. Windows): NSToolbar instead of ToolStrip; global menu bar + NSMenuItem key equivalents (Cmd not Ctrl, responder-chain dispatched, no custom key monitor needed); PM windows as modeless NSWindows; picker as Mac sheet; gray = secondaryLabelColor; SF Symbols for toolbar icons. swift test 10/10 (4 ExternalPcmTests + 6 VoiceCatClientSmokeTests against a live server); xcodebuild Debug + Release BUILD SUCCEEDED with 0 Swift warnings.
This commit is contained in:
@@ -27,6 +27,9 @@
|
||||
AAAA00000000000000000041 /* VoiceCatCore in Frameworks */ = {isa = PBXBuildFile; productRef = AAAA00000000000000000027 /* VoiceCatCore */; };
|
||||
AAAA00000000000000000042 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = AAAA00000000000000000013 /* Info.plist */; };
|
||||
AAAA00000000000000000043 /* PttKeyCaptureSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAAA00000000000000000044 /* PttKeyCaptureSheet.swift */; };
|
||||
AAAA00000000000000000046 /* PrivateMessageWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAAA00000000000000000045 /* PrivateMessageWindowController.swift */; };
|
||||
AAAA00000000000000000048 /* UserPickerSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAAA00000000000000000047 /* UserPickerSheet.swift */; };
|
||||
AAAA0000000000000000004A /* SettingsWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAAA00000000000000000049 /* SettingsWindowController.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@@ -50,6 +53,9 @@
|
||||
AAAA00000000000000000023 /* BanUserSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BanUserSheet.swift; sourceTree = "<group>"; };
|
||||
AAAA00000000000000000024 /* PermissionsSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionsSheet.swift; sourceTree = "<group>"; };
|
||||
AAAA00000000000000000044 /* PttKeyCaptureSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PttKeyCaptureSheet.swift; sourceTree = "<group>"; };
|
||||
AAAA00000000000000000045 /* PrivateMessageWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrivateMessageWindowController.swift; sourceTree = "<group>"; };
|
||||
AAAA00000000000000000047 /* UserPickerSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserPickerSheet.swift; sourceTree = "<group>"; };
|
||||
AAAA00000000000000000049 /* SettingsWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsWindowController.swift; sourceTree = "<group>"; };
|
||||
AAAA00000000000000000025 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@@ -103,6 +109,8 @@
|
||||
children = (
|
||||
AAAA00000000000000000019 /* ConnectWindowController.swift */,
|
||||
AAAA0000000000000000001A /* MainWindowController.swift */,
|
||||
AAAA00000000000000000045 /* PrivateMessageWindowController.swift */,
|
||||
AAAA00000000000000000049 /* SettingsWindowController.swift */,
|
||||
);
|
||||
path = Windows;
|
||||
sourceTree = "<group>";
|
||||
@@ -121,6 +129,7 @@
|
||||
AAAA00000000000000000023 /* BanUserSheet.swift */,
|
||||
AAAA00000000000000000024 /* PermissionsSheet.swift */,
|
||||
AAAA00000000000000000044 /* PttKeyCaptureSheet.swift */,
|
||||
AAAA00000000000000000047 /* UserPickerSheet.swift */,
|
||||
);
|
||||
path = Sheets;
|
||||
sourceTree = "<group>";
|
||||
@@ -219,6 +228,9 @@
|
||||
AAAA0000000000000000003E /* BanUserSheet.swift in Sources */,
|
||||
AAAA0000000000000000003F /* PermissionsSheet.swift in Sources */,
|
||||
AAAA00000000000000000043 /* PttKeyCaptureSheet.swift in Sources */,
|
||||
AAAA00000000000000000046 /* PrivateMessageWindowController.swift in Sources */,
|
||||
AAAA00000000000000000048 /* UserPickerSheet.swift in Sources */,
|
||||
AAAA0000000000000000004A /* SettingsWindowController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user