mirror of
https://github.com/neon443/NearFuture.git
synced 2026-11-30 20:24:48 +00:00
Compare commits
0
Commits
No files matched your search
@@ -36,7 +36,7 @@ struct NearFutureApp: App {
|
||||
viewModel: viewModel,
|
||||
event: Binding(
|
||||
get: {
|
||||
viewModel.events.first(where: {$0.id == eventID}) ?? viewModel.template
|
||||
viewModel.events.first(where: {$0.id == eventID})!
|
||||
},
|
||||
set: { newValue in
|
||||
if let eventIndex = viewModel.events.firstIndex(where: {
|
||||
@@ -49,7 +49,6 @@ struct NearFutureApp: App {
|
||||
)
|
||||
)
|
||||
}
|
||||
.restorationBehavior(.disabled)
|
||||
|
||||
Window("About Near Future", id: "about") {
|
||||
AboutView()
|
||||
|
||||
@@ -40,7 +40,6 @@ struct AddEventView: View {
|
||||
}
|
||||
NavigationStack {
|
||||
Form {
|
||||
LazyVStack {
|
||||
Section(
|
||||
header:
|
||||
Text("Event Details")
|
||||
@@ -85,7 +84,7 @@ struct AddEventView: View {
|
||||
.onSubmit {
|
||||
focusedField = .Notes
|
||||
}
|
||||
// MagicClearButton(text: $eventName)
|
||||
// MagicClearButton(text: $eventName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +99,7 @@ struct AddEventView: View {
|
||||
.onSubmit {
|
||||
focusedField = nil
|
||||
}
|
||||
// MagicClearButton(text: $eventNotes)
|
||||
// MagicClearButton(text: $eventNotes)
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +107,7 @@ struct AddEventView: View {
|
||||
HStack {
|
||||
Spacer()
|
||||
DatePicker("", selection: $eventDate, displayedComponents: .date)
|
||||
// .datePickerStyle(datepickersty)
|
||||
// .datePickerStyle(datepickersty)
|
||||
Spacer()
|
||||
Button() {
|
||||
eventDate = Date()
|
||||
@@ -142,40 +141,24 @@ struct AddEventView: View {
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
.scrollContentBackground(.hidden)
|
||||
.navigationTitle("\(adding ? "Add Event" : "")")
|
||||
// .navigationBarTitleDisplayMode(.inline)
|
||||
// .navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
#if canImport(UIKit)
|
||||
ToolbarItem(placement: .topBarLeading) {
|
||||
ToolbarItem(/*placement: .topBarLeading*/) {
|
||||
if adding {
|
||||
Button() {
|
||||
resetAddEventView()
|
||||
dismiss()
|
||||
} label: {
|
||||
Image(systemName: "xmark")
|
||||
Image(systemName: "xmark.circle.fill")
|
||||
.symbolRenderingMode(.hierarchical)
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 30)
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
ToolbarItem() {
|
||||
if adding {
|
||||
Button() {
|
||||
resetAddEventView()
|
||||
dismiss()
|
||||
} label: {
|
||||
Image(systemName: "xmark")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 30)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
ToolbarItem/*(placement: .topBarTrailing)*/ {
|
||||
if adding {
|
||||
Button {
|
||||
@@ -199,7 +182,6 @@ struct AddEventView: View {
|
||||
.cornerRadius(10)
|
||||
.buttonStyle(BorderedProminentButtonStyle())
|
||||
}
|
||||
.tint(.accent)
|
||||
.apply {
|
||||
if #available(iOS 17, *) {
|
||||
$0.sensoryFeedback(.success, trigger: bye)
|
||||
|
||||
@@ -34,6 +34,10 @@ struct AddEventButton: View {
|
||||
Button() {
|
||||
showingAddEventView.toggle()
|
||||
} label: {
|
||||
ZStack {
|
||||
Circle()
|
||||
.frame(width: 33)
|
||||
.foregroundStyle(.one)
|
||||
Image(systemName: "plus")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
@@ -42,6 +46,7 @@ struct AddEventButton: View {
|
||||
.foregroundStyle(.two)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 551 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 126 KiB |
@@ -1,50 +0,0 @@
|
||||
{
|
||||
"fill" : {
|
||||
"linear-gradient" : [
|
||||
"display-p3:0.12307,0.73184,0.43944,1.00000",
|
||||
"display-p3:0.12142,0.28022,0.58006,1.00000"
|
||||
]
|
||||
},
|
||||
"groups" : [
|
||||
{
|
||||
"layers" : [
|
||||
{
|
||||
"fill" : {
|
||||
"automatic-gradient" : "display-p3:1.00000,0.30347,0.00000,1.00000"
|
||||
},
|
||||
"image-name" : "Rounded Rectangle.png",
|
||||
"name" : "Rounded Rectangle",
|
||||
"position" : {
|
||||
"scale" : 1,
|
||||
"translation-in-points" : [
|
||||
-466.2265625,
|
||||
37.9921875
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"fill" : {
|
||||
"automatic-gradient" : "display-p3:0.96611,0.36599,0.00000,1.00000"
|
||||
},
|
||||
"hidden" : false,
|
||||
"image-name" : "Oval copy.png",
|
||||
"name" : "Oval copy"
|
||||
}
|
||||
],
|
||||
"shadow" : {
|
||||
"kind" : "neutral",
|
||||
"opacity" : 0.5
|
||||
},
|
||||
"translucency" : {
|
||||
"enabled" : true,
|
||||
"value" : 0.5
|
||||
}
|
||||
}
|
||||
],
|
||||
"supported-platforms" : {
|
||||
"circles" : [
|
||||
"watchOS"
|
||||
],
|
||||
"squares" : "shared"
|
||||
}
|
||||
}
|
||||