mirror of
https://github.com/neon443/ShhShell.git
synced 2026-11-30 12:44:51 +00:00
added a snippet picker and it executes a callback when one is selected
added a snippet button to shelltabview fix crash if hostkey changed message shows up and not connected anymore (such as failed auth) cleaned up about view and added a libssh link update bundle.swift to add version and build number getting
This commit is contained in:
6 files changed
+104
-11
No files matched your search
@@ -10,7 +10,7 @@ import SwiftUI
|
||||
|
||||
//app icon
|
||||
extension Bundle {
|
||||
var iconFilename: String? {
|
||||
var appIconFilename: String? {
|
||||
guard let icons = infoDictionary?["CFBundleIcons"] as? [String: Any],
|
||||
let primaryIcon = icons["CFBundlePrimaryIcon"] as? [String: Any],
|
||||
let iconFiles = primaryIcon["CFBundleIconFiles"] as? [String],
|
||||
@@ -23,9 +23,23 @@ extension Bundle {
|
||||
extension UIImage {
|
||||
var appIcon: Image {
|
||||
// let fallback = Image(uiImage: UIImage())
|
||||
// guard let filename = Bundle.main.iconFilename else { return fallback }
|
||||
// guard let filename = Bundle.main.appIconFilename else { return fallback }
|
||||
// guard let uiImage = UIImage(named: filename) else { return fallback }
|
||||
// return uiImage
|
||||
return Image("Icon")
|
||||
}
|
||||
}
|
||||
|
||||
extension Bundle {
|
||||
var appVersion: String {
|
||||
let version = infoDictionary?["CFBundleShortVersionString"] as? String
|
||||
return version ?? "0.0"
|
||||
}
|
||||
}
|
||||
|
||||
extension Bundle {
|
||||
var appBuild: String {
|
||||
let build = infoDictionary?["CFBundleVersion"] as? String
|
||||
return "(" + (build ?? "0") + ")"
|
||||
}
|
||||
}
|
||||