Browse Source

coding

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 years ago
parent
commit
4a3a9fa056

+ 0 - 25
Nextcloud.xcodeproj/project.pbxproj

@@ -107,8 +107,6 @@
 		F70968A424212C4E00ED60E5 /* NCLivePhoto.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70968A324212C4E00ED60E5 /* NCLivePhoto.swift */; };
 		F70A58BE24D0349500DED00D /* NCCapabilitiesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70A58BD24D0349500DED00D /* NCCapabilitiesViewController.swift */; };
 		F70A58C024D0545100DED00D /* NCCapabilitiesViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F70A58BF24D0545100DED00D /* NCCapabilitiesViewController.storyboard */; };
-		F70B866D2642A21300ED5349 /* NCBackgroundImageColor.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F70B866B2642A21300ED5349 /* NCBackgroundImageColor.storyboard */; };
-		F70B866E2642A21300ED5349 /* NCBackgroundImageColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70B866C2642A21300ED5349 /* NCBackgroundImageColor.swift */; };
 		F70B86752642CE3B00ED5349 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = F70B86742642CE3B00ED5349 /* FirebaseCrashlytics */; };
 		F70BFC7420E0FA7D00C67599 /* NCUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70BFC7320E0FA7C00C67599 /* NCUtility.swift */; };
 		F70BFC7520E0FA7D00C67599 /* NCUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70BFC7320E0FA7C00C67599 /* NCUtility.swift */; };
@@ -147,7 +145,6 @@
 		F719D9E0288D37A300762E33 /* NCColorPicker.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F719D9DF288D37A300762E33 /* NCColorPicker.storyboard */; };
 		F719D9E2288D396100762E33 /* NCColorPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = F719D9E1288D396100762E33 /* NCColorPicker.swift */; };
 		F7226EDC1EE4089300EBECB1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7226EDB1EE4089300EBECB1 /* Main.storyboard */; };
-		F7233B3A27835FA400F40A43 /* ChromaColorPicker in Frameworks */ = {isa = PBXBuildFile; productRef = F7233B3927835FA400F40A43 /* ChromaColorPicker */; };
 		F723985C253C95CE00257F49 /* NCViewerRichdocument.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F723985B253C95CE00257F49 /* NCViewerRichdocument.storyboard */; };
 		F7239871253D86B600257F49 /* NCEmptyDataSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7239870253D86B600257F49 /* NCEmptyDataSet.swift */; };
 		F7239877253D86D300257F49 /* NCEmptyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7239876253D86D300257F49 /* NCEmptyView.xib */; };
@@ -582,8 +579,6 @@
 		F70A07C8205285FB00DC1231 /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/Localizable.strings"; sourceTree = "<group>"; };
 		F70A58BD24D0349500DED00D /* NCCapabilitiesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCCapabilitiesViewController.swift; sourceTree = "<group>"; };
 		F70A58BF24D0545100DED00D /* NCCapabilitiesViewController.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = NCCapabilitiesViewController.storyboard; sourceTree = "<group>"; };
-		F70B866B2642A21300ED5349 /* NCBackgroundImageColor.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = NCBackgroundImageColor.storyboard; sourceTree = "<group>"; };
-		F70B866C2642A21300ED5349 /* NCBackgroundImageColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCBackgroundImageColor.swift; sourceTree = "<group>"; };
 		F70B866F2642CA9500ED5349 /* ChromaColorPicker.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = ChromaColorPicker.xcframework; path = Carthage/Build/ChromaColorPicker.xcframework; sourceTree = "<group>"; };
 		F70B86792642CF5300ED5349 /* KTVHTTPCache.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = KTVHTTPCache.xcframework; path = Carthage/Build/KTVHTTPCache.xcframework; sourceTree = "<group>"; };
 		F70B867A2642CF5300ED5349 /* TLPhotoPicker.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = TLPhotoPicker.xcframework; path = Carthage/Build/TLPhotoPicker.xcframework; sourceTree = "<group>"; };
@@ -1010,7 +1005,6 @@
 				F7ED547C25EEA65400956C55 /* QRCodeReader in Frameworks */,
 				F788ECC7263AAAFA00ADC67F /* MarkdownKit in Frameworks */,
 				F7BB7E4727A18C56009B9F29 /* Parchment in Frameworks */,
-				F7233B3A27835FA400F40A43 /* ChromaColorPicker in Frameworks */,
 				F770768E263A8C3400A1BA94 /* FloatingPanel in Frameworks */,
 				F710FC7C277B7D0000AA9FBF /* RealmSwift in Frameworks */,
 				F7E572FD278F146C00F8C99E /* OpenSSL.xcframework in Frameworks */,
