Procházet zdrojové kódy

refactor: add menu icons

Sam Jaffe před 1 týdnem
rodič
revize
1bb7d46adb

+ 3 - 4
Todos/View/Menu/AutosaveMenu.swift

@@ -18,14 +18,13 @@ struct AutosaveMenu: View {
   @Binding var hasAutosave: Bool
 
   var body: some View {
-    Button("Save and Cleanup") {
+    Button("Save and Cleanup", systemImage: "arrow.3.trianglepath") {
       tryAutosave()
     }
     .keyboardShortcut("R", modifiers: [.command, .shift])
 //    .disabled(!shouldAutosave)
-
-    Text("     Next Autosave: after \(ymd(nextSunday(weekStart)))")
-      .onAppear(perform: tryAutosave)
+    .onAppear(perform: tryAutosave)
+    .help("Will save as \(ymd(weekStart)) after \(ymd(nextSunday(weekStart)))")
   }
 
   func tryAutosave() {

+ 1 - 1
Todos/View/Menu/ExportMenu.swift

@@ -18,7 +18,7 @@ struct ExportMenu: View {
   @State private var showingExporter = false
 
   var body: some View {
-    Button("Export") {
+    Button("Export", systemImage: "square.and.arrow.up") {
       showingExporter = true
     }
     .keyboardShortcut("E", modifiers: [.command, .shift])

+ 1 - 1
Todos/View/Menu/ImportMenu.swift

@@ -17,7 +17,7 @@ struct ImportMenu: View {
   @State private var showingExporter = false
 
   var body: some View {
-    Button("Import") {
+    Button("Import", systemImage: "square.and.arrow.down.on.square") {
       showingExporter = true
     }
     .keyboardShortcut("I", modifiers: [.command, .shift])

+ 1 - 1
Todos/View/Menu/NewProjectMenu.swift

@@ -13,7 +13,7 @@ struct NewProjectMenu: View {
   @Query private var items: [Project]
 
   var body: some View {
-    Button("New Project", action: addItem)
+    Button("New Project", systemImage: "plus", action: addItem)
       .keyboardShortcut("N", modifiers: [.command])
   }
 

+ 1 - 1
Todos/View/Menu/SaveAsMenu.swift

@@ -16,7 +16,7 @@ struct SaveAsMenu: View {
   @State private var showingExporter = false
 
   var body: some View {
-    Button("Save As") {
+    Button("Save As", systemImage: "plus.square.on.square") {
       showingExporter = true
     }
     .keyboardShortcut("S", modifiers: [.command, .shift])

+ 1 - 1
Todos/View/Menu/SaveSnapshotMenu.swift

@@ -14,7 +14,7 @@ struct SaveSnapshotMenu: View {
   @Query private var items: [Project]
 
   var body: some View {
-    Button("Save Snapshot") {
+    Button("Save Snapshot", systemImage: "square.and.arrow.down") {
       let snapshot = Date().formatted(.iso8601)
       SaveController.save(items, toUrl: SaveController.filename(date: snapshot))
     }