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) {
|
||||
Text("Private key")
|
||||
.bold()
|
||||
.frame(maxWidth: .infinity)
|
||||
.multilineTextAlignment(.leading)
|
||||
ZStack(alignment: .center) {
|
||||
Text(keypair.openSshPrivkey.trimmingCharacters(in: .whitespacesAndNewlines))
|
||||
.blur(radius: reveal ? 0 : 5)
|
||||
|
||||
@@ -8,64 +8,104 @@
|
||||
import SwiftUI
|
||||
|
||||
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 {
|
||||
ZStack {
|
||||
Image(systemName: "circle.fill")
|
||||
.resizable().scaledToFit()
|
||||
.foregroundStyle(.red)
|
||||
.foregroundStyle(background)
|
||||
Image(systemName: "xmark")
|
||||
.resizable().scaledToFit()
|
||||
.bold()
|
||||
.scaleEffect(0.6)
|
||||
.foregroundStyle(
|
||||
ColorCodable(
|
||||
red: 0.5490196078,
|
||||
green: 0.1019607843,
|
||||
blue: 0.0588235294
|
||||
).stColor.suiColor
|
||||
)
|
||||
.foregroundStyle(foreground)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
ZStack(alignment: .center) {
|
||||
Image(systemName: "circle.fill")
|
||||
.resizable().scaledToFit()
|
||||
.foregroundStyle(.yellow)
|
||||
.foregroundStyle(background)
|
||||
Image(systemName: "minus")
|
||||
.resizable().scaledToFit()
|
||||
.bold()
|
||||
.scaleEffect(0.6)
|
||||
.foregroundStyle(
|
||||
ColorCodable(
|
||||
red: 0.5803921569,
|
||||
green: 0.3411764706,
|
||||
blue: 0.0980392157
|
||||
).stColor.suiColor
|
||||
)
|
||||
.scaleEffect(0.7)
|
||||
.foregroundStyle(foreground)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct TrafficLightGreen: View {
|
||||
@State var enabled: Bool = true
|
||||
|
||||
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) {
|
||||
Image(systemName: "circle.fill")
|
||||
.resizable().scaledToFit()
|
||||
.symbolRenderingMode(.palette)
|
||||
.foregroundStyle(.green)
|
||||
Rectangle()
|
||||
.foregroundStyle(
|
||||
ColorCodable(
|
||||
red: 0.1529411765,
|
||||
green: 0.3843137255,
|
||||
blue: 0.1176470588
|
||||
).stColor.suiColor
|
||||
)
|
||||
.scaleEffect(0.6)
|
||||
.aspectRatio(1, contentMode: .fit)
|
||||
.foregroundStyle(background)
|
||||
if !enabled {
|
||||
RoundedRectangle(cornerRadius: 5)
|
||||
.foregroundStyle(foreground)
|
||||
.scaleEffect(0.6)
|
||||
.aspectRatio(1, contentMode: .fit)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 5))
|
||||
Rectangle()
|
||||
.foregroundStyle(background)
|
||||
.scaleEffect(0.8)
|
||||
.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()
|
||||
}
|
||||
} label: {
|
||||
Image(systemName: "xmark.circle.fill")
|
||||
.resizable().scaledToFit()
|
||||
.symbolRenderingMode(.palette)
|
||||
.foregroundStyle(
|
||||
ColorCodable(red: 0.5411764706, green: 0, blue: 0).stColor.suiColor,
|
||||
.red
|
||||
)
|
||||
TrafficLightRed()
|
||||
}
|
||||
Button() {
|
||||
dismiss()
|
||||
} label: {
|
||||
Image(systemName: "minus.circle.fill")
|
||||
.resizable().scaledToFit()
|
||||
.symbolRenderingMode(.palette)
|
||||
.foregroundStyle(
|
||||
ColorCodable(red: 0.5764705882, green: 0.5333333333, blue: 0.2784313725).stColor.suiColor,
|
||||
.yellow
|
||||
)
|
||||
TrafficLightYellow()
|
||||
}
|
||||
Button() {
|
||||
print("get out of fullscreen idk??")
|
||||
} label: {
|
||||
Image(systemName: "minus.circle.fill")
|
||||
.resizable().scaledToFit()
|
||||
.symbolRenderingMode(.palette)
|
||||
.foregroundStyle(
|
||||
ColorCodable(red: 0.5764705882, green: 0.5333333333, blue: 0.2784313725).stColor.suiColor,
|
||||
.yellow
|
||||
)
|
||||
TrafficLightGreen()
|
||||
}
|
||||
Spacer()
|
||||
Text(container.sessions[selectedID ?? UUID()]?.handler.title ?? "title")
|
||||
|
||||
Reference in New Issue
Block a user