marinofaggiana 4 жил өмнө
parent
commit
1799101d4d

+ 17 - 9
Nextcloud.xcodeproj/project.pbxproj

@@ -21,8 +21,8 @@
 		3781B9B023DB2B7E006B4B1D /* AppDelegate+Menu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3781B9AF23DB2B7E006B4B1D /* AppDelegate+Menu.swift */; };
 		37C83A0D24532B7200618A3B /* AppDelegate+Swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37C83A0C24532B7200618A3B /* AppDelegate+Swift.swift */; };
 		37ECC83B23D0C7410082EFA2 /* NCMenuAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37ECC83A23D0C7400082EFA2 /* NCMenuAction.swift */; };
-		F70006FA24164F8D00F214A5 /* NCViewerImageVideo.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F70006F924164F8D00F214A5 /* NCViewerImageVideo.storyboard */; };
-		F70006FC2416500B00F214A5 /* NCViewerImageVideo.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70006FB2416500B00F214A5 /* NCViewerImageVideo.swift */; };
+		F70006FA24164F8D00F214A5 /* NCViewerVideo.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F70006F924164F8D00F214A5 /* NCViewerVideo.storyboard */; };
+		F70006FC2416500B00F214A5 /* NCViewerVideo.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70006FB2416500B00F214A5 /* NCViewerVideo.swift */; };
 		F700222C1EC479840080073F /* Custom.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F700222B1EC479840080073F /* Custom.xcassets */; };
 		F700222D1EC479840080073F /* Custom.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F700222B1EC479840080073F /* Custom.xcassets */; };
 		F700510122DF63AC003A3356 /* NCShare.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F700510022DF63AC003A3356 /* NCShare.storyboard */; };
