diff --git a/YAPS/YAPS/AppDelegate.swift b/YAPS/YAPS/AppDelegate.swift
index edfa3c8..8d40d93 100644
--- a/YAPS/YAPS/AppDelegate.swift
+++ b/YAPS/YAPS/AppDelegate.swift
@@ -25,7 +25,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
styleMask: [.titled, .closable, .miniaturizable, .resizable, .fullSizeContentView],
backing: .buffered, defer: false)
window.center()
- window.setFrameAutosaveName("Main Window")
+ window.setFrameAutosaveName("YAPS Main Window")
window.contentView = NSHostingView(rootView: contentView)
window.makeKeyAndOrderFront(nil)
}
@@ -48,6 +48,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}
*/
+ @IBAction func openFolder(_ sender: Any) {
+
+ }
+
@IBAction func getIt(_ sender: Any) {
if !Shared.shared.destinationDefined {
Shared.shared.destination = FinderHelper.shared.selectFolder(modalTitle: "Choose destination folder.")
@@ -55,5 +59,16 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}
FinderHelper.shared.iLikeThisImage(yapsFile: Shared.shared.currentFile, destination: Shared.shared.destination)
}
+
+ @IBAction func zoomIn(_ sender: Any) {
+ //scrollView.magnification += 0.25
+ }
+
+ @IBAction func zoomOut(_ sender: Any) {
+ //scrollView.magnification -= 0.25
+ }
+
+ @IBAction func zoomToFit(_ sender: Any) {
+ //scrollView.magnify(toFit: imageView.frame)
+ }
}
-
diff --git a/YAPS/YAPS/Base.lproj/Main.storyboard b/YAPS/YAPS/Base.lproj/Main.storyboard
index bc8a578..36eeaad 100644
--- a/YAPS/YAPS/Base.lproj/Main.storyboard
+++ b/YAPS/YAPS/Base.lproj/Main.storyboard
@@ -65,7 +65,7 @@
-
-
@@ -643,6 +162,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/YAPS/YAPS/Shared.swift b/YAPS/YAPS/Shared.swift
index 28b4993..86a9d76 100644
--- a/YAPS/YAPS/Shared.swift
+++ b/YAPS/YAPS/Shared.swift
@@ -7,11 +7,14 @@
//
import Foundation
+import SwiftUI
class Shared: ObservableObject {
static let shared = Shared()
- var currentFile: YapsFile = YapsFile(index: -1, name: "EMPTY", file: .init(fileURLWithPath: "Y"), current: false)
+ @Published var fileList = [YapsFile]()
+ @Published var currentFile: YapsFile = YapsFile(index: -1, name: "EMPTY", file: .init(fileURLWithPath: "Y"), current: false)
+
var destination: URL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]
var destinationDefined: Bool = false