-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAmanApp.swift
More file actions
69 lines (59 loc) · 1.83 KB
/
Copy pathAmanApp.swift
File metadata and controls
69 lines (59 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//
// [AmanApp].swift
// Aman - [Aman]
//
// Created by Aman Team on [08/11/25].
//
import SwiftUI
import AppKit
@main
struct AmanApp: App {
enum WindowID: String {
case landing = "landing-selector"
case osSecurity = "os-security"
case networkSecurity = "network-security"
case networkTopology = "network-topology"
case about = "about-aman-window"
}
var body: some Scene {
WindowGroup("Aman", id: WindowID.landing.rawValue) {
LandingSelectorView()
}
.windowStyle(.hiddenTitleBar)
.defaultPosition(.center)
.commands {
SidebarCommands()
CommandGroup(replacing: .appInfo) {
OpenAboutCommand()
}
}
WindowGroup("OS Security", id: WindowID.osSecurity.rawValue) {
ContentView()
.frame(minWidth: 1115, maxWidth: .infinity, minHeight: 615, maxHeight: .infinity)
}
.defaultPosition(.center)
WindowGroup("Network Security", id: WindowID.networkSecurity.rawValue) {
NetworkSecurityView()
}
.defaultPosition(.center)
Window("Network Topology", id: WindowID.networkTopology.rawValue) {
NetworkTopologyWindowView(coordinator: NetworkMappingCoordinator.shared)
}
.defaultPosition(.center)
.windowResizability(.contentSize)
Window("About Aman", id: WindowID.about.rawValue) {
AboutView()
.frame(width: 484, height: 444)
}
.defaultPosition(.center)
.windowResizability(.contentSize)
}
}
private struct OpenAboutCommand: View {
@Environment(\.openWindow) private var openWindow
var body: some View {
Button("About Aman") {
openWindow(id: AmanApp.WindowID.about.rawValue)
}
}
}