mirror of
https://github.com/neon443/NearFuture.git
synced 2026-03-11 06:49:12 +00:00
changed datepicker slightly
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.DS_Store
|
||||
@@ -459,7 +459,7 @@
|
||||
"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16;
|
||||
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
|
||||
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 13;
|
||||
@@ -501,7 +501,7 @@
|
||||
"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 15;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16;
|
||||
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
|
||||
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 13;
|
||||
|
||||
Binary file not shown.
@@ -29,7 +29,7 @@ struct AddEventView: View {
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
NavigationStack {
|
||||
Form {
|
||||
Section(
|
||||
header:
|
||||
@@ -88,12 +88,8 @@ struct AddEventView: View {
|
||||
|
||||
|
||||
// date picker
|
||||
HStack {
|
||||
Spacer()
|
||||
DatePicker("", selection: $eventDate, displayedComponents: .date)
|
||||
.datePickerStyle(WheelDatePickerStyle())
|
||||
Spacer()
|
||||
}
|
||||
|
||||
// re-ocurrence Picker
|
||||
Picker("Recurrence", selection: $eventRecurrence) {
|
||||
@@ -127,6 +123,9 @@ struct AddEventView: View {
|
||||
.font(.headline)
|
||||
.cornerRadius(10)
|
||||
.buttonStyle(BorderedProminentButtonStyle())
|
||||
if eventName.isEmpty {
|
||||
Text("Give your event a name.")
|
||||
}
|
||||
}
|
||||
.disabled(eventName.isEmpty)
|
||||
if eventName.isEmpty {
|
||||
|
||||
@@ -69,7 +69,7 @@ struct ContentView: View {
|
||||
|
||||
var body: some View {
|
||||
TabView {
|
||||
NavigationView {
|
||||
NavigationStack {
|
||||
ZStack {
|
||||
backgroundGradient
|
||||
.ignoresSafeArea(.all)
|
||||
@@ -131,12 +131,6 @@ struct ContentView: View {
|
||||
adding: true //adding event
|
||||
)
|
||||
}
|
||||
.sheet(
|
||||
isPresented: $showSettings) {
|
||||
SettingsView(
|
||||
viewModel: viewModel
|
||||
)
|
||||
}
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .topBarTrailing) {
|
||||
Button() {
|
||||
@@ -147,13 +141,6 @@ struct ContentView: View {
|
||||
.scaledToFit()
|
||||
}
|
||||
}
|
||||
ToolbarItem(placement: .topBarLeading) {
|
||||
Button() {
|
||||
showSettings.toggle()
|
||||
} label: {
|
||||
Image(systemName: "gear")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -164,6 +151,10 @@ struct ContentView: View {
|
||||
.tabItem {
|
||||
Label("Statistics", systemImage: "chart.pie")
|
||||
}
|
||||
SettingsView(viewModel: viewModel)
|
||||
.tabItem {
|
||||
Label("Settings", systemImage: "gear")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ struct EditEventView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
// NavigationView {
|
||||
// NavigationStack {
|
||||
AddEventView(
|
||||
viewModel: viewModel,
|
||||
eventName: $eventName,
|
||||
|
||||
@@ -9,7 +9,6 @@ import SwiftUI
|
||||
|
||||
struct SettingsView: View {
|
||||
@State var viewModel: EventViewModel
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
@State private var hasUbiquitous: Bool = false
|
||||
@State private var lastSyncWasSuccessful: Bool = false
|
||||
@@ -41,7 +40,7 @@ struct SettingsView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
NavigationStack {
|
||||
List {
|
||||
NavigationLink() {
|
||||
iCloudSettingsView(
|
||||
@@ -69,7 +68,7 @@ struct SettingsView: View {
|
||||
}
|
||||
|
||||
NavigationLink() {
|
||||
NavigationView() {
|
||||
NavigationStack() {
|
||||
Button() {
|
||||
UIPasteboard.general.string = "\(viewModel.exportEvents())"
|
||||
print(viewModel.exportEvents())
|
||||
@@ -83,7 +82,7 @@ struct SettingsView: View {
|
||||
Text("Export events")
|
||||
}
|
||||
NavigationLink() {
|
||||
NavigationView() {
|
||||
NavigationStack() {
|
||||
VStack {
|
||||
TextEditor(text: $importStr)
|
||||
.foregroundStyle(.foreground, .gray)
|
||||
@@ -133,16 +132,6 @@ struct SettingsView: View {
|
||||
}
|
||||
.navigationTitle("Settings")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .topBarTrailing) {
|
||||
Button() {
|
||||
dismiss()
|
||||
} label: {
|
||||
Image(systemName: "xmark.circle.fill")
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ struct StatsView: View {
|
||||
@ObservedObject var viewModel: EventViewModel
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
NavigationStack {
|
||||
List {
|
||||
Section(header: Text("Upcoming Events")) {
|
||||
let upcomingEvents = viewModel.events.filter { $0.date > Date() }
|
||||
|
||||
Reference in New Issue
Block a user