45 lines
1.1 KiB
Swift
45 lines
1.1 KiB
Swift
//
|
|
// AddAccountView.swift
|
|
// duduji
|
|
//
|
|
// Created by ching on 2023/5/3.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct AddAccountView: View {
|
|
@State private var instanceAddress = "nofan.xyz"
|
|
|
|
var body: some View {
|
|
NavigationStack {
|
|
Form {
|
|
Section {
|
|
TextField("", text: $instanceAddress)
|
|
.keyboardType(.URL)
|
|
.textContentType(.URL)
|
|
.textInputAutocapitalization(.never)
|
|
.autocorrectionDisabled()
|
|
}
|
|
Section {
|
|
Button("登录") {
|
|
print("DEBUG: login button")
|
|
}
|
|
.foregroundColor(.white)
|
|
.frame(maxWidth: .infinity) // 使得文本居中
|
|
}
|
|
.listRowBackground(Color.green)
|
|
|
|
InstanceInfoSection()
|
|
}
|
|
}
|
|
.navigationTitle("添加账户")
|
|
.navigationBarTitleDisplayMode(.inline)
|
|
}
|
|
}
|
|
|
|
struct AddAccountView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
AddAccountView()
|
|
}
|
|
}
|