Browse Source

improved GUI

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 years ago
parent
commit
c588853042

+ 11 - 0
iOSClient/Main/Create cloud/NCUploadAssets.swift

@@ -377,6 +377,17 @@ struct UploadAssetsView: View {
                                                     Label(NSLocalizedString("_modify_", comment: ""), systemImage: "pencil.tip.crop.circle")
                                                 }
                                             }
+                                            if item.data != nil {
+                                                Button(action: {
+                                                    if let image = uploadAssets.previewStore[index].asset.fullResolutionImage?.resizeImage(size: CGSize(width: 300, height: 300), isAspectRation: true) {
+                                                        uploadAssets.previewStore[index].image = image
+                                                        uploadAssets.previewStore[index].data = nil
+                                                        uploadAssets.previewStore[index].assetType = uploadAssets.previewStore[index].asset.type
+                                                    }
+                                                }) {
+                                                    Label(NSLocalizedString("_undo_modify_", comment: ""), systemImage: "arrow.uturn.backward.circle")
+                                                }
+                                            }
                                             if item.data == nil && item.asset.type == .livePhoto && item.assetType == .livePhoto {
                                                 Button(action: {
                                                     uploadAssets.previewStore[index].assetType = .photo

+ 1 - 0
iOSClient/Supporting Files/en.lproj/Localizable.strings

@@ -923,6 +923,7 @@
 "_message_disable_livephoto_" = "This image is a Live Photo, changing it will lose the Live effect";
 "_enable_livephoto_"        = "Enable Live Photo";
 "_disable_livephoto_"       = "Disable Live Photo";
+"_undo_modify_"             = "Undo the modify";
 
 // Video
 "_select_trace_"            = "Select the trace";