feat(View): 添加 AddAccountView

添加 AddAccountView

Signed-off-by: Ching <loooching@gmail.com>
This commit is contained in:
Ching 2023-05-03 21:08:30 +08:00
parent b6ff5b77ef
commit f07fcf9d9b
3 changed files with 127 additions and 5 deletions

View File

@ -11,6 +11,7 @@
24A07CD22A026DDA00F4ECA8 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A07CD12A026DDA00F4ECA8 /* ContentView.swift */; }; 24A07CD22A026DDA00F4ECA8 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A07CD12A026DDA00F4ECA8 /* ContentView.swift */; };
24A07CD42A026DDB00F4ECA8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 24A07CD32A026DDB00F4ECA8 /* Assets.xcassets */; }; 24A07CD42A026DDB00F4ECA8 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 24A07CD32A026DDB00F4ECA8 /* Assets.xcassets */; };
24A07CD82A026DDB00F4ECA8 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 24A07CD72A026DDB00F4ECA8 /* Preview Assets.xcassets */; }; 24A07CD82A026DDB00F4ECA8 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 24A07CD72A026DDB00F4ECA8 /* Preview Assets.xcassets */; };
24A07CE92A02730700F4ECA8 /* AddAccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A07CE82A02730700F4ECA8 /* AddAccountView.swift */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
@ -20,6 +21,7 @@
24A07CD32A026DDB00F4ECA8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 24A07CD32A026DDB00F4ECA8 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
24A07CD52A026DDB00F4ECA8 /* duduji.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = duduji.entitlements; sourceTree = "<group>"; }; 24A07CD52A026DDB00F4ECA8 /* duduji.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = duduji.entitlements; sourceTree = "<group>"; };
24A07CD72A026DDB00F4ECA8 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; }; 24A07CD72A026DDB00F4ECA8 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
24A07CE82A02730700F4ECA8 /* AddAccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddAccountView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -52,11 +54,15 @@
24A07CCE2A026DDA00F4ECA8 /* duduji */ = { 24A07CCE2A026DDA00F4ECA8 /* duduji */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
24A07CCF2A026DDA00F4ECA8 /* dudujiApp.swift */, 24A07CE02A02702800F4ECA8 /* Core */,
24A07CD12A026DDA00F4ECA8 /* ContentView.swift */, 24A07CE12A02703300F4ECA8 /* Extensions */,
24A07CD32A026DDB00F4ECA8 /* Assets.xcassets */, 24A07CDE2A02701A00F4ECA8 /* Model */,
24A07CD52A026DDB00F4ECA8 /* duduji.entitlements */, 24A07CDF2A02702200F4ECA8 /* Service */,
24A07CD62A026DDB00F4ECA8 /* Preview Content */, 24A07CD62A026DDB00F4ECA8 /* Preview Content */,
24A07CD32A026DDB00F4ECA8 /* Assets.xcassets */,
24A07CD12A026DDA00F4ECA8 /* ContentView.swift */,
24A07CCF2A026DDA00F4ECA8 /* dudujiApp.swift */,
24A07CD52A026DDB00F4ECA8 /* duduji.entitlements */,
); );
path = duduji; path = duduji;
sourceTree = "<group>"; sourceTree = "<group>";
@ -69,6 +75,67 @@
path = "Preview Content"; path = "Preview Content";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
24A07CDE2A02701A00F4ECA8 /* Model */ = {
isa = PBXGroup;
children = (
);
path = Model;
sourceTree = "<group>";
};
24A07CDF2A02702200F4ECA8 /* Service */ = {
isa = PBXGroup;
children = (
);
path = Service;
sourceTree = "<group>";
};
24A07CE02A02702800F4ECA8 /* Core */ = {
isa = PBXGroup;
children = (
24A07CE42A02714000F4ECA8 /* Authentication */,
24A07CE32A02709900F4ECA8 /* Components */,
);
path = Core;
sourceTree = "<group>";
};
24A07CE12A02703300F4ECA8 /* Extensions */ = {
isa = PBXGroup;
children = (
);
path = Extensions;
sourceTree = "<group>";
};
24A07CE32A02709900F4ECA8 /* Components */ = {
isa = PBXGroup;
children = (
);
path = Components;
sourceTree = "<group>";
};
24A07CE42A02714000F4ECA8 /* Authentication */ = {
isa = PBXGroup;
children = (
24A07CE72A02716200F4ECA8 /* ViewModels */,
24A07CE52A02715800F4ECA8 /* Views */,
);
path = Authentication;
sourceTree = "<group>";
};
24A07CE52A02715800F4ECA8 /* Views */ = {
isa = PBXGroup;
children = (
24A07CE82A02730700F4ECA8 /* AddAccountView.swift */,
);
path = Views;
sourceTree = "<group>";
};
24A07CE72A02716200F4ECA8 /* ViewModels */ = {
isa = PBXGroup;
children = (
);
path = ViewModels;
sourceTree = "<group>";
};
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXNativeTarget section */ /* Begin PBXNativeTarget section */
@ -141,6 +208,7 @@
files = ( files = (
24A07CD22A026DDA00F4ECA8 /* ContentView.swift in Sources */, 24A07CD22A026DDA00F4ECA8 /* ContentView.swift in Sources */,
24A07CD02A026DDA00F4ECA8 /* dudujiApp.swift in Sources */, 24A07CD02A026DDA00F4ECA8 /* dudujiApp.swift in Sources */,
24A07CE92A02730700F4ECA8 /* AddAccountView.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };

View File

@ -0,0 +1,53 @@
//
// 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 {
VStack {
Form {
Section {
TextField("", text: $instanceAddress)
}
Section {
Button("登录") {
print("DEBUG: login button")
}
.foregroundColor(.white)
.frame(maxWidth: .infinity) // 使
}
.listRowBackground(Color.green)
Section("服务器信息") {
LabeledContent("名称", value: "nofan | Fanyou in Mastodon")
Text("给饭友的自留地")
LabeledContent("邮件", value: "^^")
LabeledContent("版本") {
Text("3.5.3").monospaced()
}
LabeledContent("用户", value: "1206")
LabeledContent("嘟文", value: "489974")
LabeledContent("域名", value: "11648")
}
Section("服务器规则") {
Text("保持友善,善用折叠屏蔽功能")
Text("不鼓励发布色情暴力内容,如发布,务必主动标记为敏感内容")
Text("请尽量避免将用户消息截图转发至其他平台")
}
}
}
}
}
struct AddAccountView_Previews: PreviewProvider {
static var previews: some View {
AddAccountView()
}
}

View File

@ -11,7 +11,8 @@ import SwiftUI
struct dudujiApp: App { struct dudujiApp: App {
var body: some Scene { var body: some Scene {
WindowGroup { WindowGroup {
ContentView() // ContentView()
AddAccountView()
} }
} }
} }