Rename Account and Settings views and move to Shared code

This commit is contained in:
Angelo Stavrow 2020-08-10 10:39:44 -04:00
parent 14e8a5b4b8
commit 93a10e27dd
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE
4 changed files with 23 additions and 22 deletions

View File

@ -1,13 +1,6 @@
//
// AccountLogin.swift
// WriteFreely-MultiPlatform
//
// Created by Angelo Stavrow on 2020-08-07.
//
import SwiftUI
struct AccountLogin: View {
struct AccountView: View {
@State var accountModel = AccountModel()
@State private var username: String = ""
@ -125,6 +118,6 @@ The server could not be found. Please check that you've entered the information
}
struct AccountLogin_Previews: PreviewProvider {
static var previews: some View {
AccountLogin()
AccountView()
}
}

View File

@ -1,6 +1,6 @@
import SwiftUI
struct Preferences: View {
struct PreferencesView: View {
@State private var appearance: Int = 0
var body: some View {
@ -18,6 +18,6 @@ struct Preferences: View {
struct SwiftUIView_Previews: PreviewProvider {
static var previews: some View {
Preferences()
PreferencesView()
}
}

View File

@ -26,8 +26,8 @@
1765F62B24E18EA200C9EBF0 /* SidebarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1765F62924E18EA200C9EBF0 /* SidebarView.swift */; };
17A5388824DDA31F00DEFF9A /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17A5388724DDA31F00DEFF9A /* SettingsView.swift */; };
17A5388C24DDC83F00DEFF9A /* AccountModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17A5388B24DDC83F00DEFF9A /* AccountModel.swift */; };
17A5388F24DDEC7400DEFF9A /* AccountLogin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17A5388D24DDEC7400DEFF9A /* AccountLogin.swift */; };
17A5389324DDED0000DEFF9A /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17A5389124DDED0000DEFF9A /* Preferences.swift */; };
17A5388F24DDEC7400DEFF9A /* AccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17A5388D24DDEC7400DEFF9A /* AccountView.swift */; };
17A5389324DDED0000DEFF9A /* PreferencesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17A5389124DDED0000DEFF9A /* PreferencesView.swift */; };
17DF329D24C87D3500BCE2E3 /* Tests_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17DF329C24C87D3500BCE2E3 /* Tests_iOS.swift */; };
17DF32A824C87D3500BCE2E3 /* Tests_macOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17DF32A724C87D3500BCE2E3 /* Tests_macOS.swift */; };
17DF32AA24C87D3500BCE2E3 /* WriteFreely_MultiPlatformApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17DF328124C87D3300BCE2E3 /* WriteFreely_MultiPlatformApp.swift */; };
@ -71,8 +71,8 @@
1765F62924E18EA200C9EBF0 /* SidebarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarView.swift; sourceTree = "<group>"; };
17A5388724DDA31F00DEFF9A /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
17A5388B24DDC83F00DEFF9A /* AccountModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountModel.swift; sourceTree = "<group>"; };
17A5388D24DDEC7400DEFF9A /* AccountLogin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountLogin.swift; sourceTree = "<group>"; };
17A5389124DDED0000DEFF9A /* Preferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Preferences.swift; sourceTree = "<group>"; };
17A5388D24DDEC7400DEFF9A /* AccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountView.swift; sourceTree = "<group>"; };
17A5389124DDED0000DEFF9A /* PreferencesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreferencesView.swift; sourceTree = "<group>"; };
17DF328124C87D3300BCE2E3 /* WriteFreely_MultiPlatformApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WriteFreely_MultiPlatformApp.swift; sourceTree = "<group>"; };
17DF328224C87D3300BCE2E3 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
17DF328324C87D3500BCE2E3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@ -137,11 +137,17 @@
path = Extensions;
sourceTree = "<group>";
};
1765F62C24E1924800C9EBF0 /* Preferences */ = {
isa = PBXGroup;
children = (
17A5389124DDED0000DEFF9A /* PreferencesView.swift */,
);
path = Preferences;
sourceTree = "<group>";
};
17A5388924DDA50500DEFF9A /* Settings */ = {
isa = PBXGroup;
children = (
17A5388D24DDEC7400DEFF9A /* AccountLogin.swift */,
17A5389124DDED0000DEFF9A /* Preferences.swift */,
17A5388724DDA31F00DEFF9A /* SettingsView.swift */,
);
path = Settings;
@ -173,8 +179,9 @@
17DF32D024C8B75C00BCE2E3 /* Account */,
1756AE7F24CB841200FD7257 /* Extensions */,
17DF32CC24C8B72300BCE2E3 /* Navigation */,
17DF32D224C8B78D00BCE2E3 /* PostCollection */,
17DF32D124C8B78500BCE2E3 /* Post */,
17DF32D224C8B78D00BCE2E3 /* PostCollection */,
1765F62C24E1924800C9EBF0 /* Preferences */,
);
path = Shared;
sourceTree = "<group>";
@ -246,6 +253,7 @@
isa = PBXGroup;
children = (
17A5388B24DDC83F00DEFF9A /* AccountModel.swift */,
17A5388D24DDEC7400DEFF9A /* AccountView.swift */,
);
path = Account;
sourceTree = "<group>";
@ -505,10 +513,10 @@
171BFDFB24D4AF8300888236 /* CollectionListView.swift in Sources */,
17DF32AB24C87D3500BCE2E3 /* WriteFreely_MultiPlatformApp.swift in Sources */,
17A5388C24DDC83F00DEFF9A /* AccountModel.swift in Sources */,
17A5389324DDED0000DEFF9A /* Preferences.swift in Sources */,
17A5389324DDED0000DEFF9A /* PreferencesView.swift in Sources */,
1756AE6F24CB255B00FD7257 /* PostStore.swift in Sources */,
1756AE6C24CB1E4B00FD7257 /* Post.swift in Sources */,
17A5388F24DDEC7400DEFF9A /* AccountLogin.swift in Sources */,
17A5388F24DDEC7400DEFF9A /* AccountView.swift in Sources */,
1756AE7524CB26FA00FD7257 /* PostCell.swift in Sources */,
17A5388824DDA31F00DEFF9A /* SettingsView.swift in Sources */,
);

View File

@ -5,13 +5,13 @@ struct SettingsView: View {
var body: some View {
TabView(selection: $selectedView) {
AccountLogin()
AccountView()
.tabItem {
Image(systemName: "person.crop.circle")
Text("Account")
}
.tag(0)
Preferences()
PreferencesView()
.tabItem {
Image(systemName: "gear")
Text("Preferences")