@@ -1138,8 +1132,6 @@
 		F70B866A2642A21300ED5349 /* Color */ = {
 			isa = PBXGroup;
 			children = (
-				F70B866B2642A21300ED5349 /* NCBackgroundImageColor.storyboard */,
-				F70B866C2642A21300ED5349 /* NCBackgroundImageColor.swift */,
 				F719D9DF288D37A300762E33 /* NCColorPicker.storyboard */,
 				F719D9E1288D396100762E33 /* NCColorPicker.swift */,
 			);
@@ -2076,7 +2068,6 @@
 				F76DA96E277B78AE0082465B /* TLPhotoPicker */,
 				F710FC79277B7D0000AA9FBF /* Realm */,
 				F710FC7B277B7D0000AA9FBF /* RealmSwift */,
-				F7233B3927835FA400F40A43 /* ChromaColorPicker */,
 				F7BB7E4627A18C56009B9F29 /* Parchment */,
 				F758A01127A7F03E0069468B /* JGProgressHUD */,
 				F753BA92281FD8020015BFB6 /* EasyTipView */,
@@ -2200,7 +2191,6 @@
 				F76DA967277B77E90082465B /* XCRemoteSwiftPackageReference "DropDown" */,
 				F76DA96D277B78AE0082465B /* XCRemoteSwiftPackageReference "TLPhotoPicker" */,
 				F710FC78277B7CFF00AA9FBF /* XCRemoteSwiftPackageReference "realm-swift" */,
-				F7233B3827835FA300F40A43 /* XCRemoteSwiftPackageReference "ChromaColorPicker" */,
 				F7BB7E4527A18C56009B9F29 /* XCRemoteSwiftPackageReference "Parchment" */,
 				F72CD01027A7E92400E59476 /* XCRemoteSwiftPackageReference "JGProgressHUD" */,
 				F753BA91281FD8010015BFB6 /* XCRemoteSwiftPackageReference "EasyTipView" */,
@@ -2339,7 +2329,6 @@
 				F77B0F631D118A16002130FE /* Localizable.strings in Resources */,
 				F774264A22EB4D0000B23912 /* NCSearchUserDropDownCell.xib in Resources */,
 				F7CB689A2541676B0050EC94 /* NCMore.storyboard in Resources */,
-				F70B866D2642A21300ED5349 /* NCBackgroundImageColor.storyboard in Resources */,
 				F77B0F7D1D118A16002130FE /* Images.xcassets in Resources */,
 				F73CB3B222E072A000AD728E /* NCShareHeaderView.xib in Resources */,
 				F7AE00FA230E81EB007ACF8A /* NCBrowserWeb.storyboard in Resources */,
@@ -2533,7 +2522,6 @@
 				F70D87D025EE6E58008CBBBD /* NCRenameFile.swift in Sources */,
 				F7F4F0F727ECDBA4008676F9 /* NCSubtitles.swift in Sources */,
 				F790110E21415BF600D7B136 /* NCViewerRichdocument.swift in Sources */,
-				F70B866E2642A21300ED5349 /* NCBackgroundImageColor.swift in Sources */,
 				F78ACD4021903CC20088454D /* NCGridCell.swift in Sources */,
 				F75B0ABD244C4DBB00E58DCA /* NCFunctionCenter.swift in Sources */,
 				AF935067276B84E700BD078F /* NCMenu+FloatingPanel.swift in Sources */,
@@ -3177,14 +3165,6 @@
 				minimumVersion = 10.0.0;
 			};
 		};
-		F7233B3827835FA300F40A43 /* XCRemoteSwiftPackageReference "ChromaColorPicker" */ = {
-			isa = XCRemoteSwiftPackageReference;
-			repositoryURL = "https://github.com/marinofaggiana/ChromaColorPicker";
-			requirement = {
-				branch = master;
-				kind = branch;
-			};
-		};
 		F72CD01027A7E92400E59476 /* XCRemoteSwiftPackageReference "JGProgressHUD" */ = {
 			isa = XCRemoteSwiftPackageReference;
 			repositoryURL = "https://github.com/JonasGessner/JGProgressHUD.git";
@@ -3361,11 +3341,6 @@
 			package = F710FC78277B7CFF00AA9FBF /* XCRemoteSwiftPackageReference "realm-swift" */;
 			productName = RealmSwift;
 		};
