mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Refactor preferences tab into MacPreferencesView
This commit is contained in:
parent
779e864829
commit
dfbbed12f8
@ -34,15 +34,12 @@ struct WriteFreely_MultiPlatformApp: App {
|
||||
Text("Account")
|
||||
}
|
||||
.tag(0)
|
||||
VStack {
|
||||
PreferencesView(preferences: preferences)
|
||||
Spacer()
|
||||
}
|
||||
.tabItem {
|
||||
Image(systemName: "gear")
|
||||
Text("Preferences")
|
||||
}
|
||||
.tag(1)
|
||||
MacPreferencesView(preferences: preferences)
|
||||
.tabItem {
|
||||
Image(systemName: "gear")
|
||||
Text("Preferences")
|
||||
}
|
||||
.tag(1)
|
||||
}
|
||||
.frame(minWidth: 300, maxWidth: 300, minHeight: 200, maxHeight: 200)
|
||||
.padding()
|
||||
|
@ -20,6 +20,7 @@
|
||||
171BFDF824D49FD400888236 /* PostCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171BFDF624D49FD400888236 /* PostCollection.swift */; };
|
||||
171BFDFA24D4AF8300888236 /* CollectionListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171BFDF924D4AF8300888236 /* CollectionListView.swift */; };
|
||||
171BFDFB24D4AF8300888236 /* CollectionListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 171BFDF924D4AF8300888236 /* CollectionListView.swift */; };
|
||||
1753F6AC24E431CC00309365 /* MacPreferencesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1753F6AB24E431CC00309365 /* MacPreferencesView.swift */; };
|
||||
1756AE6B24CB1E4B00FD7257 /* Post.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1756AE6A24CB1E4B00FD7257 /* Post.swift */; };
|
||||
1756AE6C24CB1E4B00FD7257 /* Post.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1756AE6A24CB1E4B00FD7257 /* Post.swift */; };
|
||||
1756AE6E24CB255B00FD7257 /* PostStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1756AE6D24CB255B00FD7257 /* PostStore.swift */; };
|
||||
@ -77,6 +78,7 @@
|
||||
17120DB124E1E19C002B9F6C /* SettingsHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsHeaderView.swift; sourceTree = "<group>"; };
|
||||
171BFDF624D49FD400888236 /* PostCollection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostCollection.swift; sourceTree = "<group>"; };
|
||||
171BFDF924D4AF8300888236 /* CollectionListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionListView.swift; sourceTree = "<group>"; };
|
||||
1753F6AB24E431CC00309365 /* MacPreferencesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MacPreferencesView.swift; sourceTree = "<group>"; };
|
||||
1756AE6A24CB1E4B00FD7257 /* Post.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Post.swift; sourceTree = "<group>"; };
|
||||
1756AE6D24CB255B00FD7257 /* PostStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostStore.swift; sourceTree = "<group>"; };
|
||||
1756AE7324CB26FA00FD7257 /* PostCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PostCell.swift; sourceTree = "<group>"; };
|
||||
@ -175,6 +177,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
17A5388724DDA31F00DEFF9A /* SettingsView.swift */,
|
||||
1753F6AB24E431CC00309365 /* MacPreferencesView.swift */,
|
||||
);
|
||||
path = Settings;
|
||||
sourceTree = "<group>";
|
||||
@ -550,6 +553,7 @@
|
||||
17DF32D624C8CA3400BCE2E3 /* PostStatusBadge.swift in Sources */,
|
||||
17120DAD24E1B99F002B9F6C /* AccountLoginView.swift in Sources */,
|
||||
1756AE7B24CB65DF00FD7257 /* PostList.swift in Sources */,
|
||||
1753F6AC24E431CC00309365 /* MacPreferencesView.swift in Sources */,
|
||||
171BFDFB24D4AF8300888236 /* CollectionListView.swift in Sources */,
|
||||
17DF32AB24C87D3500BCE2E3 /* WriteFreely_MultiPlatformApp.swift in Sources */,
|
||||
17A5388C24DDC83F00DEFF9A /* AccountModel.swift in Sources */,
|
||||
|
18
macOS/Settings/MacPreferencesView.swift
Normal file
18
macOS/Settings/MacPreferencesView.swift
Normal file
@ -0,0 +1,18 @@
|
||||
import SwiftUI
|
||||
|
||||
struct MacPreferencesView: View {
|
||||
@ObservedObject var preferences: PreferencesModel
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
PreferencesView(preferences: preferences)
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct MacPreferencesView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
MacPreferencesView(preferences: PreferencesModel())
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user