mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 21:36:17 +00:00
ok green is done, now need to finish enabled green
This commit is contained in:
@@ -110,7 +110,7 @@ struct KeyDetailView: View {
|
|||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text("Private key")
|
Text("Private key")
|
||||||
.bold()
|
.bold()
|
||||||
.frame(maxWidth: .infinity)
|
.multilineTextAlignment(.leading)
|
||||||
ZStack(alignment: .center) {
|
ZStack(alignment: .center) {
|
||||||
Text(keypair.openSshPrivkey.trimmingCharacters(in: .whitespacesAndNewlines))
|
Text(keypair.openSshPrivkey.trimmingCharacters(in: .whitespacesAndNewlines))
|
||||||
.blur(radius: reveal ? 0 : 5)
|
.blur(radius: reveal ? 0 : 5)
|
||||||
|
|||||||
@@ -8,64 +8,104 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct TrafficLightRed: View {
|
struct TrafficLightRed: View {
|
||||||
|
let background: Color = .red
|
||||||
|
let foreground: Color = ColorCodable(
|
||||||
|
red: 0.5490196078,
|
||||||
|
green: 0.1019607843,
|
||||||
|
blue: 0.0588235294
|
||||||
|
).stColor.suiColor
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
Image(systemName: "circle.fill")
|
Image(systemName: "circle.fill")
|
||||||
.resizable().scaledToFit()
|
.resizable().scaledToFit()
|
||||||
.foregroundStyle(.red)
|
.foregroundStyle(background)
|
||||||
Image(systemName: "xmark")
|
Image(systemName: "xmark")
|
||||||
.resizable().scaledToFit()
|
.resizable().scaledToFit()
|
||||||
.bold()
|
.bold()
|
||||||
.scaleEffect(0.6)
|
.scaleEffect(0.6)
|
||||||
.foregroundStyle(
|
.foregroundStyle(foreground)
|
||||||
ColorCodable(
|
|
||||||
red: 0.5490196078,
|
|
||||||
green: 0.1019607843,
|
|
||||||
blue: 0.0588235294
|
|
||||||
).stColor.suiColor
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct TrafficLightYellow: View {
|
struct TrafficLightYellow: View {
|
||||||
|
let background: Color = .yellow
|
||||||
|
let foreground: Color = ColorCodable(
|
||||||
|
red: 0.5803921569,
|
||||||
|
green: 0.3411764706,
|
||||||
|
blue: 0.0980392157
|
||||||
|
).stColor.suiColor
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack(alignment: .center) {
|
ZStack(alignment: .center) {
|
||||||
Image(systemName: "circle.fill")
|
Image(systemName: "circle.fill")
|
||||||
.resizable().scaledToFit()
|
.resizable().scaledToFit()
|
||||||
.foregroundStyle(.yellow)
|
.foregroundStyle(background)
|
||||||
Image(systemName: "minus")
|
Image(systemName: "minus")
|
||||||
.resizable().scaledToFit()
|
.resizable().scaledToFit()
|
||||||
.bold()
|
.bold()
|
||||||
.scaleEffect(0.6)
|
.scaleEffect(0.7)
|
||||||
.foregroundStyle(
|
.foregroundStyle(foreground)
|
||||||
ColorCodable(
|
|
||||||
red: 0.5803921569,
|
|
||||||
green: 0.3411764706,
|
|
||||||
blue: 0.0980392157
|
|
||||||
).stColor.suiColor
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct TrafficLightGreen: View {
|
struct TrafficLightGreen: View {
|
||||||
|
@State var enabled: Bool = true
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
let background: Color = .green
|
||||||
|
let foreground: Color = ColorCodable(
|
||||||
|
red: 0.1529411765,
|
||||||
|
green: 0.3843137255,
|
||||||
|
blue: 0.1176470588
|
||||||
|
).stColor.suiColor
|
||||||
ZStack(alignment: .center) {
|
ZStack(alignment: .center) {
|
||||||
Image(systemName: "circle.fill")
|
Image(systemName: "circle.fill")
|
||||||
.resizable().scaledToFit()
|
.resizable().scaledToFit()
|
||||||
.symbolRenderingMode(.palette)
|
.symbolRenderingMode(.palette)
|
||||||
.foregroundStyle(.green)
|
.foregroundStyle(background)
|
||||||
Rectangle()
|
if !enabled {
|
||||||
.foregroundStyle(
|
RoundedRectangle(cornerRadius: 5)
|
||||||
ColorCodable(
|
.foregroundStyle(foreground)
|
||||||
red: 0.1529411765,
|
.scaleEffect(0.6)
|
||||||
green: 0.3843137255,
|
.aspectRatio(1, contentMode: .fit)
|
||||||
blue: 0.1176470588
|
.clipShape(RoundedRectangle(cornerRadius: 5))
|
||||||
).stColor.suiColor
|
Rectangle()
|
||||||
)
|
.foregroundStyle(background)
|
||||||
.scaleEffect(0.6)
|
.scaleEffect(0.8)
|
||||||
.aspectRatio(1, contentMode: .fit)
|
.aspectRatio(0.2, contentMode: .fit)
|
||||||
|
.rotationEffect(.degrees(45))
|
||||||
|
} else {
|
||||||
|
ZStack(alignment: .center) {
|
||||||
|
Group {
|
||||||
|
Rectangle()
|
||||||
|
.foregroundStyle(foreground)
|
||||||
|
.scaleEffect(0.6)
|
||||||
|
.rotationEffect(.degrees(45))
|
||||||
|
.aspectRatio(1, contentMode: .fit)
|
||||||
|
.clipShape(RoundedRectangle(cornerRadius: 5))
|
||||||
|
}
|
||||||
|
VStack(spacing: 0) {
|
||||||
|
VStack(alignment: .trailing) {
|
||||||
|
Rectangle()
|
||||||
|
.scaleEffect(0.7, anchor: .bottomTrailing)
|
||||||
|
.aspectRatio(1, contentMode: .fit)
|
||||||
|
}
|
||||||
|
.aspectRatio(2, contentMode: .fit)
|
||||||
|
.border(.red)
|
||||||
|
VStack(alignment: .leading) {
|
||||||
|
Rectangle()
|
||||||
|
.scaleEffect(0.7, anchor: .topLeading)
|
||||||
|
.aspectRatio(1, contentMode: .fit)
|
||||||
|
}
|
||||||
|
.aspectRatio(2, contentMode: .fit)
|
||||||
|
.border(.red)
|
||||||
|
}
|
||||||
|
.border(.blue)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,35 +34,17 @@ struct ShellTabView: View {
|
|||||||
session.handler.disconnect()
|
session.handler.disconnect()
|
||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "xmark.circle.fill")
|
TrafficLightRed()
|
||||||
.resizable().scaledToFit()
|
|
||||||
.symbolRenderingMode(.palette)
|
|
||||||
.foregroundStyle(
|
|
||||||
ColorCodable(red: 0.5411764706, green: 0, blue: 0).stColor.suiColor,
|
|
||||||
.red
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
Button() {
|
Button() {
|
||||||
dismiss()
|
dismiss()
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "minus.circle.fill")
|
TrafficLightYellow()
|
||||||
.resizable().scaledToFit()
|
|
||||||
.symbolRenderingMode(.palette)
|
|
||||||
.foregroundStyle(
|
|
||||||
ColorCodable(red: 0.5764705882, green: 0.5333333333, blue: 0.2784313725).stColor.suiColor,
|
|
||||||
.yellow
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
Button() {
|
Button() {
|
||||||
print("get out of fullscreen idk??")
|
print("get out of fullscreen idk??")
|
||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "minus.circle.fill")
|
TrafficLightGreen()
|
||||||
.resizable().scaledToFit()
|
|
||||||
.symbolRenderingMode(.palette)
|
|
||||||
.foregroundStyle(
|
|
||||||
ColorCodable(red: 0.5764705882, green: 0.5333333333, blue: 0.2784313725).stColor.suiColor,
|
|
||||||
.yellow
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
Spacer()
|
Spacer()
|
||||||
Text(container.sessions[selectedID ?? UUID()]?.handler.title ?? "title")
|
Text(container.sessions[selectedID ?? UUID()]?.handler.title ?? "title")
|
||||||
|
|||||||
Reference in New Issue
Block a user