-		F7233B3927835FA400F40A43 /* ChromaColorPicker */ = {
-			isa = XCSwiftPackageProductDependency;
-			package = F7233B3827835FA300F40A43 /* XCRemoteSwiftPackageReference "ChromaColorPicker" */;
-			productName = ChromaColorPicker;
-		};
 		F72CD01127A7E92400E59476 /* JGProgressHUD */ = {
 			isa = XCSwiftPackageProductDependency;
 			package = F72CD01027A7E92400E59476 /* XCRemoteSwiftPackageReference "JGProgressHUD" */;

+ 0 - 257
iOSClient/Color/NCBackgroundImageColor.storyboard

@@ -1,257 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="V0q-CP-xMJ">
-    <device id="retina3_5" orientation="portrait" appearance="light"/>
-    <dependencies>
-        <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
-        <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>
-        <!--Background Image Color-->
-        <scene sceneID="L90-uG-f4z">
-            <objects>
-                <viewController id="V0q-CP-xMJ" customClass="NCBackgroundImageColor" customModule="Nextcloud" customModuleProvider="target" sceneMemberID="viewController">
-                    <view key="view" contentMode="scaleToFill" id="gzh-6E-hc4">
-                        <rect key="frame" x="0.0" y="0.0" width="300" height="450"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <subviews>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Background" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nZr-nE-ths">
-                                <rect key="frame" x="20" y="15" width="260" height="18"/>
-                                <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                                <nil key="textColor"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iU2-DL-ICv">
-                                <rect key="frame" x="0.0" y="53" width="300" height="250"/>
-                                <subviews>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3E4-fA-LuC">
-                                        <rect key="frame" x="260" y="0.0" width="30" height="30"/>
-                                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="30" id="7gh-HI-7F4"/>
-                                            <constraint firstAttribute="height" constant="30" id="tN7-80-0OA"/>
-                                        </constraints>
-                                        <connections>
-                                            <action selector="whiteButtonAction:" destination="V0q-CP-xMJ" eventType="touchUpInside" id="qan-1S-lXZ"/>
-                                        </connections>
-                                    </button>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wje-qo-0av">
-                                        <rect key="frame" x="260" y="50" width="30" height="30"/>
-                                        <color key="backgroundColor" systemColor="systemOrangeColor"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="30" id="eEj-s3-RlJ"/>
-                                            <constraint firstAttribute="width" constant="30" id="wll-2m-eab"/>
-                                        </constraints>
-                                        <connections>
-                                            <action selector="orangeButtonAction:" destination="V0q-CP-xMJ" eventType="touchUpInside" id="rze-5I-h4O"/>
-                                        </connections>
-                                    </button>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aan-mm-3h8">
-                                        <rect key="frame" x="260" y="100" width="30" height="30"/>
-                                        <color key="backgroundColor" systemColor="systemRedColor"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="30" id="KEh-Br-hec"/>
-                                            <constraint firstAttribute="height" constant="30" id="KF6-bC-uqI"/>
-                                        </constraints>
-                                        <connections>
-                                            <action selector="redButtonAction:" destination="V0q-CP-xMJ" eventType="touchUpInside" id="DQh-Gp-afZ"/>
-                                        </connections>
-                                    </button>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ele-7I-DxL">
-                                        <rect key="frame" x="260" y="150" width="30" height="30"/>
-                                        <color key="backgroundColor" systemColor="systemGreenColor"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="30" id="DgY-z7-3HB"/>
-                                            <constraint firstAttribute="width" constant="30" id="NZK-QF-30V"/>
-                                        </constraints>
-                                        <state key="normal">
-                                            <preferredSymbolConfiguration key="preferredSymbolConfiguration" scale="default"/>
-                                        </state>
-                                        <connections>
-                                            <action selector="greenButtonAction:" destination="V0q-CP-xMJ" eventType="touchUpInside" id="vz7-sI-OZN"/>
-                                        </connections>
-                                    </button>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="STo-4B-X2d">
-                                        <rect key="frame" x="260" y="200" width="30" height="30"/>
-                                        <color key="backgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                                        <constraints>
-                                            <constraint firstAttribute="width" constant="30" id="Qez-ew-4Ft"/>
-                                            <constraint firstAttribute="height" constant="30" id="bNc-qJ-yHL"/>
-                                        </constraints>
-                                        <state key="normal">
-                                            <preferredSymbolConfiguration key="preferredSymbolConfiguration" scale="default"/>
-                                        </state>
-                                        <connections>
-                                            <action selector="blackButtonAction:" destination="V0q-CP-xMJ" eventType="touchUpInside" id="FjW-KU-IXB"/>
-                                        </connections>
-                                    </button>
-                                </subviews>
-                                <constraints>
-                                    <constraint firstItem="STo-4B-X2d" firstAttribute="top" secondItem="ele-7I-DxL" secondAttribute="bottom" constant="20" id="BKq-hv-vnm"/>
-                                    <constraint firstAttribute="trailing" secondItem="ele-7I-DxL" secondAttribute="trailing" constant="10" id="FvE-ra-6MO"/>
-                                    <constraint firstAttribute="trailing" secondItem="STo-4B-X2d" secondAttribute="trailing" constant="10" id="H9y-WI-TXI"/>
-                                    <constraint firstAttribute="trailing" secondItem="3E4-fA-LuC" secondAttribute="trailing" constant="10" id="UoS-lh-xRi"/>
-                                    <constraint firstAttribute="trailing" secondItem="aan-mm-3h8" secondAttribute="trailing" constant="10" id="VKC-iZ-oKg"/>
-                                    <constraint firstItem="aan-mm-3h8" firstAttribute="top" secondItem="wje-qo-0av" secondAttribute="bottom" constant="20" id="Vtc-IV-iRF"/>
-                                    <constraint firstItem="3E4-fA-LuC" firstAttribute="top" secondItem="iU2-DL-ICv" secondAttribute="top" id="XPi-Om-9AW"/>
-                                    <constraint firstItem="ele-7I-DxL" firstAttribute="top" secondItem="aan-mm-3h8" secondAttribute="bottom" constant="20" id="ZFk-RV-bm7"/>
-                                    <constraint firstAttribute="trailing" secondItem="wje-qo-0av" secondAttribute="trailing" constant="10" id="au5-4T-kJG"/>
-                                    <constraint firstItem="wje-qo-0av" firstAttribute="top" secondItem="3E4-fA-LuC" secondAttribute="bottom" constant="20" id="p2S-Vf-mU1"/>
-                                    <constraint firstAttribute="height" constant="250" id="v0B-oB-eD3"/>
-                                </constraints>
-                            </view>
-                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7CJ-Q0-ABH" userLabel="SeparatorV">
-                                <rect key="frame" x="150" y="400" width="0.5" height="50"/>
-                                <color key="backgroundColor" systemColor="systemGray4Color"/>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="0.5" id="wU1-tA-NZk"/>
-                                </constraints>
-                            </view>
-                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ouH-gK-Guv" userLabel="SeparatorH">
-                                <rect key="frame" x="0.0" y="399.5" width="300" height="0.5"/>
-                                <color key="backgroundColor" systemColor="systemGray4Color"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="0.5" id="2OQ-Mt-Gnh"/>
-                                </constraints>
-                            </view>
-                            <button opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="249" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="W5y-aT-UlI">
-                                <rect key="frame" x="0.0" y="400" width="150" height="50"/>
-                                <constraints>
-                                    <constraint firstAttribute="height" constant="50" id="xnX-6W-gp9"/>
-                                </constraints>
-                                <fontDescription key="fontDescription" type="system" pointSize="16"/>
-                                <state key="normal" title="Cancel">
-                                    <color key="titleColor" systemColor="systemBlueColor"/>
-                                </state>
-                                <connections>
-                                    <action selector="cancelAction:" destination="V0q-CP-xMJ" eventType="touchUpInside" id="z5n-6l-qtR"/>
-                                </connections>
-                            </button>
-                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hcV-V0-eZB">
-                                <rect key="frame" x="150" y="400" width="150" height="50"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="16"/>
-                                <state key="normal" title="Ok">
-                                    <color key="titleColor" systemColor="systemBlueColor"/>
-                                </state>
-                                <connections>
-                                    <action selector="okAction:" destination="V0q-CP-xMJ" eventType="touchUpInside" id="DO8-xB-WXf"/>
-                                </connections>
-                            </button>
-                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dsj-Of-TI5">
-                                <rect key="frame" x="0.0" y="308" width="300" height="80"/>
-                                <subviews>
-                                    <switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qCH-0e-MgJ">
-                                        <rect key="frame" x="241" y="3.5" width="51" height="31"/>
-                                        <connections>
-                                            <action selector="darkmodeAction:" destination="V0q-CP-xMJ" eventType="valueChanged" id="jpD-6b-nRS"/>
-                                        </connections>
-                                    </switch>
-                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="dark mode" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AH4-ei-W3C">
-                                        <rect key="frame" x="10" y="10" width="221" height="18"/>
-                                        <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                                        <nil key="textColor"/>
-                                        <nil key="highlightedColor"/>
-                                    </label>
-                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6Dy-77-TIC">
-                                        <rect key="frame" x="10" y="48" width="280" height="30"/>
-                                        <color key="backgroundColor" systemColor="systemGray4Color"/>
-                                        <constraints>
-                                            <constraint firstAttribute="height" constant="30" id="ZKT-Su-3nU"/>
-                                        </constraints>
-                                        <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                                        <state key="normal" title="default color">
-                                            <color key="titleColor" systemColor="labelColor"/>
-                                        </state>
-                                        <connections>
-                                            <action selector="defaultAction:" destination="V0q-CP-xMJ" eventType="touchUpInside" id="iTy-8K-wVB"/>
-                                        </connections>
-                                    </button>
-                                </subviews>
-                                <constraints>
-                                    <constraint firstItem="6Dy-77-TIC" firstAttribute="top" secondItem="AH4-ei-W3C" secondAttribute="bottom" constant="20" id="0J5-Y3-Z2f"/>
-                                    <constraint firstItem="qCH-0e-MgJ" firstAttribute="centerY" secondItem="AH4-ei-W3C" secondAttribute="centerY" id="7pt-EI-Zgu"/>
-                                    <constraint firstItem="AH4-ei-W3C" firstAttribute="top" secondItem="Dsj-Of-TI5" secondAttribute="top" constant="10" id="9E5-Em-VG8"/>
-                                    <constraint firstItem="qCH-0e-MgJ" firstAttribute="leading" secondItem="AH4-ei-W3C" secondAttribute="trailing" constant="10" id="9qm-mi-Gwb"/>
-                                    <constraint firstItem="AH4-ei-W3C" firstAttribute="leading" secondItem="Dsj-Of-TI5" secondAttribute="leading" constant="10" id="Afp-ca-hx0"/>
-                                    <constraint firstItem="6Dy-77-TIC" firstAttribute="leading" secondItem="Dsj-Of-TI5" secondAttribute="leading" constant="10" id="Bn8-Bi-qOg"/>
-                                    <constraint firstAttribute="trailing" secondItem="qCH-0e-MgJ" secondAttribute="trailing" constant="10" id="QVc-0U-Mg8"/>
-                                    <constraint firstAttribute="trailing" secondItem="6Dy-77-TIC" secondAttribute="trailing" constant="10" id="jId-wH-r5I"/>
-                                    <constraint firstAttribute="height" constant="80" id="uSG-oG-ooi"/>
-                                </constraints>
-                            </view>
-                        </subviews>
-                        <viewLayoutGuide key="safeArea" id="1c1-7Q-WMG"/>
-                        <color key="backgroundColor" systemColor="systemGray6Color"/>
-                        <constraints>
-                            <constraint firstItem="hcV-V0-eZB" firstAttribute="top" secondItem="ouH-gK-Guv" secondAttribute="bottom" id="1MZ-1P-Ej1"/>
-                            <constraint firstItem="1c1-7Q-WMG" firstAttribute="bottom" secondItem="hcV-V0-eZB" secondAttribute="bottom" id="2Wh-Y6-n8F"/>
-                            <constraint firstItem="1c1-7Q-WMG" firstAttribute="trailing" secondItem="iU2-DL-ICv" secondAttribute="trailing" id="3Mn-1r-AGf"/>
-                            <constraint firstItem="Dsj-Of-TI5" firstAttribute="top" secondItem="iU2-DL-ICv" secondAttribute="bottom" constant="5" id="7kJ-dL-S5M"/>
-                            <constraint firstItem="1c1-7Q-WMG" firstAttribute="bottom" secondItem="7CJ-Q0-ABH" secondAttribute="bottom" id="8HO-F9-tfD"/>
-                            <constraint firstItem="ouH-gK-Guv" firstAttribute="leading" secondItem="1c1-7Q-WMG" secondAttribute="leading" id="A6T-ed-97T"/>
-                            <constraint firstItem="hcV-V0-eZB" firstAttribute="leading" secondItem="W5y-aT-UlI" secondAttribute="trailing" id="Aa4-Pg-Ioh"/>
-                            <constraint firstItem="1c1-7Q-WMG" firstAttribute="trailing" secondItem="nZr-nE-ths" secondAttribute="trailing" constant="20" id="DPW-MV-oKc"/>
-                            <constraint firstItem="7CJ-Q0-ABH" firstAttribute="centerX" secondItem="1c1-7Q-WMG" secondAttribute="centerX" id="EVx-ob-2bn"/>
-                            <constraint firstItem="nZr-nE-ths" firstAttribute="leading" secondItem="1c1-7Q-WMG" secondAttribute="leading" constant="20" id="SI9-xL-6s8"/>
-                            <constraint firstItem="iU2-DL-ICv" firstAttribute="top" secondItem="nZr-nE-ths" secondAttribute="bottom" constant="20" id="ZrF-wP-mwm"/>
-                            <constraint firstItem="iU2-DL-ICv" firstAttribute="leading" secondItem="1c1-7Q-WMG" secondAttribute="leading" id="aNT-a0-r8t"/>
-                            <constraint firstItem="1c1-7Q-WMG" firstAttribute="bottom" secondItem="W5y-aT-UlI" secondAttribute="bottom" id="ai8-AR-XYe"/>
-                            <constraint firstItem="7CJ-Q0-ABH" firstAttribute="top" secondItem="ouH-gK-Guv" secondAttribute="bottom" id="an1-EN-YiB"/>
-                            <constraint firstItem="1c1-7Q-WMG" firstAttribute="trailing" secondItem="W5y-aT-UlI" secondAttribute="trailing" multiplier="2" id="g0h-1g-A3R"/>
-                            <constraint firstItem="Dsj-Of-TI5" firstAttribute="leading" secondItem="1c1-7Q-WMG" secondAttribute="leading" id="gYm-lv-oVe"/>
-                            <constraint firstItem="1c1-7Q-WMG" firstAttribute="trailing" secondItem="hcV-V0-eZB" secondAttribute="trailing" id="heW-2p-hLJ"/>
-                            <constraint firstItem="W5y-aT-UlI" firstAttribute="leading" secondItem="1c1-7Q-WMG" secondAttribute="leading" id="kw6-l5-CAR"/>
-                            <constraint firstItem="nZr-nE-ths" firstAttribute="top" secondItem="1c1-7Q-WMG" secondAttribute="top" constant="15" id="oyJ-sj-j5N"/>
-                            <constraint firstItem="1c1-7Q-WMG" firstAttribute="trailing" secondItem="ouH-gK-Guv" secondAttribute="trailing" id="r1N-R6-iZg"/>
-                            <constraint firstItem="1c1-7Q-WMG" firstAttribute="trailing" secondItem="Dsj-Of-TI5" secondAttribute="trailing" id="tA5-3w-2U2"/>
-                            <constraint firstItem="W5y-aT-UlI" firstAttribute="top" secondItem="ouH-gK-Guv" secondAttribute="bottom" id="ywb-oW-pJe"/>
-                        </constraints>
-                    </view>
-                    <navigationItem key="navigationItem" id="Zon-2j-rsc"/>
-                    <size key="freeformSize" width="300" height="450"/>
-                    <connections>
-                        <outlet property="blackButton" destination="STo-4B-X2d" id="XwW-Q1-u9Y"/>
-                        <outlet property="cancelButton" destination="W5y-aT-UlI" id="P9l-o1-miU"/>
-                        <outlet property="chromaColorPickerView" destination="iU2-DL-ICv" id="iX8-Pq-EFB"/>
-                        <outlet property="darkmodeLabel" destination="AH4-ei-W3C" id="JvO-LN-BUu"/>
-                        <outlet property="darkmodeSwitch" destination="qCH-0e-MgJ" id="rjG-X5-eqA"/>
-                        <outlet property="defaultButton" destination="6Dy-77-TIC" id="PxM-tG-Ve7"/>
-                        <outlet property="greenButton" destination="ele-7I-DxL" id="vYB-cv-c6D"/>
-                        <outlet property="okButton" destination="hcV-V0-eZB" id="1VQ-qp-4Fs"/>
-                        <outlet property="orangeButton" destination="wje-qo-0av" id="LN8-3w-Wtx"/>
-                        <outlet property="redButton" destination="aan-mm-3h8" id="X89-dx-fGV"/>
-                        <outlet property="titleLabel" destination="nZr-nE-ths" id="UbA-Dl-0Ad"/>
-                        <outlet property="whiteButton" destination="3E4-fA-LuC" id="mNg-2f-rvs"/>
-                    </connections>
-                </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="qdm-Cl-C5l" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
-            </objects>
-            <point key="canvasLocation" x="1453.125" y="133.75"/>
-        </scene>
-    </scenes>
-    <resources>
-        <systemColor name="labelColor">
-            <color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-        </systemColor>
-        <systemColor name="systemBlueColor">
-            <color red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-        </systemColor>
-        <systemColor name="systemGray4Color">
-            <color red="0.81960784313725488" green="0.81960784313725488" blue="0.83921568627450982" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-        </systemColor>
-        <systemColor name="systemGray6Color">
-            <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-        </systemColor>
-        <systemColor name="systemGreenColor">
-            <color red="0.20392156862745098" green="0.7803921568627451" blue="0.34901960784313724" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-        </systemColor>
-        <systemColor name="systemOrangeColor">
-            <color red="1" green="0.58431372549019611" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-        </systemColor>
-        <systemColor name="systemRedColor">
-            <color red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-        </systemColor>
-    </resources>
-</document>

+ 0 - 298
iOSClient/Color/NCBackgroundImageColor.swift

@@ -1,298 +0,0 @@
-//
-//  NCBackgroundImageColor.swift
-//  Nextcloud
-//
-//  Created by Marino Faggiana on 05/05/21.
-//  Copyright © 2021 Marino Faggiana. All rights reserved.
-//
-//  Author Marino Faggiana <marino.faggiana@nextcloud.com>
-//
-//  This program is free software: you can redistribute it and/or modify
-//  it under the terms of the GNU General Public License as published by
-//  the Free Software Foundation, either version 3 of the License, or
-//  (at your option) any later version.
-//
-//  This program is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//  GNU General Public License for more details.
-//
-//  You should have received a copy of the GNU General Public License
-//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-
-import UIKit
-import ChromaColorPicker
-
-public protocol NCBackgroundImageColorDelegate: AnyObject {
-    func colorPickerCancel()
-    func colorPickerWillChange(color: UIColor)
-    func colorPickerDidChange(lightColor: String, darkColor: String)
-}
-
-// optional func
-public extension NCBackgroundImageColorDelegate {
-    func colorPickerCancel() {}
-    func colorPickerWillChange(color: UIColor) { }
-    func colorPickerDidChange(lightColor: String, darkColor: String) { }
-}
-
-class NCBackgroundImageColor: UIViewController {
-
-    @IBOutlet weak var titleLabel: UILabel!
-    @IBOutlet weak var chromaColorPickerView: UIView!
-
-    @IBOutlet weak var whiteButton: UIButton!
-    @IBOutlet weak var orangeButton: UIButton!
-    @IBOutlet weak var redButton: UIButton!
-    @IBOutlet weak var greenButton: UIButton!
-    @IBOutlet weak var blackButton: UIButton!
-
-    @IBOutlet weak var darkmodeLabel: UILabel!
-    @IBOutlet weak var darkmodeSwitch: UISwitch!
-
-    @IBOutlet weak var defaultButton: UIButton!
-    @IBOutlet weak var cancelButton: UIButton!
-    @IBOutlet weak var okButton: UIButton!
-
-    private let colorPicker = ChromaColorPicker()
-    private let brightnessSlider = ChromaBrightnessSlider()
-    private var colorHandle: ChromaColorHandle?
-    private let defaultColorPickerSize = CGSize(width: 200, height: 200)
-    private let brightnessSliderWidthHeightRatio: CGFloat = 0.1
-
-    weak var delegate: NCBackgroundImageColorDelegate?
-    var setupColor: UIColor?
-    var darkColor = "#000000"
-    var lightColor = "#FFFFFF"
-
-    let width: CGFloat = 300
-    let height: CGFloat = 450
-
-    // MARK: - View Life Cycle
-
-    override func viewDidLoad() {
-        super.viewDidLoad()
-
-        setupColorPicker()
-        setupBrightnessSlider()
-        setupColorPickerHandles()
-
-        titleLabel.text = NSLocalizedString("_background_", comment: "")
-        darkmodeLabel.text = NSLocalizedString("_dark_mode_", comment: "")
-
-        defaultButton.setTitle(NSLocalizedString("_default_color_", comment: ""), for: .normal)
-
-        cancelButton.setTitle(NSLocalizedString("_cancel_", comment: ""), for: .normal)
-        okButton.setTitle(NSLocalizedString("_ok_", comment: ""), for: .normal)
-
-        whiteButton.backgroundColor = .white
-        whiteButton.layer.cornerRadius = 5
-        whiteButton.layer.borderWidth = 0.5
-        whiteButton.layer.borderColor = NCBrandColor.shared.label.cgColor
-        whiteButton.layer.masksToBounds = true
-
-        orangeButton.backgroundColor = .orange
-        orangeButton.layer.cornerRadius = 5
-        orangeButton.layer.borderWidth = 0.5
-        orangeButton.layer.borderColor = NCBrandColor.shared.label.cgColor
-        orangeButton.layer.masksToBounds = true
-
-        redButton.backgroundColor = .red
-        redButton.layer.cornerRadius = 5
-        redButton.layer.borderWidth = 0.5
-        redButton.layer.borderColor = NCBrandColor.shared.label.cgColor
-        redButton.layer.masksToBounds = true
-
-        greenButton.backgroundColor = .green
-        greenButton.layer.cornerRadius = 5
-        greenButton.layer.borderWidth = 0.5
-        greenButton.layer.borderColor = NCBrandColor.shared.label.cgColor
-        greenButton.layer.masksToBounds = true
-
-        blackButton.backgroundColor = .black
-        blackButton.layer.cornerRadius = 5
-        blackButton.layer.borderWidth = 0.5
-        blackButton.layer.borderColor = NCBrandColor.shared.label.cgColor
-        blackButton.layer.masksToBounds = true
-
-        defaultButton.layer.cornerRadius = 15
-        defaultButton.layer.borderWidth = 0.5
-        defaultButton.layer.borderColor = UIColor.gray.cgColor
-        defaultButton.layer.masksToBounds = true
-    }
-
-    override func viewWillAppear(_ animated: Bool) {
-        super.viewWillAppear(animated)
-
-        if traitCollection.userInterfaceStyle == .dark {
-            darkmodeSwitch.isOn = true
-        } else {
-            darkmodeSwitch.isOn = false
-        }
-
-        // Color for all folders
-        if let activeAccount = NCManageDatabase.shared.getActiveAccount() {
-            if darkColor == "" {
-                darkColor = activeAccount.darkColorBackground
-            }
-            if lightColor == "" {
-                lightColor = activeAccount.lightColorBackground
-            }
-        }
-
-        // set color
-        if darkmodeSwitch.isOn {
-            if let color = UIColor(hex: darkColor) {
-                changeColor(color)
-            } else {
-                changeColor(.black)
-            }
-        } else {
-            if let color = UIColor(hex: lightColor) {
-                changeColor(color)
-            } else {
-                changeColor(.white)
-            }
-        }
-    }
-
-    // MARK: - Action
-
-    @IBAction func whiteButtonAction(_ sender: UIButton) {
-        changeColor(.white)
-    }
-
-    @IBAction func orangeButtonAction(_ sender: UIButton) {
-        changeColor(.orange)
-    }
-
-    @IBAction func redButtonAction(_ sender: UIButton) {
-        changeColor(.red)
-    }
-
-    @IBAction func greenButtonAction(_ sender: UIButton) {
-        changeColor(.green)
-    }
-
-    @IBAction func blackButtonAction(_ sender: UIButton) {
-        changeColor(.black)
-    }
-
-    @IBAction func darkmodeAction(_ sender: UISwitch) {
-
-        if sender.isOn {
-            if darkColor == "" {
-                changeColor(.black)
-            } else {
-                if let color = UIColor(hex: darkColor) {
-                    changeColor(color)
-                }
-            }
-        } else {
-            if lightColor == "" {
-                changeColor(.white)
-            } else {
-                if let color = UIColor(hex: lightColor) {
-                    changeColor(color)
-                }
-            }
-        }
-    }
-
-    @IBAction func defaultAction(_ sender: Any) {
-
-        if darkmodeSwitch.isOn {
-            darkColor = "#000000"
-            changeColor(.black)
-        } else {
-            lightColor = "#FFFFFF"
-            changeColor(.white)
-        }
-    }
-
-    @IBAction func cancelAction(_ sender: Any) {
-
-        self.delegate?.colorPickerCancel()
-        dismiss(animated: true)
-    }
-
-    @IBAction func okAction(_ sender: Any) {
-
-        var lightColor = self.lightColor
-        var darkColor = self.darkColor
-
-        if lightColor == "#FFFFFF" { lightColor = "" }
-        if darkColor == "#000000" { darkColor = "" }
-
-        self.delegate?.colorPickerDidChange(lightColor: lightColor, darkColor: darkColor)
-
-        dismiss(animated: true)
-    }
-
-    // MARK: - ChromaColorPicker
-
-    private func setupColorPicker() {
-        colorPicker.delegate = self
-        colorPicker.translatesAutoresizingMaskIntoConstraints = false
-        view.addSubview(colorPicker)
-
-        NSLayoutConstraint.activate([
-            colorPicker.leadingAnchor.constraint(equalTo: chromaColorPickerView.leadingAnchor, constant: 20),
-            colorPicker.topAnchor.constraint(equalTo: chromaColorPickerView.topAnchor),
-            colorPicker.widthAnchor.constraint(equalToConstant: defaultColorPickerSize.width),
-            colorPicker.heightAnchor.constraint(equalToConstant: defaultColorPickerSize.height)
-        ])
-    }
-
-    private func setupBrightnessSlider() {
-        brightnessSlider.connect(to: colorPicker)
-
-        // Style
-        brightnessSlider.trackColor = UIColor.blue
-        brightnessSlider.handle.borderWidth = 3.0 // Example of customizing the handle's properties.
-
-        // Layout
-        brightnessSlider.translatesAutoresizingMaskIntoConstraints = false
-        view.addSubview(brightnessSlider)
-
-        NSLayoutConstraint.activate([
-            brightnessSlider.centerXAnchor.constraint(equalTo: colorPicker.centerXAnchor),
-            brightnessSlider.topAnchor.constraint(equalTo: colorPicker.bottomAnchor, constant: 20),
-            brightnessSlider.widthAnchor.constraint(equalTo: colorPicker.widthAnchor, multiplier: 1),
-            brightnessSlider.heightAnchor.constraint(equalTo: brightnessSlider.widthAnchor, multiplier: brightnessSliderWidthHeightRatio)
-        ])
-    }
-
-    private func setupColorPickerHandles() {
-        colorHandle = colorPicker.addHandle(at: setupColor)
-    }
-
-    private func changeColor(_ color: UIColor) {
-
-        colorHandle?.color = color
-        colorPicker.setNeedsLayout()
-        brightnessSlider.trackColor = color
-
-        if darkmodeSwitch.isOn {
-            darkColor = color.hexString
-        } else {
-            lightColor = color.hexString
-        }
-
-        self.delegate?.colorPickerWillChange(color: color)
-    }
-}
-
-extension NCBackgroundImageColor: ChromaColorPickerDelegate {
-    func colorPickerHandleDidChange(_ colorPicker: ChromaColorPicker, handle: ChromaColorHandle, to color: UIColor) {
-
-        if darkmodeSwitch.isOn {
-            darkColor = color.hexString
-        } else {
-            lightColor = color.hexString
-        }
-
-        self.delegate?.colorPickerWillChange(color: color)
-    }
-}

+ 3 - 3
iOSClient/Color/NCColorPicker.storyboard

@@ -89,7 +89,7 @@
                                 </constraints>
                                 <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                 <connections>
-                                    <action selector="yellowButtonAction:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="suP-DD-70c"/>
+                                    <action selector="blackButtonAction:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="M8N-Pu-LSN"/>
                                 </connections>
                             </button>
                             <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gSF-6R-gbh">
@@ -193,6 +193,8 @@
                         </constraints>
                     </view>
                     <connections>
+                        <outlet property="blackButton" destination="I9w-cx-QlY" id="lB1-aF-eee"/>
+                        <outlet property="blackText" destination="gSF-6R-gbh" id="Jll-za-OcY"/>
                         <outlet property="blueButton" destination="C2a-jB-FVB" id="lIY-Ag-Nkv"/>
                         <outlet property="blueText" destination="Dmu-fr-Dtf" id="aRt-Mp-vYQ"/>
                         <outlet property="defaultButton" destination="Uaq-hC-U4a" id="t6X-aV-hPF"/>
@@ -207,8 +209,6 @@
                         <outlet property="redText" destination="p7z-g7-hkV" id="FiU-ZR-JxH"/>
                         <outlet property="violaButton" destination="dOn-SY-wnl" id="XFX-c3-ky3"/>
                         <outlet property="violaText" destination="DoG-RI-jcO" id="axQ-8d-eQr"/>
-                        <outlet property="yellowButton" destination="I9w-cx-QlY" id="wOl-Pu-9FD"/>
-                        <outlet property="yellowText" destination="gSF-6R-gbh" id="YWk-et-MCu"/>
                     </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>

+ 8 - 8
iOSClient/Color/NCColorPicker.swift

@@ -15,7 +15,7 @@ class NCColorPicker: UIViewController {
     @IBOutlet weak var redButton: UIButton!
     @IBOutlet weak var violaButton: UIButton!
     @IBOutlet weak var blueButton: UIButton!
-    @IBOutlet weak var yellowButton: UIButton!
+    @IBOutlet weak var blackButton: UIButton!
     @IBOutlet weak var greenButton: UIButton!
     @IBOutlet weak var grayButton: UIButton!
     @IBOutlet weak var defaultButton: UIButton!
@@ -24,7 +24,7 @@ class NCColorPicker: UIViewController {
     @IBOutlet weak var redText: UITextField!
     @IBOutlet weak var violaText: UITextField!
     @IBOutlet weak var blueText: UITextField!
-    @IBOutlet weak var yellowText: UITextField!
+    @IBOutlet weak var blackText: UITextField!
     @IBOutlet weak var greenText: UITextField!
     @IBOutlet weak var grayText: UITextField!
     @IBOutlet weak var defaultLabel: UILabel!
@@ -56,10 +56,10 @@ class NCColorPicker: UIViewController {
         blueButton.layer.masksToBounds = true
         blueText.text = NSLocalizedString("_blue_", comment: "")
 
-        yellowButton.backgroundColor = .yellow
-        yellowButton.layer.cornerRadius = 5
-        yellowButton.layer.masksToBounds = true
-        yellowText.text = NSLocalizedString("_yellow_", comment: "")
+        blackButton.backgroundColor = .black
+        blackButton.layer.cornerRadius = 5
+        blackButton.layer.masksToBounds = true
+        blackText.text = NSLocalizedString("_black_", comment: "")
 
         greenButton.backgroundColor = .green
         greenButton.layer.cornerRadius = 5
@@ -93,8 +93,8 @@ class NCColorPicker: UIViewController {
         updateColor(hexColor: UIColor.blue.hexString)
     }
 
-    @IBAction func yellowButtonAction(_ sender: UIButton) {
-        updateColor(hexColor: UIColor.yellow.hexString)
+    @IBAction func blackButtonAction(_ sender: UIButton) {
+        updateColor(hexColor: UIColor.black.hexString)
     }
 
     @IBAction func greenButtonAction(_ sender: UIButton) {

+ 0 - 4
iOSClient/Data/NCDatabase.swift

@@ -85,10 +85,6 @@ class tableAccount: Object, NCUserBaseUrl {
     @objc dynamic var website = ""
     @objc dynamic var zip = ""
 
-    // COLOR Files
-    @objc dynamic var darkColorBackground = ""
-    @objc dynamic var lightColorBackground = ""
-
     // HC
     @objc dynamic var hcIsTrial: Bool = false
     @objc dynamic var hcTrialExpired: Bool = false

+ 0 - 16
iOSClient/Data/NCManageDatabase+Account.swift

@@ -426,20 +426,4 @@ extension NCManageDatabase {
             NCCommunicationCommon.shared.writeLog("Could not write to database: \(error)")
         }
     }
-
-    @objc func setAccountColorFiles(lightColorBackground: String, darkColorBackground: String) {
-
-        let realm = try! Realm()
-
-        do {
-            try realm.safeWrite {
-                if let result = realm.objects(tableAccount.self).filter("active == true").first {
-                    result.lightColorBackground = lightColorBackground
-                    result.darkColorBackground = darkColorBackground
-                }
-            }
-        } catch let error {
-            NCCommunicationCommon.shared.writeLog("Could not write to database: \(error)")
-        }
-    }
 }

+ 4 - 49
iOSClient/Main/Collection Common/NCCollectionViewCommon.swift

@@ -26,7 +26,7 @@ import Realm
 import NCCommunication
 import EasyTipView
 
-class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UISearchResultsUpdating, UISearchControllerDelegate, UISearchBarDelegate, NCListCellDelegate, NCGridCellDelegate, NCSectionHeaderMenuDelegate, NCSectionFooterDelegate, UIAdaptivePresentationControllerDelegate, NCEmptyDataSetDelegate, UIContextMenuInteractionDelegate, NCAccountRequestDelegate, NCBackgroundImageColorDelegate, NCSelectableNavigationView {
+class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UISearchResultsUpdating, UISearchControllerDelegate, UISearchBarDelegate, NCListCellDelegate, NCGridCellDelegate, NCSectionHeaderMenuDelegate, NCSectionFooterDelegate, UIAdaptivePresentationControllerDelegate, NCEmptyDataSetDelegate, UIContextMenuInteractionDelegate, NCAccountRequestDelegate, NCSelectableNavigationView {
 
     @IBOutlet weak var collectionView: UICollectionView!
 
@@ -330,18 +330,9 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         refreshControl.tintColor = .gray
 
         // COLOR BACKGROUND
-        let activeAccount = NCManageDatabase.shared.getActiveAccount()
-        if traitCollection.userInterfaceStyle == .dark {
-            if activeAccount?.darkColorBackground != "" {
-                collectionView.backgroundColor = UIColor(hex: activeAccount?.darkColorBackground ?? "")
-            } else {
-                collectionView.backgroundColor = NCBrandColor.shared.systemBackground
-            }
-        } else {
-           if activeAccount?.lightColorBackground != "" {
-                collectionView.backgroundColor = UIColor(hex: activeAccount?.lightColorBackground ?? "")
-            } else {
-                collectionView.backgroundColor = NCBrandColor.shared.systemBackground
+        if let tableDirectory = NCManageDatabase.shared.getTableDirectory(predicate: NSPredicate(format: "account == %@ AND serverUrl == %@", appDelegate.account, self.serverUrl)) {
+            if let colorBackground = tableDirectory.colorBackground, let color = UIColor(hex: colorBackground)  {
+                collectionView.backgroundColor = color
             }
         }
     }
@@ -719,22 +710,6 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         return userAlias
     }
 
-    // MARK: - BackgroundImageColor Delegate
-
-    func colorPickerCancel() {
-        changeTheming()
-    }
-
-    func colorPickerWillChange(color: UIColor) {
-        collectionView.backgroundColor = color
-    }
-
-    func colorPickerDidChange(lightColor: String, darkColor: String) {
-
-        NCManageDatabase.shared.setAccountColorFiles(lightColorBackground: lightColor, darkColorBackground: darkColor)
-        changeTheming()
-    }
-
     // MARK: - Empty
 
     func emptyDataSetView(_ view: NCEmptyView) {
@@ -1003,26 +978,6 @@ class NCCollectionViewCommon: UIViewController, UIGestureRecognizerDelegate, UIS
         NCFunctionCenter.shared.pastePasteboard(serverUrl: serverUrl)
     }
 
-    /*
-    @objc func backgroundFilesMenu() {
-
-        if let vcBackgroundImageColor = UIStoryboard(name: "NCBackgroundImageColor", bundle: nil).instantiateInitialViewController() as? NCBackgroundImageColor {
-
-            vcBackgroundImageColor.delegate = self
-            vcBackgroundImageColor.setupColor = collectionView.backgroundColor
-            if let activeAccount = NCManageDatabase.shared.getActiveAccount() {
-                vcBackgroundImageColor.lightColor = activeAccount.lightColorBackground
-                vcBackgroundImageColor.darkColor = activeAccount.darkColorBackground
-            }
-
-            let popup = NCPopupViewController(contentController: vcBackgroundImageColor, popupWidth: vcBackgroundImageColor.width, popupHeight: vcBackgroundImageColor.height)
-            popup.backgroundAlpha = 0
-
-            self.present(popup, animated: true)
-        }
-    }
-    */
-
     // MARK: - DataSource + NC Endpoint
 
     @objc func reloadDataSource(forced: Bool = true) {

+ 1 - 1
iOSClient/NCGlobal.swift

@@ -113,7 +113,7 @@ class NCGlobal: NSObject {
     // Database Realm
     //
     let databaseDefault                             = "nextcloud.realm"
-    let databaseSchemaVersion: UInt64               = 233
+    let databaseSchemaVersion: UInt64               = 234
 
     // Intro selector
     //