33 lines
696 B
Swift
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")
|
|
}
|
|
}
|
|
}
|