mirror of
https://github.com/neon443/ShhShell.git
synced 2026-11-30 20:54:51 +00:00
Compare commits
8
Commits
c2f7356d3f
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2567680a8f | ||
|
|
04a464945f | ||
|
|
c80634b55c | ||
|
|
7cd0018889 | ||
|
|
abbd8f3a92 | ||
|
|
8f8b91069a | ||
|
|
ccb12351b3 | ||
|
|
bbc63c83a1 |
No files matched your search
@@ -25,7 +25,7 @@
|
||||
|
||||
<div align="center">
|
||||
<a href="https://shipwrecked.hackclub.com/?t=ghrm" target="_blank">
|
||||
<img src="https://hc-cdn.hel1.your-objectstorage.com/s/v3/739361f1d440b17fc9e2f74e49fc185d86cbec14_badge.png"
|
||||
<img src="https://github.com/neon443/AirAP/blob/main/Icon/shipwrecked.png?raw=true"
|
||||
alt="This project is part of Shipwrecked, the world's first hackathon on an island!"
|
||||
style="width: 25%;">
|
||||
</a>
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "[email protected]",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "[email protected]",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "tinted"
|
||||
}
|
||||
],
|
||||
"filename" : "[email protected]",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "ShhShell-light.png",
|
||||
"filename" : "ShhShell-iOS-Default-1024@1x.png",
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
@@ -11,7 +11,7 @@
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"filename" : "ShhShell.png",
|
||||
"filename" : "ShhShell-iOS-Dark-1024@1x.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 733 KiB |
@@ -139,9 +139,11 @@ Hostkey fingerprint is \(handler.getHostkey() ?? "nil")
|
||||
}
|
||||
}
|
||||
|
||||
#if compiler(>=6.2)
|
||||
if #available(iOS 19, *) {
|
||||
ToolbarSpacer()
|
||||
}
|
||||
#endif
|
||||
|
||||
ToolbarItem() {
|
||||
Button() {
|
||||
|
||||
@@ -23,7 +23,6 @@ struct HostSymbolPicker: View {
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Rectangle()
|
||||
.modifier(glassEffectCompat())
|
||||
// .foregroundStyle(cScheme == .dark ? .black : .gray)
|
||||
VStack(alignment: .center, spacing: 0) {
|
||||
ScrollView(.horizontal) {
|
||||
|
||||
@@ -46,24 +46,26 @@ struct KeyDetailView: View {
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
Menu() {
|
||||
ForEach(hostsManager.hostsNotUsing(key: keypair)) { host in
|
||||
Button() {
|
||||
hostsManager.set(keypair: keypair, onHost: host)
|
||||
} label: {
|
||||
host.symbol.image
|
||||
.resizable().scaledToFit()
|
||||
.foregroundStyle(.blue)
|
||||
.frame(width: 20, height: 20)
|
||||
Text(host.description)
|
||||
.foregroundStyle(.blue)
|
||||
if !hostsManager.hosts.isEmpty {
|
||||
Menu() {
|
||||
ForEach(hostsManager.hostsNotUsing(key: keypair)) { host in
|
||||
Button() {
|
||||
hostsManager.set(keypair: keypair, onHost: host)
|
||||
} label: {
|
||||
host.symbol.image
|
||||
.resizable().scaledToFit()
|
||||
.foregroundStyle(.blue)
|
||||
.frame(width: 20, height: 20)
|
||||
Text(host.description)
|
||||
.foregroundStyle(.blue)
|
||||
}
|
||||
}
|
||||
} label: {
|
||||
Image(systemName: "plus.circle.fill")
|
||||
.symbolRenderingMode(.multicolor)
|
||||
Text("Add")
|
||||
.foregroundStyle(.green)
|
||||
}
|
||||
} label: {
|
||||
Image(systemName: "plus.circle.fill")
|
||||
.symbolRenderingMode(.multicolor)
|
||||
Text("Add")
|
||||
.foregroundStyle(.green)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import SwiftUI
|
||||
|
||||
struct KeyImporterView: View {
|
||||
@ObservedObject var keyManager: KeyManager
|
||||
@ObservedObject var hostsManager: HostsManager
|
||||
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
@@ -21,59 +22,75 @@ struct KeyImporterView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
List {
|
||||
TextBox(label: "Name", text: $keyName, prompt: "A name for your key")
|
||||
NavigationStack {
|
||||
List {
|
||||
TextBox(label: "Name", text: $keyName, prompt: "A name for your key")
|
||||
|
||||
HStack {
|
||||
Text("Key Type")
|
||||
Picker("Key type", selection: $keyType) {
|
||||
ForEach(KeyType.allCases, id: \.self) { type in
|
||||
Text(type.description)
|
||||
.tag(type)
|
||||
HStack {
|
||||
Text("Key Type")
|
||||
Picker("Key type", selection: $keyType) {
|
||||
ForEach(KeyType.allCases, id: \.self) { type in
|
||||
Text(type.description)
|
||||
.tag(type)
|
||||
}
|
||||
}
|
||||
.pickerStyle(SegmentedPickerStyle())
|
||||
}
|
||||
|
||||
Section {
|
||||
HStack {
|
||||
Text("Private Key")
|
||||
Spacer()
|
||||
Text("Required")
|
||||
.foregroundStyle(.red)
|
||||
}
|
||||
.listRowSeparator(.hidden)
|
||||
|
||||
TextEditor(text: $privkeyStr)
|
||||
// .background(.gray.opacity(0.5))
|
||||
// .clipShape(RoundedRectangle(cornerRadius: 8))
|
||||
.padding(.bottom, 5)
|
||||
.padding(.horizontal, -8)
|
||||
// .frame(minHeight: 20)
|
||||
|
||||
Button("Paste", systemImage: "doc.on.clipboard.fill") {
|
||||
privkeyStr = UIPasteboard.general.string ?? privkeyStr
|
||||
}
|
||||
}
|
||||
.pickerStyle(SegmentedPickerStyle())
|
||||
}
|
||||
|
||||
Section {
|
||||
HStack {
|
||||
Text("Private Key")
|
||||
Spacer()
|
||||
Text("Required")
|
||||
.foregroundStyle(.red)
|
||||
if !keypair.openSshPubkey.isEmpty {
|
||||
Text(keypair.openSshPubkey.trimmingCharacters(in: .whitespacesAndNewlines))
|
||||
.foregroundStyle(.gray)
|
||||
}
|
||||
.listRowSeparator(.hidden)
|
||||
|
||||
TextEditor(text: $privkeyStr)
|
||||
.background(.gray.opacity(0.5))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||
.padding(.bottom, 5)
|
||||
.padding(.horizontal, -8)
|
||||
}
|
||||
|
||||
if !keypair.openSshPubkey.isEmpty {
|
||||
Text(keypair.openSshPubkey.trimmingCharacters(in: .whitespacesAndNewlines))
|
||||
.foregroundStyle(.gray)
|
||||
.preferredColorScheme(.dark)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .topBarLeading) {
|
||||
Button("", systemImage: "xmark") {
|
||||
dismiss()
|
||||
}
|
||||
.tint(.primary)
|
||||
}
|
||||
ToolbarItem(placement: .topBarTrailing) {
|
||||
Button() {
|
||||
keyManager.importKey(type: keyType, priv: privkeyStr, name: keyName)
|
||||
UINotificationFeedbackGenerator().notificationOccurred(.success)
|
||||
dismiss()
|
||||
} label: {
|
||||
Label("", systemImage: "checkmark")
|
||||
.tint(hostsManager.selectedTheme.foreground.suiColor)
|
||||
}
|
||||
.disabled(privkeyStr.isEmpty || keyName.isEmpty)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.preferredColorScheme(.dark)
|
||||
.overlay(alignment: .bottom) {
|
||||
Button {
|
||||
keyManager.importKey(type: keyType, priv: privkeyStr, name: keyName)
|
||||
UINotificationFeedbackGenerator().notificationOccurred(.success)
|
||||
dismiss()
|
||||
} label: {
|
||||
Text("Import")
|
||||
.font(.title)
|
||||
.bold()
|
||||
}
|
||||
.modifier(glassButton(prominent: true))
|
||||
.padding(.bottom, 15)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
KeyImporterView(keyManager: KeyManager())
|
||||
KeyImporterView(
|
||||
keyManager: KeyManager(),
|
||||
hostsManager: HostsManager()
|
||||
)
|
||||
}
|
||||
@@ -62,7 +62,7 @@ struct KeyManagerView: View {
|
||||
showImporter.toggle()
|
||||
}
|
||||
.sheet(isPresented: $showImporter) {
|
||||
KeyImporterView(keyManager: keyManager)
|
||||
KeyImporterView(keyManager: keyManager, hostsManager: hostsManager)
|
||||
.colorScheme(hostsManager.selectedTheme.background.luminance > 0.5 ? .light : .dark)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,16 +8,6 @@
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct glassEffectCompat: ViewModifier {
|
||||
func body(content: Content) -> some View {
|
||||
if #available(iOS 19, *) {
|
||||
content.glassEffect()
|
||||
} else {
|
||||
content
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct glassButton: ViewModifier {
|
||||
var prominent: Bool
|
||||
|
||||
@@ -26,6 +16,13 @@ struct glassButton: ViewModifier {
|
||||
}
|
||||
|
||||
func body(content: Content) -> some View {
|
||||
#if compiler(>=6.2)
|
||||
if prominent {
|
||||
content.buttonStyle(.borderedProminent)
|
||||
} else {
|
||||
content
|
||||
}
|
||||
#else
|
||||
if #available(iOS 19, *) {
|
||||
if prominent {
|
||||
content.buttonStyle(.glassProminent)
|
||||
@@ -39,6 +36,7 @@ struct glassButton: ViewModifier {
|
||||
content
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -136,13 +136,15 @@ struct ThemeManagerView: View {
|
||||
Button() {
|
||||
showAlert.toggle()
|
||||
} label: {
|
||||
Label("URL", systemImage: "link")
|
||||
Label("URL", systemImage: "document.on.clipboard")
|
||||
}
|
||||
}
|
||||
|
||||
#if compiler(>=6.2)
|
||||
if #available(iOS 19, *) {
|
||||
ToolbarSpacer()
|
||||
}
|
||||
#endif
|
||||
|
||||
ToolbarItem() {
|
||||
Button() {
|
||||
|
||||
@@ -12,6 +12,6 @@ git submodule init
|
||||
rm -rf SwiftTerm
|
||||
git clone https://github.com/neon443/SwiftTerm -b jelly
|
||||
mkdir Frameworks; cd Frameworks
|
||||
curl -o frameworks.tar.xz https://files.catbox.moe/f4pe0u.xz
|
||||
curl -o frameworks.tar.xz https://copy.neon443.xyz/shhshell-frameworks.xz
|
||||
tar xzf frameworks.tar.xz
|
||||
rm frameworks.tar.xz
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# ci_pre_xcodebuild.sh
|
||||
# ShhShell
|
||||
#
|
||||
# Created by neon443 on 07/06/2025.
|
||||
#
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# ci_prost_xcodebuild.sh
|
||||
# ShhShell
|
||||
#
|
||||
# Created by neon443 on 07/06/2025.
|
||||
#
|
||||