ios: update style

This commit is contained in:
2026-05-02 16:23:00 -07:00
parent adb9e15b6c
commit cb368a4005
15 changed files with 667 additions and 217 deletions

View File

@@ -8,23 +8,32 @@ struct SybilConnectionView: View {
@Bindable var settings = viewModel.settings
VStack(spacing: 20) {
HStack {
SybilWordmark(size: 34)
Spacer()
}
HStack(alignment: .top, spacing: 12) {
Image(systemName: "shield.lefthalf.filled")
.font(.title3.weight(.semibold))
.foregroundStyle(SybilTheme.primary)
.font(.system(size: 20, weight: .semibold))
.foregroundStyle(SybilTheme.accent)
.frame(width: 34, height: 34)
.background(
RoundedRectangle(cornerRadius: 10)
.fill(SybilTheme.primary.opacity(0.18))
.fill(SybilTheme.accent.opacity(0.12))
.overlay(
RoundedRectangle(cornerRadius: 10)
.stroke(SybilTheme.accent.opacity(0.28), lineWidth: 1)
)
)
VStack(alignment: .leading, spacing: 4) {
Text("Connect to Sybil")
.font(.title3.weight(.semibold))
.font(.sybil(.title3, weight: .semibold))
.foregroundStyle(SybilTheme.text)
Text("Point the app at your backend and sign in with ADMIN_TOKEN if token mode is enabled.")
.font(.callout)
.font(.sybil(.callout))
.foregroundStyle(SybilTheme.textMuted)
.fixedSize(horizontal: false, vertical: true)
}
@@ -32,25 +41,25 @@ struct SybilConnectionView: View {
VStack(alignment: .leading, spacing: 10) {
Text("API URL")
.font(.caption.weight(.semibold))
.font(.sybil(.caption, weight: .semibold))
.foregroundStyle(SybilTheme.textMuted)
TextField("http://127.0.0.1:8787/api", text: $settings.apiBaseURL)
TextField("http://127.0.0.1:8787", text: $settings.apiBaseURL)
.textInputAutocapitalization(.never)
.autocorrectionDisabled()
.keyboardType(.URL)
.padding(12)
.background(
RoundedRectangle(cornerRadius: 12)
.fill(SybilTheme.surface)
.fill(SybilTheme.surface.opacity(0.78))
)
.overlay(
RoundedRectangle(cornerRadius: 12)
.stroke(SybilTheme.border, lineWidth: 1)
.stroke(SybilTheme.border.opacity(0.88), lineWidth: 1)
)
Text("Admin Token")
.font(.caption.weight(.semibold))
.font(.sybil(.caption, weight: .semibold))
.foregroundStyle(SybilTheme.textMuted)
SecureField("ADMIN_TOKEN (optional in open mode)", text: $settings.adminToken)
@@ -59,11 +68,11 @@ struct SybilConnectionView: View {
.padding(12)
.background(
RoundedRectangle(cornerRadius: 12)
.fill(SybilTheme.surface)
.fill(SybilTheme.surface.opacity(0.78))
)
.overlay(
RoundedRectangle(cornerRadius: 12)
.stroke(SybilTheme.border, lineWidth: 1)
.stroke(SybilTheme.border.opacity(0.88), lineWidth: 1)
)
}
@@ -94,7 +103,7 @@ struct SybilConnectionView: View {
if let authError = viewModel.authError {
Text(authError)
.font(.footnote)
.font(.sybil(.footnote))
.foregroundStyle(SybilTheme.danger)
.frame(maxWidth: .infinity, alignment: .leading)
}
@@ -103,10 +112,10 @@ struct SybilConnectionView: View {
.frame(maxWidth: 520)
.background(
RoundedRectangle(cornerRadius: 20)
.fill(SybilTheme.card)
.fill(SybilTheme.panelGradient)
.overlay(
RoundedRectangle(cornerRadius: 20)
.stroke(SybilTheme.border, lineWidth: 1)
.stroke(SybilTheme.border.opacity(0.9), lineWidth: 1)
)
)
}