mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 05:19:13 +00:00
solarium complete
idr most of ts cleaned up stuff remove glassbutton
This commit is contained in:
@@ -96,7 +96,6 @@
|
||||
A9C897EF2DF1A9A400EF9A5F /* SSHHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9C897EE2DF1A9A400EF9A5F /* SSHHandler.swift */; };
|
||||
A9CC786B2E4E681400FAEE58 /* RecentsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9CC786A2E4E681400FAEE58 /* RecentsView.swift */; };
|
||||
A9CC786D2E4F534600FAEE58 /* History.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9CC786C2E4F534600FAEE58 /* History.swift */; };
|
||||
A9D45DD92E7204FF00BA9E4A /* GlassButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9D45DD82E7204FF00BA9E4A /* GlassButton.swift */; };
|
||||
A9D819292E0E904200442D38 /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9D819282E0E904200442D38 /* Theme.swift */; };
|
||||
A9D8192D2E0E9EB500442D38 /* ThemeManagerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9D8192C2E0E9EB500442D38 /* ThemeManagerView.swift */; };
|
||||
A9D8192F2E0F1BEE00442D38 /* ThemeButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9D8192E2E0F1BEE00442D38 /* ThemeButton.swift */; };
|
||||
@@ -239,7 +238,6 @@
|
||||
A9C897EE2DF1A9A400EF9A5F /* SSHHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SSHHandler.swift; sourceTree = "<group>"; };
|
||||
A9CC786A2E4E681400FAEE58 /* RecentsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecentsView.swift; sourceTree = "<group>"; };
|
||||
A9CC786C2E4F534600FAEE58 /* History.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = History.swift; sourceTree = "<group>"; };
|
||||
A9D45DD82E7204FF00BA9E4A /* GlassButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GlassButton.swift; sourceTree = "<group>"; };
|
||||
A9D819282E0E904200442D38 /* Theme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Theme.swift; sourceTree = "<group>"; };
|
||||
A9D8192C2E0E9EB500442D38 /* ThemeManagerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeManagerView.swift; sourceTree = "<group>"; };
|
||||
A9D8192E2E0F1BEE00442D38 /* ThemeButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThemeButton.swift; sourceTree = "<group>"; };
|
||||
@@ -548,7 +546,6 @@
|
||||
A93143C52DF61FE300FCD5DB /* ViewModifiers.swift */,
|
||||
A96C90A02E12B87900724253 /* TextBox.swift */,
|
||||
A9835C3B2E17CCA500969508 /* TrafficLights.swift */,
|
||||
A9D45DD82E7204FF00BA9E4A /* GlassButton.swift */,
|
||||
);
|
||||
path = Misc;
|
||||
sourceTree = "<group>";
|
||||
@@ -911,7 +908,6 @@
|
||||
A9FD37552E143D23005319A8 /* SecKeyConvertible.swift in Sources */,
|
||||
A94B832F2E5B929C00EBA09C /* Backgrounder.swift in Sources */,
|
||||
A96C6AFE2E0C43B600F377FE /* Keypair.swift in Sources */,
|
||||
A9D45DD92E7204FF00BA9E4A /* GlassButton.swift in Sources */,
|
||||
A90B38322E3E8FC9002B56FC /* AboutView.swift in Sources */,
|
||||
A9C4140C2E096DB7005E3047 /* SSHError.swift in Sources */,
|
||||
A96BE6AA2E116EC000C0FEE9 /* TerminalViewContainer.swift in Sources */,
|
||||
|
||||
@@ -18,7 +18,9 @@ struct HostSymbolPreview: View {
|
||||
symbol.image
|
||||
.resizable().scaledToFit()
|
||||
.symbolRenderingMode(.monochrome)
|
||||
Text(label)
|
||||
if !label.isEmpty {
|
||||
Text(label)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ZStack(alignment: .center) {
|
||||
|
||||
@@ -59,28 +59,17 @@ struct KeyImporterView: View {
|
||||
}
|
||||
.preferredColorScheme(.dark)
|
||||
.overlay(alignment: .bottom) {
|
||||
if #available(iOS 26, *) {
|
||||
Button {
|
||||
|
||||
} label: {
|
||||
Text("Import")
|
||||
Button {
|
||||
keyManager.importKey(type: keyType, priv: privkeyStr, name: keyName)
|
||||
UINotificationFeedbackGenerator().notificationOccurred(.success)
|
||||
dismiss()
|
||||
} label: {
|
||||
Text("Import")
|
||||
.font(.title)
|
||||
.bold()
|
||||
}
|
||||
.modifier(glassButton(prominent: true))
|
||||
} else {
|
||||
Button() {
|
||||
keyManager.importKey(type: keyType, priv: privkeyStr, name: keyName)
|
||||
UINotificationFeedbackGenerator().notificationOccurred(.success)
|
||||
dismiss()
|
||||
} label: {
|
||||
Text("Import")
|
||||
.font(.title)
|
||||
.bold()
|
||||
}
|
||||
.buttonStyle(.borderedProminent)
|
||||
.padding(.bottom, 15)
|
||||
}
|
||||
.modifier(glassButton(prominent: true))
|
||||
.padding(.bottom, 15)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
//
|
||||
// GlassButton.swift
|
||||
// ShhShell
|
||||
//
|
||||
// Created by neon443 on 10/09/2025.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct GlassButton<Label: View>: View {
|
||||
var action: (() -> Void)
|
||||
var prominent: Bool = false
|
||||
@ViewBuilder var label: Label
|
||||
@ViewBuilder var fallbackLabel: Label
|
||||
|
||||
var body: some View {
|
||||
if #available(iOS 26, *) {
|
||||
Button {
|
||||
action()
|
||||
} label: {
|
||||
label
|
||||
}
|
||||
.buttonStyle(.glassProminent)
|
||||
} else {
|
||||
Button {
|
||||
action()
|
||||
} label: {
|
||||
fallbackLabel
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
GlassButton(
|
||||
action: {
|
||||
|
||||
},
|
||||
prominent: true,
|
||||
label: {
|
||||
Text("iOS 26+")
|
||||
.padding(5)
|
||||
},
|
||||
fallbackLabel: {
|
||||
Text("iOS 26+")
|
||||
.padding(5)
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -23,7 +23,11 @@ struct glassButton: ViewModifier {
|
||||
content.buttonStyle(.glass)
|
||||
}
|
||||
} else {
|
||||
content
|
||||
if prominent {
|
||||
content.buttonStyle(.borderedProminent)
|
||||
} else {
|
||||
content
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,12 +17,12 @@ struct WelcomeView: View {
|
||||
VStack {
|
||||
VStack(spacing: 20) {
|
||||
if time > 0.1 {
|
||||
Image("regular")
|
||||
.resizable().scaledToFit()
|
||||
.frame(width: 100)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 22))
|
||||
.shadow(color: .white, radius: time > 0.25 ? 5 : 0)
|
||||
.transition(.scale)
|
||||
Image("regular")
|
||||
.resizable().scaledToFit()
|
||||
.frame(width: 100)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 22))
|
||||
.shadow(color: .white, radius: time > 0.25 ? 5 : 0)
|
||||
.transition(.scale)
|
||||
}
|
||||
if time > 2 {
|
||||
Text("Welcome")
|
||||
@@ -33,12 +33,12 @@ struct WelcomeView: View {
|
||||
.shadow(color: .white, radius: time > 2.25 ? 0 : 5)
|
||||
}
|
||||
}
|
||||
// .padding(.top, time > 3 ? 25 : 0)
|
||||
// .padding(.top, time > 3 ? 25 : 0)
|
||||
|
||||
if time > 3 {
|
||||
Spacer()
|
||||
}
|
||||
|
||||
|
||||
WelcomeChunk(
|
||||
systemImage: "bolt.fill",
|
||||
title: "Blazing Fast",
|
||||
@@ -74,28 +74,27 @@ struct WelcomeView: View {
|
||||
Spacer()
|
||||
}
|
||||
if time > 9 {
|
||||
#if swift(>=6.2)
|
||||
Button("Continue") {
|
||||
hostsManager.setOnboarding(to: true)
|
||||
}
|
||||
.modifier(glassButton(prominent: true))
|
||||
#else
|
||||
Button {
|
||||
hostsManager.setOnboarding(to: true)
|
||||
} label: {
|
||||
ZStack {
|
||||
Color.terminalGreen
|
||||
if #available(iOS 19, *) {
|
||||
Text("Continue")
|
||||
.monospaced()
|
||||
.bold()
|
||||
.font(.title)
|
||||
.foregroundStyle(.black)
|
||||
} else {
|
||||
ZStack {
|
||||
Color.terminalGreen
|
||||
Text("Continue")
|
||||
.monospaced()
|
||||
.bold()
|
||||
.foregroundStyle(.black)
|
||||
}
|
||||
.clipShape(RoundedRectangle(cornerRadius: 50))
|
||||
}
|
||||
.clipShape(RoundedRectangle(cornerRadius: 50))
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.frame(width: 300, height: 50)
|
||||
.padding(.horizontal, 75)
|
||||
#endif
|
||||
.tint(.terminalGreen)
|
||||
.modifier(glassButton(prominent: true))
|
||||
}
|
||||
}
|
||||
.animation(.spring, value: time)
|
||||
|
||||
Reference in New Issue
Block a user