diff --git a/ShhShell/Host/HostsManager.swift b/ShhShell/Host/HostsManager.swift index 2498e6f..1399eb5 100644 --- a/ShhShell/Host/HostsManager.swift +++ b/ShhShell/Host/HostsManager.swift @@ -32,6 +32,13 @@ class HostsManager: ObservableObject, @unchecked Sendable { } init(previews: Bool = false) { + if previews { + self.hosts = [Host.debug, Host.blank] + self.themes = [Theme.defaultTheme] + self.snippets = [Snippet(name: "kys", content: "ls\npwd\n")] + self.history = [History(host: Host.debug, count: 3)] + return + } loadSettings() loadHosts() exportHosts() @@ -39,12 +46,6 @@ class HostsManager: ObservableObject, @unchecked Sendable { loadFonts() loadSnippets() loadHistory() - if previews { - self.hosts = [Host.debug, Host.blank] - self.themes = [Theme.defaultTheme] - self.snippets = [Snippet(name: "kys", content: "ls\npwd\n")] - self.history = [History(host: Host.debug, count: 3)] - } } func setAppIcon() { diff --git a/ShhShell/Settings/AppSettings.swift b/ShhShell/Settings/AppSettings.swift index 68ffe12..a0033f6 100644 --- a/ShhShell/Settings/AppSettings.swift +++ b/ShhShell/Settings/AppSettings.swift @@ -74,7 +74,7 @@ enum AppIcon: Codable, CaseIterable, Equatable, CustomStringConvertible { case .beta: return "Beta" case .betaBlueprint: - return "Beta Blueprint" + return "Blueprint" } } } diff --git a/ShhShell/Views/Settings/SettingsView.swift b/ShhShell/Views/Settings/SettingsView.swift index b4147e7..8f12add 100644 --- a/ShhShell/Views/Settings/SettingsView.swift +++ b/ShhShell/Views/Settings/SettingsView.swift @@ -57,25 +57,24 @@ struct SettingsView: View { HStack { ForEach(AppIcon.allCases, id: \.self) { icon in let isSelected = hostsManager.settings.appIcon == icon - ZStack { + ZStack(alignment: .top) { RoundedRectangle(cornerRadius: 21.5) .foregroundStyle(.gray.opacity(0.5)) .opacity(isSelected ? 1 : 0) - VStack(alignment: .center) { + VStack(spacing: 0) { icon.image .resizable().scaledToFit() - .frame(maxWidth: 85) .clipShape(RoundedRectangle(cornerRadius: 16.5)) .padding(5) - Spacer() Text(icon.description).tag(icon) - .font(.callout) - .padding(5) + .font(.caption) .padding(.bottom, 5) -// Spacer() + .padding(.horizontal, 5) + .border(.red) + .multilineTextAlignment(.center) } } - .frame(maxWidth: 85) + .frame(maxWidth: 85, maxHeight: 110) .onTapGesture { withAnimation { hostsManager.settings.appIcon = icon @@ -97,7 +96,7 @@ struct SettingsView: View { #Preview { SettingsView( - hostsManager: HostsManager(), + hostsManager: HostsManager(previews: true), keyManager: KeyManager() ) }