short-menu/shortmenu/shortmenuApp.swift
2023-07-06 18:56:33 +02:00

33 lines
696 B
Swift

//
// shortmenuApp.swift
// shortmenu
//
// Created by Louis Gallet on 06/07/2023.
//
import SwiftUI
@main
struct shortmenuApp: App {
@State private var apiKey = ""
@State private var isAPIKeyWindowVisible = false
var body: some Scene {
MenuBarExtra("ShortApp", systemImage: "link.circle.fill") {
Button("ShortURL") {
print("clicked!")
}
.keyboardShortcut("S")
Button("Define API Key") {
isAPIKeyWindowVisible = true
}
Divider()
Button("Quit") {
NSApplication.shared.terminate(nil)
}.keyboardShortcut("q")
}
}
}