@@ -360,8 +360,8 @@
 		3781B9AF23DB2B7E006B4B1D /* AppDelegate+Menu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+Menu.swift"; sourceTree = "<group>"; };
 		37C83A0C24532B7200618A3B /* AppDelegate+Swift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AppDelegate+Swift.swift"; sourceTree = "<group>"; };
 		37ECC83A23D0C7400082EFA2 /* NCMenuAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCMenuAction.swift; sourceTree = "<group>"; };
-		F70006F924164F8D00F214A5 /* NCViewerImageVideo.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = NCViewerImageVideo.storyboard; sourceTree = "<group>"; };
-		F70006FB2416500B00F214A5 /* NCViewerImageVideo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCViewerImageVideo.swift; sourceTree = "<group>"; };
+		F70006F924164F8D00F214A5 /* NCViewerVideo.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = NCViewerVideo.storyboard; sourceTree = "<group>"; };
+		F70006FB2416500B00F214A5 /* NCViewerVideo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCViewerVideo.swift; sourceTree = "<group>"; };
 		F700222B1EC479840080073F /* Custom.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Custom.xcassets; sourceTree = "<group>"; };
 		F700510022DF63AC003A3356 /* NCShare.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = NCShare.storyboard; sourceTree = "<group>"; };
 		F700510222DF6897003A3356 /* Parchment.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Parchment.framework; path = Carthage/Build/iOS/Parchment.framework; sourceTree = "<group>"; };
@@ -886,6 +886,16 @@
 			path = Shares;
 			sourceTree = "<group>";
 		};
+		F71CEB0D253A0B1A00832FFE /* NCViewerVideo */ = {
+			isa = PBXGroup;
+			children = (
+				F70006F924164F8D00F214A5 /* NCViewerVideo.storyboard */,
+				F70006FB2416500B00F214A5 /* NCViewerVideo.swift */,
+				F79630ED215527D40015EEA5 /* NCViewerVideoCommon.swift */,
+			);
+			path = NCViewerVideo;
+			sourceTree = "<group>";
+		};
 		F720B5B72507B9A5008C94E5 /* Cell */ = {
 			isa = PBXGroup;
 			children = (
@@ -1071,8 +1081,6 @@
 			isa = PBXGroup;
 			children = (
 				F79018B2240962C7007C9B6D /* NCViewerImageDismissAnimationController.swift */,
-				F70006F924164F8D00F214A5 /* NCViewerImageVideo.storyboard */,
-				F70006FB2416500B00F214A5 /* NCViewerImageVideo.swift */,
 				F79018B3240962C7007C9B6D /* NCViewerImageContentView.swift */,
 				F7381439240FE48D00404AC7 /* NCViewerImageCommon.swift */,
 				F79018B4240962C7007C9B6D /* NCViewerImageViewController.swift */,
@@ -1090,7 +1098,7 @@
 				F79018B1240962C7007C9B6D /* NCViewerImage */,
 				F72D404823D2082500A97FD0 /* NCViewerNextcloudText.swift */,
 				F790110D21415BF600D7B136 /* NCViewerRichdocument.swift */,
-				F79630ED215527D40015EEA5 /* NCViewerVideoCommon.swift */,
+				F71CEB0D253A0B1A00832FFE /* NCViewerVideo */,
 			);
 			path = Viewer;
 			sourceTree = "<group>";
@@ -1874,7 +1882,7 @@
 				F73CB3B222E072A000AD728E /* NCShareHeaderView.xib in Resources */,
 				F7AE00FA230E81EB007ACF8A /* NCBrowserWeb.storyboard in Resources */,
 				F78ACD58219048040088454D /* NCSectionHeaderMenu.xib in Resources */,
-				F70006FA24164F8D00F214A5 /* NCViewerImageVideo.storyboard in Resources */,
+				F70006FA24164F8D00F214A5 /* NCViewerVideo.storyboard in Resources */,
 				F774DF101FCC26BE002AF9FC /* iTunesArtwork@2x.png in Resources */,
 				F7501C322212E57500FB1415 /* NCMedia.storyboard in Resources */,
 				F74DE14425135B6800917068 /* NCTransfers.storyboard in Resources */,
@@ -2088,7 +2096,7 @@
 				F77B0EA61D118A16002130FE /* NSString+TruncateToWidth.m in Sources */,
 				F7CA1ED020E7E3FE002CC65E /* UIImage+PKDownloadButton.m in Sources */,
 				F7DFB7F4219C5CA800680748 /* NCCreateFormUploadScanDocument.swift in Sources */,
-				F70006FC2416500B00F214A5 /* NCViewerImageVideo.swift in Sources */,
+				F70006FC2416500B00F214A5 /* NCViewerVideo.swift in Sources */,
 				F710D1FF24057E5E00A6033D /* NCActionSheetHeaderView.swift in Sources */,
 				F79018B6240962C7007C9B6D /* NCViewerImageDismissAnimationController.swift in Sources */,
 				F7020FCE2233D7F700B7297D /* NCCreateFormUploadVoiceNote.swift in Sources */,

+ 1 - 1
iOSClient/Detail/NCDetailViewController.swift

@@ -679,7 +679,7 @@ extension NCDetailViewController: NCViewerImageViewControllerDelegate, NCViewerI
             
         } else {
             
-            if let viewerImageVideo = UIStoryboard(name: "NCViewerImageVideo", bundle: nil).instantiateInitialViewController() as? NCViewerImageVideo {
+            if let viewerImageVideo = UIStoryboard(name: "NCViewerVideo", bundle: nil).instantiateInitialViewController() as? NCViewerVideo {
                 viewerImageVideo.metadata = metadata
                 present(viewerImageVideo, animated: false) { }
             }

+ 13 - 7
iOSClient/Viewer/NCViewerImage/NCViewerImageVideo.storyboard → iOSClient/Viewer/NCViewerVideo/NCViewerVideo.storyboard

@@ -1,17 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Mmv-kq-uRN">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Mmv-kq-uRN">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
-        <!--Viewer Image Video-->
+        <!--Viewer Video-->
         <scene sceneID="puT-XC-QL4">
             <objects>
-                <viewController modalPresentationStyle="fullScreen" id="Mmv-kq-uRN" customClass="NCViewerImageVideo" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController">
+                <viewController modalPresentationStyle="fullScreen" id="Mmv-kq-uRN" customClass="NCViewerVideo" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="ZUd-xF-jbc">
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -23,7 +24,7 @@
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oHy-h6-oBZ">
                                 <rect key="frame" x="8" y="44" width="45" height="26"/>
                                 <subviews>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QdX-GD-p2D">
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QdX-GD-p2D">
                                         <rect key="frame" x="11.5" y="2" width="22" height="22"/>
                                         <constraints>
                                             <constraint firstAttribute="height" constant="22" id="dQc-qo-agC"/>
@@ -43,7 +44,8 @@
                                 </constraints>
                             </view>
                         </subviews>
-                        <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
+                        <viewLayoutGuide key="safeArea" id="I8r-2q-gEp"/>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
                             <constraint firstItem="U2u-Ng-quR" firstAttribute="top" secondItem="I8r-2q-gEp" secondAttribute="top" constant="25" id="JMx-LP-euj"/>
                             <constraint firstItem="I8r-2q-gEp" firstAttribute="bottom" secondItem="U2u-Ng-quR" secondAttribute="bottom" constant="20" id="OB5-oL-uWd"/>
@@ -52,7 +54,6 @@
                             <constraint firstAttribute="trailing" secondItem="U2u-Ng-quR" secondAttribute="trailing" id="fK9-2n-mIB"/>
                             <constraint firstItem="U2u-Ng-quR" firstAttribute="leading" secondItem="ZUd-xF-jbc" secondAttribute="leading" id="zBR-Jl-ZtK"/>
                         </constraints>
-                        <viewLayoutGuide key="safeArea" id="I8r-2q-gEp"/>
                     </view>
                     <connections>
                         <outlet property="backgroundView" destination="U2u-Ng-quR" id="f7b-ke-Ojf"/>
@@ -65,4 +66,9 @@
             <point key="canvasLocation" x="18.840579710144929" y="140.625"/>
         </scene>
     </scenes>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
 </document>

+ 2 - 2
iOSClient/Viewer/NCViewerImage/NCViewerImageVideo.swift → iOSClient/Viewer/NCViewerVideo/NCViewerVideo.swift

@@ -1,5 +1,5 @@
 //
-//  NCViewerImageVideo.swift
+//  NCViewerVideo.swift
 //  Nextcloud
 //
 //  Created by Marino Faggiana on 09/03/2020.
@@ -24,7 +24,7 @@
 
 import Foundation
 
-class NCViewerImageVideo: UIViewController {
+class NCViewerVideo: UIViewController {
     
     @IBOutlet weak var backgroundView: UIView!
     @IBOutlet weak var closeView: UIView!

+ 0 - 0
iOSClient/Viewer/NCViewerVideoCommon.swift → iOSClient/Viewer/NCViewerVideo/NCViewerVideoCommon.swift