浏览代码

add images preview

marinofaggiana 4 年之前
父节点
当前提交
604b7ca8c3

+ 15 - 0
iOSClient/Images.xcassets/noPreviewAudio.imageset/Contents.json

@@ -0,0 +1,15 @@
+{
+  "images" : [
+    {
+      "filename" : "noPreviewAudio.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  },
+  "properties" : {
+    "preserves-vector-representation" : true
+  }
+}

+ 55 - 0
iOSClient/Images.xcassets/noPreviewAudio.imageset/noPreviewAudio.pdf

@@ -0,0 +1,55 @@
+%PDF-1.4
+%Óëéá
+1 0 obj
+<</Creator (Mozilla/5.0 \(Macintosh; Intel Mac OS X 10_15_7\) AppleWebKit/537.36 \(KHTML, like Gecko\) BoxySVG/3.42.2 Chrome/83.0.4103.122 Electron/9.1.2 Safari/537.36)
+/Producer (Skia/PDF m83)
+/CreationDate (D:20201111104753+00'00')
+/ModDate (D:20201111104753+00'00')>>
+endobj
+3 0 obj
+<</ca 1
+/BM /Normal>>
+endobj
+4 0 obj
+<</Filter /FlateDecode
+/Length 303>> stream
+xœ]’MN1…÷9EÖH˜ø'±sÖ¬8Àˆ–E‹Ü_ÂNh'ÓÉ&ùâ<ÛÏÄ}|¹øz†å(T¡øÑòvMß)îQµ€1ó²ûùHïOùË#”AM”phO.ñòÊùü›°CÍÖ¥”‚ù:
+h£A.ÿ¤™:ÑŒÔ"'TªQœß)·½Ã-aBt,k,CWò];H.tOígw#¢½–EÁ-™©—*vê
+ØŽ‘^MsE‚Ò‡ÁA: )h>s¤Ð˜Âƒ…tÄv`”›5;öô,è»G®`!ŠÙ|6{逥Ó°rÆÝÙ–ªw¢Tbw-™#¹eÜ’Ì©êðeQ`¨:û^’ípKÞ£ÙèzÁÞL‹šÆ3s(bLb˜ê�'
+åÃï²ÿQ—ô™NéÍ×qâ�W
+endstream
+endobj
+2 0 obj
+<</Type /Page
+/Resources <</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
+/ExtGState <</G3 3 0 R>>>>
+/MediaBox [0 0 425.03998 425.03998]
+/Contents 4 0 R
+/StructParents 0
+/Parent 5 0 R>>
+endobj
+5 0 obj
+<</Type /Pages
+/Count 1
+/Kids [2 0 R]>>
+endobj
+6 0 obj
+<</Type /Catalog
+/Pages 5 0 R>>
+endobj
+xref
+0 7
+0000000000 65535 f 
+0000000015 00000 n 
+0000000711 00000 n 
+0000000301 00000 n 
+0000000338 00000 n 
+0000000911 00000 n 
+0000000966 00000 n 
+trailer
+<</Size 7
+/Root 6 0 R
+/Info 1 0 R>>
+startxref
+1013
+%%EOF

+ 15 - 0
iOSClient/Images.xcassets/noPreviewVideo.imageset/Contents.json

@@ -0,0 +1,15 @@
+{
+  "images" : [
+    {
+      "filename" : "noPreviewVideo.pdf",
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  },
+  "properties" : {
+    "preserves-vector-representation" : true
+  }
+}

+ 52 - 0
iOSClient/Images.xcassets/noPreviewVideo.imageset/noPreviewVideo.pdf

@@ -0,0 +1,52 @@
+%PDF-1.4
+%Óëéá
+1 0 obj
+<</Creator (Mozilla/5.0 \(Macintosh; Intel Mac OS X 10_15_7\) AppleWebKit/537.36 \(KHTML, like Gecko\) BoxySVG/3.42.2 Chrome/83.0.4103.122 Electron/9.1.2 Safari/537.36)
+/Producer (Skia/PDF m83)
+/CreationDate (D:20201111105208+00'00')
+/ModDate (D:20201111105208+00'00')>>
+endobj
+3 0 obj
+<</ca 1
+/BM /Normal>>
+endobj
+4 0 obj
+<</Filter /FlateDecode
+/Length 236>> stream
+xœu‘ÍNÅ@…÷<ŬMÄaî¸vå4þ,Zõý)W;4jg_áØø_©þn1¥½	VO­,¼ÃþŸT+3§èã	oÊ›W(£Z×F¡uÎ\âîžËË'PGo«µ¶bhfá¶eL‚Tw¬e…�"rÙ§øO‘õomÇÞI䘊ªj"«î–ˆx<¬†�¸ä�ÿ²�3<ÈdÞå•¡â`Œá —«QK)ñU:E’xòJ>™Î0´ÎHS;º›_îȵµ˜b=µÅm¿—’¸¥$<—”Æ×Ó=­�Wx†_ÂQ
+endstream
+endobj
+2 0 obj
+<</Type /Page
+/Resources <</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]
+/ExtGState <</G3 3 0 R>>>>
+/MediaBox [0 0 425.03998 425.03998]
+/Contents 4 0 R
+/StructParents 0
+/Parent 5 0 R>>
+endobj
+5 0 obj
+<</Type /Pages
+/Count 1
+/Kids [2 0 R]>>
+endobj
+6 0 obj
+<</Type /Catalog
+/Pages 5 0 R>>
+endobj
+xref
+0 7
+0000000000 65535 f 
+0000000015 00000 n 
+0000000644 00000 n 
+0000000301 00000 n 
+0000000338 00000 n 
+0000000844 00000 n 
+0000000899 00000 n 
+trailer
+<</Size 7
+/Root 6 0 R
+/Info 1 0 R>>
+startxref
+946
+%%EOF

+ 4 - 1
iOSClient/Viewer/NCViewerImage/NCViewerImageZoom.swift

@@ -73,7 +73,10 @@ class NCViewerImageZoom: UIViewController {
         view.addGestureRecognizer(doubleTapGestureRecognizer)
         
         if image == nil {
-            image = CCGraphics.changeThemingColorImage(UIImage.init(named: "noPreview"), width: view.frame.width, height: view.frame.width, color: .gray)
+            var named = "noPreview"
+            if metadata.typeFile == k_metadataTypeFile_audio { named = "noPreviewAudio" }
+            if metadata.typeFile == k_metadataTypeFile_video { named = "noPreviewVideo" }
+            image = CCGraphics.changeThemingColorImage(UIImage.init(named: named), width: view.frame.width, height: view.frame.width, color: .gray)
         }
         
         if let image = image {