mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
remove hosts section if no hosts, delete invert.metal
This commit is contained in:
@@ -64,7 +64,6 @@
|
||||
A96C90A12E12B87A00724253 /* TextBox.swift in Sources */ = {isa = PBXBuildFile; fileRef = A96C90A02E12B87900724253 /* TextBox.swift */; };
|
||||
A96C90A32E12D53B00724253 /* KeyType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A96C90A22E12D53900724253 /* KeyType.swift */; };
|
||||
A9835C3C2E17CCA500969508 /* TrafficLights.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9835C3B2E17CCA500969508 /* TrafficLights.swift */; };
|
||||
A9835C3E2E17E9C100969508 /* invert.metal in Sources */ = {isa = PBXBuildFile; fileRef = A9835C3D2E17E9C100969508 /* invert.metal */; };
|
||||
A98554552E05535F009051BD /* KeyManagerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98554542E05535F009051BD /* KeyManagerView.swift */; };
|
||||
A98554592E0553AA009051BD /* KeyManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98554582E0553AA009051BD /* KeyManager.swift */; };
|
||||
A985545D2E055D4D009051BD /* ConnectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A985545C2E055D4D009051BD /* ConnectionView.swift */; };
|
||||
@@ -189,7 +188,6 @@
|
||||
A96C90A02E12B87900724253 /* TextBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextBox.swift; sourceTree = "<group>"; };
|
||||
A96C90A22E12D53900724253 /* KeyType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyType.swift; sourceTree = "<group>"; };
|
||||
A9835C3B2E17CCA500969508 /* TrafficLights.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrafficLights.swift; sourceTree = "<group>"; };
|
||||
A9835C3D2E17E9C100969508 /* invert.metal */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.metal; path = invert.metal; sourceTree = "<group>"; };
|
||||
A98554542E05535F009051BD /* KeyManagerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyManagerView.swift; sourceTree = "<group>"; };
|
||||
A98554582E0553AA009051BD /* KeyManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyManager.swift; sourceTree = "<group>"; };
|
||||
A985545C2E055D4D009051BD /* ConnectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConnectionView.swift; sourceTree = "<group>"; };
|
||||
@@ -467,7 +465,6 @@
|
||||
A96C90A02E12B87900724253 /* TextBox.swift */,
|
||||
A9DA97722E0D40C100142DDC /* HostSymbolPreview.swift */,
|
||||
A9835C3B2E17CCA500969508 /* TrafficLights.swift */,
|
||||
A9835C3D2E17E9C100969508 /* invert.metal */,
|
||||
);
|
||||
path = Misc;
|
||||
sourceTree = "<group>";
|
||||
@@ -758,7 +755,6 @@
|
||||
A985545D2E055D4D009051BD /* ConnectionView.swift in Sources */,
|
||||
A9FD37592E143D74005319A8 /* GenericPasswordConvertible.swift in Sources */,
|
||||
A9485C762E1AF59F00209824 /* FontManagerView.swift in Sources */,
|
||||
A9835C3E2E17E9C100969508 /* invert.metal in Sources */,
|
||||
A98554592E0553AA009051BD /* KeyManager.swift in Sources */,
|
||||
A9C897EF2DF1A9A400EF9A5F /* SSHHandler.swift in Sources */,
|
||||
A9D819312E102D8700442D38 /* HostkeysView.swift in Sources */,
|
||||
|
||||
@@ -17,42 +17,44 @@ struct HostsView: View {
|
||||
Text("Add your first Host!")
|
||||
}
|
||||
|
||||
Section("Hosts") {
|
||||
ForEach(hostsManager.hosts) { host in
|
||||
NavigationLink() {
|
||||
ConnectionView(
|
||||
handler: SSHHandler(host: host, keyManager: keyManager),
|
||||
hostsManager: hostsManager,
|
||||
keyManager: keyManager
|
||||
)
|
||||
} label: {
|
||||
HostSymbolPreview(symbol: host.symbol, label: host.label)
|
||||
.frame(width: 40, height: 40)
|
||||
Text(host.description)
|
||||
}
|
||||
.id(host)
|
||||
.animation(.default, value: host)
|
||||
.swipeActions(edge: .trailing) {
|
||||
Button(role: .destructive) {
|
||||
hostsManager.removeHost(host)
|
||||
if !hostsManager.hosts.isEmpty {
|
||||
Section("Hosts") {
|
||||
ForEach(hostsManager.hosts) { host in
|
||||
NavigationLink() {
|
||||
ConnectionView(
|
||||
handler: SSHHandler(host: host, keyManager: keyManager),
|
||||
hostsManager: hostsManager,
|
||||
keyManager: keyManager
|
||||
)
|
||||
} label: {
|
||||
Label("Delete", systemImage: "trash")
|
||||
HostSymbolPreview(symbol: host.symbol, label: host.label)
|
||||
.frame(width: 40, height: 40)
|
||||
Text(host.description)
|
||||
}
|
||||
.tint(.red)
|
||||
Button() {
|
||||
hostsManager.duplicateHost(host)
|
||||
} label: {
|
||||
Label("Duplicate", systemImage: "square.filled.on.square")
|
||||
.id(host)
|
||||
.animation(.default, value: host)
|
||||
.swipeActions(edge: .trailing) {
|
||||
Button(role: .destructive) {
|
||||
hostsManager.removeHost(host)
|
||||
} label: {
|
||||
Label("Delete", systemImage: "trash")
|
||||
}
|
||||
.tint(.red)
|
||||
Button() {
|
||||
hostsManager.duplicateHost(host)
|
||||
} label: {
|
||||
Label("Duplicate", systemImage: "square.filled.on.square")
|
||||
}
|
||||
.tint(.blue)
|
||||
}
|
||||
.tint(.blue)
|
||||
}
|
||||
.onMove(perform: {
|
||||
hostsManager.moveHost(from: $0, to: $1)
|
||||
})
|
||||
}
|
||||
.onMove(perform: {
|
||||
hostsManager.moveHost(from: $0, to: $1)
|
||||
})
|
||||
.transition(.opacity)
|
||||
.navigationTitle("ShhShell")
|
||||
}
|
||||
.transition(.opacity)
|
||||
.navigationTitle("ShhShell")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
//
|
||||
// invert.metal
|
||||
// ShhShell
|
||||
//
|
||||
// Created by neon443 on 04/07/2025.
|
||||
//
|
||||
|
||||
#include <metal_stdlib>
|
||||
using namespace metal;
|
||||
|
||||
[[ stitchable ]] half4 invert(float2 pos, half4 color) {
|
||||
return half4(0, 1 - color.g, 1 - color.b, 1 - color.a);
|
||||
}
|
||||
Reference in New Issue
Block a user