diff options
author | Henrik Storch <henrik.storch@nextcloud.com> | 2022-03-23 18:53:14 +0300 |
---|---|---|
committer | Henrik Storch <henrik.storch@nextcloud.com> | 2022-05-10 11:57:20 +0300 |
commit | f8e1571f107808d61d51569f098de87cf6a8e4d5 (patch) | |
tree | ca58bba1c340f6f153684b678102cc86c731e237 | |
parent | fc947e949afbade2a85083ae202a84bfee434b37 (diff) |
Show/indicate locked files
- use filled icon design by @jancborchardt :clap:
- don't implement via stack view or creating image programmatically, due to added complexity
- don't show lock icon on file-icon (like "Available Offline") because: 1. too crowded; 2. not as relevant/prominent as the more-button
Note: locked files do not seem to change etag yet
Signed-off-by: Henrik Storch <henrik.storch@nextcloud.com>
-rw-r--r-- | Nextcloud.xcodeproj/project.pbxproj | 2 | ||||
-rwxr-xr-x | iOSClient/Brand/NCBrand.swift | 2 | ||||
-rw-r--r-- | iOSClient/Data/NCDatabase.swift | 4 | ||||
-rw-r--r-- | iOSClient/Data/NCManageDatabase+Metadata.swift | 9 | ||||
-rw-r--r-- | iOSClient/Images.xcassets/moreLock.imageset/Contents.json | 12 | ||||
-rw-r--r-- | iOSClient/Images.xcassets/moreLock.imageset/menu-locked-filled.svg | 72 | ||||
-rw-r--r-- | iOSClient/Main/Collection Common/NCCollectionViewCommon.swift | 4 | ||||
-rw-r--r-- | iOSClient/Menu/UIViewController+Menu.swift | 2 | ||||
-rw-r--r-- | iOSClient/NCGlobal.swift | 1 |
9 files changed, 107 insertions, 1 deletions
diff --git a/Nextcloud.xcodeproj/project.pbxproj b/Nextcloud.xcodeproj/project.pbxproj index 69d7e8e9f..da89374e8 100644 --- a/Nextcloud.xcodeproj/project.pbxproj +++ b/Nextcloud.xcodeproj/project.pbxproj @@ -504,6 +504,7 @@ AF36077527BFB019001A243D /* ParallelWorkerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParallelWorkerTest.swift; sourceTree = "<group>"; }; AF3F909928213BEA0048A93E /* UserAgentTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAgentTests.swift; sourceTree = "<group>"; }; AF3FDCC12796ECC300710F60 /* NCTrash+CollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NCTrash+CollectionView.swift"; sourceTree = "<group>"; }; + AF4AFEED27905AF100577007 /* ios-communication-library */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "ios-communication-library"; path = "../ios-communication-library"; sourceTree = "<group>"; }; AF4BF613275629E20081CEEF /* NCManageDatabase+Account.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NCManageDatabase+Account.swift"; sourceTree = "<group>"; }; AF4BF61827562A4B0081CEEF /* NCManageDatabase+Metadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NCManageDatabase+Metadata.swift"; sourceTree = "<group>"; }; AF4BF61D27562B3F0081CEEF /* NCManageDatabase+Activity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NCManageDatabase+Activity.swift"; sourceTree = "<group>"; }; @@ -1755,6 +1756,7 @@ F7F67B9F1A24D27800EE80DA = { isa = PBXGroup; children = ( + AF4AFEED27905AF100577007 /* ios-communication-library */, F7F67BAA1A24D27800EE80DA /* iOSClient */, F7F67BAB1A24D27800EE80DA /* Supporting Files */, F771E3D120E2392D00AFB62D /* File Provider Extension */, diff --git a/iOSClient/Brand/NCBrand.swift b/iOSClient/Brand/NCBrand.swift index cc01ffecd..b8148e5af 100755 --- a/iOSClient/Brand/NCBrand.swift +++ b/iOSClient/Brand/NCBrand.swift @@ -137,6 +137,7 @@ class NCBrandColor: NSObject { static var buttonMore = UIImage() static var buttonStop = UIImage() + static var buttonMoreLock = UIImage() static var buttonRestore = UIImage() } @@ -355,6 +356,7 @@ class NCBrandColor: NSObject { cacheImages.buttonMore = UIImage(named: "more")!.image(color: gray, size: 50) cacheImages.buttonStop = UIImage(named: "stop")!.image(color: gray, size: 50) + cacheImages.buttonMoreLock = UIImage(named: "moreLock")!.image(color: gray, size: 50) cacheImages.buttonRestore = UIImage(named: "restore")!.image(color: gray, size: 50) } diff --git a/iOSClient/Data/NCDatabase.swift b/iOSClient/Data/NCDatabase.swift index d2cd149ac..b915acbcd 100644 --- a/iOSClient/Data/NCDatabase.swift +++ b/iOSClient/Data/NCDatabase.swift @@ -384,6 +384,10 @@ class tableMetadata: Object, NCUserBaseUrl { @objc dynamic var ocId = "" @objc dynamic var ownerId = "" @objc dynamic var ownerDisplayName = "" + @objc public var lock = false + @objc public var lockOwner = "" + @objc public var lockOwnerDisplayName = "" + @objc public var lockTime: Date? @objc dynamic var path = "" @objc dynamic var permissions = "" @objc dynamic var quotaUsedBytes: Int64 = 0 diff --git a/iOSClient/Data/NCManageDatabase+Metadata.swift b/iOSClient/Data/NCManageDatabase+Metadata.swift index 136cfda9f..be30954e7 100644 --- a/iOSClient/Data/NCManageDatabase+Metadata.swift +++ b/iOSClient/Data/NCManageDatabase+Metadata.swift @@ -64,6 +64,10 @@ extension NCManageDatabase { metadata.ocId = file.ocId metadata.ownerId = file.ownerId metadata.ownerDisplayName = file.ownerDisplayName + metadata.lock = file.lock + metadata.lockOwner = file.lockOwner + metadata.lockOwnerDisplayName = file.lockOwnerDisplayName + metadata.lockTime = file.lockTime metadata.path = file.path metadata.permissions = file.permissions metadata.quotaUsedBytes = file.quotaUsedBytes @@ -325,6 +329,11 @@ extension NCManageDatabase { } else if result.status == NCGlobal.shared.metadataStatusNormal && addCompareLivePhoto && result.livePhoto != metadata.livePhoto { ocIdsUdate.append(metadata.ocId) realm.add(tableMetadata.init(value: metadata), update: .all) + } else if result.lock != metadata.lock { + // FIXME: Etag should have changed! + // https://github.com/nextcloud/files_lock/issues/57 + ocIdsUdate.append(metadata.ocId) + realm.add(tableMetadata.init(value: metadata), update: .all) } } else { // new diff --git a/iOSClient/Images.xcassets/moreLock.imageset/Contents.json b/iOSClient/Images.xcassets/moreLock.imageset/Contents.json new file mode 100644 index 000000000..194258945 --- /dev/null +++ b/iOSClient/Images.xcassets/moreLock.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "menu-locked-filled.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/iOSClient/Images.xcassets/moreLock.imageset/menu-locked-filled.svg b/iOSClient/Images.xcassets/moreLock.imageset/menu-locked-filled.svg new file mode 100644 index 000000000..19be22ed7 --- /dev/null +++ b/iOSClient/Images.xcassets/moreLock.imageset/menu-locked-filled.svg @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + version="1.1" + width="24" + height="24" + viewBox="0 0 24 24" + id="svg4" + sodipodi:docname="locked-filled.svg" + inkscape:version="1.1.2 (1:1.1+202202050950+0a00cf5339)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs8"> + <clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath839"> + <path + d="M 0,0 H 1770.8333 V 1770.8333 H 0 Z" + clip-rule="evenodd" + id="path837" /> + </clipPath> + <clipPath + clipPathUnits="userSpaceOnUse" + id="clipPath839-3"> + <path + d="M 0,0 H 1770.8333 V 1770.8333 H 0 Z" + clip-rule="evenodd" + id="path837-6" /> + </clipPath> + </defs> + <sodipodi:namedview + id="namedview6" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + showgrid="false" + inkscape:zoom="17" + inkscape:cx="9.7941176" + inkscape:cy="9.4117647" + inkscape:window-width="1920" + inkscape:window-height="1046" + inkscape:window-x="0" + inkscape:window-y="34" + inkscape:window-maximized="1" + inkscape:current-layer="svg4" /> + <path + d="m 15.75,6.375 c 0.690625,0 1.25,0.559375 1.25,1.25 v 6.25 c 0,0.690625 -0.559375,1.25 -1.25,1.25 H 8.25 C 7.55625,15.125 7,14.5625 7,13.875 V 7.625 C 7,6.93125 7.55625,6.375 8.25,6.375 H 8.875 V 5.125 C 8.875,3.399375 10.274375,2 12,2 c 1.725625,0 3.125,1.399375 3.125,3.125 v 1.25 H 15.75 M 12,3.25 c -1.035625,0 -1.875,0.839375 -1.875,1.875 v 1.25 h 3.75 V 5.125 C 13.875,4.089375 13.035625,3.25 12,3.25 Z" + id="path2" + style="stroke-width:0.625" + sodipodi:nodetypes="cssssssscsssccssccss" /> + <g + id="g833" + transform="matrix(0.01355297,0,0,0.01355297,-8.4406855e-6,6.9999789)"> + <g + id="g835" + clip-path="url(#clipPath839-3)"> + <g + id="g841" + transform="scale(73.784721)"> + <path + d="m 16,12 c 0,-0.0655 0.0032,-0.130847 0.0096,-0.196034 0.0064,-0.06519 0.01602,-0.129902 0.0288,-0.194147 0.01278,-0.06424 0.02868,-0.127705 0.04769,-0.190387 0.01901,-0.06268 0.04106,-0.124281 0.06612,-0.184798 0.02507,-0.06052 0.05304,-0.119658 0.08392,-0.177426 0.03088,-0.05777 0.06451,-0.113885 0.100903,-0.168348 0.03639,-0.05446 0.07536,-0.107011 0.116917,-0.157645 0.04155,-0.05063 0.08549,-0.09911 0.131809,-0.145428 0.04632,-0.04632 0.09479,-0.09025 0.145426,-0.131807 0.05063,-0.04155 0.103183,-0.08053 0.157646,-0.116919 0.05446,-0.03639 0.11058,-0.07003 0.168348,-0.100903 0.05777,-0.03088 0.116909,-0.05885 0.177425,-0.08392 0.06052,-0.02507 0.122118,-0.04711 0.1848,-0.06612 0.06268,-0.01902 0.126144,-0.03491 0.190387,-0.04769 0.06425,-0.01278 0.12896,-0.02238 0.194148,-0.0288 C 17.869154,10.003211 17.9345,10.000001 18,10 c 0.0655,10e-7 0.130848,0.0032 0.196033,0.0096 0.06519,0.0064 0.129904,0.01602 0.194148,0.0288 0.06425,0.01278 0.127708,0.02868 0.190389,0.04769 0.06268,0.01901 0.124281,0.04105 0.184796,0.06612 0.06052,0.02507 0.119659,0.05304 0.177427,0.08392 0.05777,0.03088 0.113882,0.06451 0.168346,0.100903 0.05446,0.03639 0.107016,0.07536 0.15765,0.116919 0.05063,0.04155 0.09911,0.08549 0.145424,0.131807 0.04632,0.04632 0.09025,0.09479 0.131806,0.145428 0.04155,0.05063 0.08053,0.103181 0.116916,0.157644 0.03639,0.05446 0.07003,0.110579 0.100905,0.168348 0.03088,0.05777 0.05885,0.11691 0.08392,0.177425 0.02507,0.06052 0.04711,0.122116 0.06612,0.184798 0.01901,0.06268 0.03491,0.126145 0.04769,0.190389 0.01278,0.06424 0.02238,0.12896 0.0288,0.194148 0.0064,0.06519 0.0096,0.130532 0.0096,0.196034 2e-6,0.0655 -0.0032,0.130848 -0.0096,0.196034 -0.0064,0.06519 -0.01602,0.129903 -0.0288,0.194146 -0.01278,0.06424 -0.02867,0.127707 -0.04769,0.190389 -0.01901,0.06268 -0.04105,0.12428 -0.06612,0.184796 -0.02506,0.06052 -0.05304,0.119658 -0.08392,0.177427 -0.03088,0.05777 -0.06451,0.113884 -0.100903,0.168346 -0.03639,0.05446 -0.07536,0.107013 -0.116918,0.157647 -0.04155,0.05063 -0.08549,0.09911 -0.131806,0.145427 -0.04632,0.04632 -0.09479,0.09025 -0.145426,0.131808 -0.05063,0.04155 -0.103183,0.08053 -0.157648,0.116918 -0.05446,0.03639 -0.110578,0.07003 -0.168346,0.100905 -0.05777,0.03088 -0.116909,0.05885 -0.177427,0.08391 -0.06051,0.02507 -0.122115,0.04711 -0.184796,0.06612 -0.06268,0.01902 -0.126144,0.03491 -0.190389,0.04769 -0.06424,0.01278 -0.12896,0.02238 -0.194148,0.0288 -0.06518,0.0064 -0.130529,0.0096 -0.196033,0.0096 -0.0655,0 -0.130846,-0.0032 -0.196033,-0.0096 -0.06519,-0.0064 -0.129904,-0.01602 -0.194149,-0.0288 -0.06424,-0.01278 -0.127707,-0.02867 -0.19039,-0.04769 -0.06268,-0.01901 -0.124281,-0.04105 -0.184797,-0.06612 -0.06052,-0.02507 -0.119658,-0.05304 -0.177426,-0.08392 -0.05777,-0.03088 -0.113886,-0.06451 -0.168348,-0.100905 -0.05446,-0.03639 -0.107012,-0.07536 -0.157646,-0.116917 -0.05063,-0.04155 -0.09911,-0.08549 -0.145424,-0.131808 -0.04632,-0.04632 -0.09025,-0.09479 -0.131809,-0.145427 -0.04155,-0.05063 -0.08053,-0.103183 -0.116919,-0.157647 -0.03639,-0.05446 -0.07003,-0.110578 -0.100903,-0.168346 -0.03088,-0.05777 -0.05885,-0.11691 -0.08392,-0.177427 -0.02507,-0.06052 -0.04711,-0.122115 -0.06612,-0.184797 -0.01901,-0.06268 -0.03491,-0.126145 -0.04769,-0.190389 -0.01278,-0.06424 -0.02238,-0.128958 -0.0288,-0.194146 C 16.00321,12.130848 16,12.065503 16,12 m -6,0 c 10e-7,-0.0655 0.0032,-0.130847 0.0096,-0.196034 0.0064,-0.06519 0.01602,-0.129902 0.0288,-0.194147 0.01278,-0.06424 0.02868,-0.127705 0.04769,-0.190387 0.01901,-0.06268 0.04105,-0.124281 0.06612,-0.184798 0.02507,-0.06052 0.05304,-0.119658 0.08392,-0.177426 0.03088,-0.05777 0.06451,-0.113885 0.100904,-0.168348 0.03639,-0.05446 0.07536,-0.107011 0.116919,-0.157645 0.04156,-0.05063 0.08549,-0.09911 0.131807,-0.145428 0.04632,-0.04632 0.09479,-0.09025 0.145427,-0.131807 0.05063,-0.04155 0.103182,-0.08053 0.157646,-0.116919 0.05446,-0.03639 0.110579,-0.07003 0.168348,-0.100903 0.05777,-0.03088 0.11691,-0.05885 0.177426,-0.08392 0.06052,-0.02507 0.122116,-0.04711 0.184798,-0.06612 0.06268,-0.01902 0.126144,-0.03491 0.190387,-0.04769 0.06424,-0.01278 0.12896,-0.02238 0.194147,-0.0288 0.06519,-0.0064 0.130532,-0.0096 0.196034,-0.0096 0.0655,10e-7 0.130848,0.0032 0.196034,0.0096 0.06519,0.0064 0.129903,0.01602 0.194146,0.0288 0.06424,0.01278 0.127707,0.02868 0.190389,0.04769 0.06268,0.01901 0.12428,0.04105 0.184796,0.06612 0.06052,0.02507 0.119658,0.05304 0.177427,0.08392 0.05777,0.03088 0.113884,0.06451 0.168346,0.100903 0.05446,0.03639 0.107013,0.07536 0.157647,0.116919 0.05063,0.04155 0.09911,0.08549 0.145427,0.131807 0.04632,0.04632 0.09025,0.09479 0.131808,0.145428 0.04155,0.05063 0.08053,0.103181 0.116918,0.157644 0.03639,0.05446 0.07003,0.110579 0.100905,0.168348 0.03088,0.05777 0.05885,0.11691 0.08391,0.177425 0.02507,0.06052 0.04711,0.122116 0.06612,0.184798 0.01902,0.06268 0.03491,0.126145 0.04769,0.190389 0.01278,0.06424 0.02238,0.12896 0.0288,0.194148 0.0064,0.06519 0.0096,0.130532 0.0096,0.196034 -10e-7,0.0655 -0.0032,0.130848 -0.0096,0.196034 -0.0064,0.06519 -0.01602,0.129903 -0.0288,0.194146 -0.01278,0.06424 -0.02867,0.127707 -0.04769,0.190389 -0.01901,0.06268 -0.04105,0.12428 -0.06612,0.184796 -0.02507,0.06052 -0.05304,0.119658 -0.08391,0.177427 -0.03088,0.05777 -0.06451,0.113884 -0.100905,0.168346 -0.03639,0.05446 -0.07536,0.107013 -0.116917,0.157647 -0.04156,0.05063 -0.08549,0.09911 -0.131808,0.145427 -0.04632,0.04632 -0.09479,0.09025 -0.145427,0.131808 -0.05063,0.04155 -0.103183,0.08053 -0.157647,0.116918 -0.05446,0.03639 -0.110577,0.07003 -0.168346,0.100905 -0.05777,0.03088 -0.116911,0.05885 -0.177427,0.08391 -0.06052,0.02507 -0.122115,0.04711 -0.184797,0.06612 -0.06268,0.01902 -0.126144,0.03491 -0.190388,0.04769 -0.06424,0.01278 -0.128958,0.02238 -0.194146,0.0288 -0.06519,0.0064 -0.130531,0.0096 -0.196034,0.0096 -0.0655,0 -0.130847,-0.0032 -0.196034,-0.0096 -0.06519,-0.0064 -0.129903,-0.01602 -0.194148,-0.0288 -0.06424,-0.01278 -0.127707,-0.02867 -0.190389,-0.04769 -0.06268,-0.01901 -0.124281,-0.04105 -0.184798,-0.06612 -0.06052,-0.02507 -0.119658,-0.05304 -0.177425,-0.08392 -0.05777,-0.03088 -0.113885,-0.06451 -0.168348,-0.100905 -0.05446,-0.03639 -0.107011,-0.07536 -0.157644,-0.116917 -0.05063,-0.04155 -0.09911,-0.08549 -0.145428,-0.131808 -0.04632,-0.04632 -0.09025,-0.09479 -0.131807,-0.145427 -0.04156,-0.05063 -0.08053,-0.103183 -0.11692,-0.157647 -0.03639,-0.05446 -0.07002,-0.110578 -0.100902,-0.168346 -0.03088,-0.05777 -0.05885,-0.11691 -0.08392,-0.177427 -0.02507,-0.06052 -0.04711,-0.122115 -0.06612,-0.184797 -0.01901,-0.06268 -0.03491,-0.126145 -0.04769,-0.190389 -0.01278,-0.06424 -0.02238,-0.128958 -0.0288,-0.194146 C 10.003211,12.130848 10.000001,12.065503 10,12 m -6,0 c 0,-0.0655 0.00321,-0.130847 0.00963,-0.196034 0.00642,-0.06519 0.01602,-0.129902 0.028799,-0.194147 0.012779,-0.06424 0.028676,-0.127705 0.04769,-0.190387 0.019014,-0.06268 0.041055,-0.124281 0.066121,-0.184798 0.025067,-0.06052 0.053039,-0.119658 0.083917,-0.177426 0.030878,-0.05777 0.064512,-0.113885 0.1009026,-0.168348 0.036392,-0.05446 0.075365,-0.107011 0.116919,-0.157645 0.041554,-0.05063 0.08549,-0.09911 0.1318068,-0.145428 0.046318,-0.04632 0.094793,-0.09025 0.1454268,-0.131807 0.050634,-0.04155 0.1031833,-0.08053 0.1576462,-0.116919 0.054463,-0.03639 0.110579,-0.07003 0.1683473,-0.100903 0.057768,-0.03088 0.1169105,-0.05885 0.1774268,-0.08392 0.060516,-0.02507 0.1221157,-0.04711 0.1847973,-0.06612 0.062682,-0.01902 0.1261444,-0.03491 0.1903882,-0.04769 0.064244,-0.01278 0.1289597,-0.02238 0.1941467,-0.0288 C 5.869153,10.003211 5.9344978,10.000001 6,10 c 0.065503,10e-7 0.1308475,0.0032 0.1960344,0.0096 0.065186,0.0064 0.1299014,0.01602 0.1941452,0.0288 0.064244,0.01278 0.127707,0.02868 0.1903887,0.04769 0.062682,0.01901 0.1242809,0.04105 0.1847973,0.06612 0.060517,0.02507 0.1196589,0.05304 0.1774268,0.08392 0.057768,0.03088 0.1138845,0.06451 0.1683474,0.100903 0.054464,0.03639 0.1070127,0.07536 0.1576466,0.116919 0.050634,0.04155 0.09911,0.08549 0.1454268,0.131807 0.046317,0.04632 0.090253,0.09479 0.1318073,0.145428 0.041555,0.05063 0.080527,0.103181 0.1169181,0.157644 0.036391,0.05446 0.070026,0.110579 0.100904,0.168348 0.030878,0.05777 0.058849,0.11691 0.083916,0.177425 0.025067,0.06052 0.047108,0.122116 0.066122,0.184798 0.019014,0.06268 0.034911,0.126145 0.04769,0.190389 0.012779,0.06424 0.022379,0.12896 0.028799,0.194148 C 7.9967899,11.869153 8,11.934498 8,12 c 0,0.0655 -0.00321,0.130848 -0.00963,0.196034 -0.00642,0.06519 -0.016021,0.129903 -0.0288,0.194146 -0.012779,0.06424 -0.028675,0.127707 -0.04769,0.190389 -0.019014,0.06268 -0.041055,0.12428 -0.066122,0.184796 -0.025066,0.06052 -0.053039,0.119658 -0.083917,0.177427 -0.030878,0.05777 -0.064512,0.113884 -0.1009035,0.168346 -0.036391,0.05446 -0.075364,0.107013 -0.1169181,0.157647 -0.041554,0.05063 -0.08549,0.09911 -0.1318068,0.145427 -0.046317,0.04632 -0.094792,0.09025 -0.1454272,0.131808 -0.050634,0.04155 -0.1031828,0.08053 -0.1576467,0.116918 -0.054463,0.03639 -0.1105785,0.07003 -0.1683464,0.100905 -0.057768,0.03088 -0.11691,0.05885 -0.1774268,0.08391 -0.060516,0.02507 -0.1221152,0.04711 -0.1847973,0.06612 -0.062682,0.01902 -0.1261449,0.03491 -0.1903887,0.04769 -0.064244,0.01278 -0.1289592,0.02238 -0.1941457,0.0288 C 6.1308475,13.996789 6.0655026,13.999999 6,14 5.934498,14 5.869153,13.9968 5.803966,13.9904 5.738779,13.984 5.6740627,13.97438 5.6098189,13.9616 5.5455749,13.94882 5.4821124,13.93293 5.4194303,13.91391 5.3567483,13.8949 5.2951498,13.87286 5.234633,13.84779 5.174117,13.82272 5.1149745,13.79475 5.0572062,13.76387 4.9994382,13.73299 4.9433227,13.69936 4.8888593,13.662965 4.8343963,13.626575 4.7818475,13.587605 4.7312136,13.546048 4.6805796,13.504498 4.6321036,13.460558 4.5857863,13.41424 4.5394693,13.36792 4.4955333,13.31945 4.4539795,13.268813 4.4124245,13.218183 4.3734525,13.16563 4.3370605,13.111166 4.3006695,13.056706 4.2670355,13.000588 4.2361574,12.94282 4.2052794,12.88505 4.1773074,12.82591 4.1522404,12.765393 4.1271734,12.704873 4.1051334,12.643278 4.0861194,12.580596 4.0671044,12.517916 4.0512074,12.454451 4.0384294,12.390207 4.02565,12.325937 4.0160508,12.261222 4.0096302,12.196034 4.0032101,12.130848 4,12.065503 4,12 Z" + style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="path843" /> + </g> + </g> + </g> +</svg> diff --git a/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift b/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift index cdd65c168..268cf7eb8 100644 --- a/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift +++ b/iOSClient/Main/Collection Common/NCCollectionViewCommon.swift @@ -1467,6 +1467,8 @@ extension NCCollectionViewCommon: UICollectionViewDataSource { if metadata.status == NCGlobal.shared.metadataStatusInDownload || metadata.status == NCGlobal.shared.metadataStatusDownloading || metadata.status == NCGlobal.shared.metadataStatusInUpload || metadata.status == NCGlobal.shared.metadataStatusUploading { cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCBrandColor.cacheImages.buttonStop) + } else if metadata.lock == true { + cell.setButtonMore(named: NCGlobal.shared.buttonMoreLock, image: NCBrandColor.cacheImages.buttonMoreLock) } else { cell.setButtonMore(named: NCGlobal.shared.buttonMoreMore, image: NCBrandColor.cacheImages.buttonMore) } @@ -1636,6 +1638,8 @@ extension NCCollectionViewCommon: UICollectionViewDataSource { // Transfer if metadata.status == NCGlobal.shared.metadataStatusInDownload || metadata.status == NCGlobal.shared.metadataStatusDownloading || metadata.status == NCGlobal.shared.metadataStatusInUpload || metadata.status == NCGlobal.shared.metadataStatusUploading { cell.setButtonMore(named: NCGlobal.shared.buttonMoreStop, image: NCBrandColor.cacheImages.buttonStop) + } else if metadata.lock == true { + cell.setButtonMore(named: NCGlobal.shared.buttonMoreLock, image: NCBrandColor.cacheImages.buttonMoreLock) } else { cell.setButtonMore(named: NCGlobal.shared.buttonMoreMore, image: NCBrandColor.cacheImages.buttonMore) } diff --git a/iOSClient/Menu/UIViewController+Menu.swift b/iOSClient/Menu/UIViewController+Menu.swift index d2463553d..e30a16263 100644 --- a/iOSClient/Menu/UIViewController+Menu.swift +++ b/iOSClient/Menu/UIViewController+Menu.swift @@ -27,7 +27,7 @@ import NCCommunication import UIKit extension UIViewController { - fileprivate func handleProfileAction(_ action: NCHovercard.Action, for userId: String) { + fileprivate func handleProfileAction(_ action: NCCHovercard.Action, for userId: String) { switch action.appId { case "email": guard diff --git a/iOSClient/NCGlobal.swift b/iOSClient/NCGlobal.swift index a943207e1..87e446a00 100644 --- a/iOSClient/NCGlobal.swift +++ b/iOSClient/NCGlobal.swift @@ -176,6 +176,7 @@ class NCGlobal: NSObject { // let buttonMoreMore = "more" let buttonMoreStop = "stop" + let buttonMoreLock = "moreLock" // Text - OnlyOffice - Collabora - QuickLook // |