Design lock view in file provider ui
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 30 Jul 2024 09:42:39 +0000 (17:42 +0800)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Thu, 12 Sep 2024 07:50:50 +0000 (09:50 +0200)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.swift
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.xib

index 71f318715321beef21468f997754c4be6300d6c8..03a7b184af0264f3d5fe84a2035bf9ac625c7efc 100644 (file)
@@ -15,6 +15,12 @@ class LockViewController: NSViewController {
     let itemIdentifiers: [NSFileProviderItemIdentifier]
     let locking: Bool
 
+    @IBOutlet weak var fileNameIcon: NSImageView!
+    @IBOutlet weak var fileNameLabel: NSTextField!
+    @IBOutlet weak var descriptionLabel: NSTextField!
+    @IBOutlet weak var closeButton: NSButton!
+    @IBOutlet weak var loadingIndicator: NSProgressIndicator!
+
     init(_ itemIdentifiers: [NSFileProviderItemIdentifier], locking: Bool) {
         self.itemIdentifiers = itemIdentifiers
         self.locking = locking
index 0f40790ecb7ad4620e2cc3f1c7e1c87407e2694a..61843b01c13dd760811912f7784b215cd5ebf5b1 100644 (file)
     <dependencies>
         <deployment identifier="macosx"/>
         <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22690"/>
+        <capability name="Image references" minToolsVersion="12.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="LockViewController" customModule="FileProviderUIExt" customModuleProvider="target"/>
+        <customObject id="-2" userLabel="File's Owner" customClass="LockViewController" customModule="FileProviderUIExt" customModuleProvider="target">
+            <connections>
+                <outlet property="closeButton" destination="7qN-mr-hAh" id="NkY-2f-Ltx"/>
+                <outlet property="descriptionLabel" destination="DG3-ti-eu7" id="rez-CW-FUS"/>
+                <outlet property="fileNameIcon" destination="KlP-OW-SKo" id="Dey-vA-qIG"/>
+                <outlet property="fileNameLabel" destination="LDe-7m-hvL" id="AzB-UH-ndO"/>
+                <outlet property="loadingIndicator" destination="UWQ-uR-PJA" id="Swv-It-LT9"/>
+            </connections>
+        </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <stackView distribution="fill" orientation="horizontal" alignment="top" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" id="Ge9-bk-WPE">
-            <rect key="frame" x="0.0" y="0.0" width="200" height="110"/>
+        <stackView distribution="fill" orientation="horizontal" alignment="centerY" spacing="82" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" id="Ge9-bk-WPE">
+            <rect key="frame" x="0.0" y="0.0" width="380" height="84"/>
             <autoresizingMask key="autoresizingMask"/>
-            <nil name="visibilityPriorities"/>
-            <point key="canvasLocation" x="-362" y="-32"/>
+            <subviews>
+                <progressIndicator maxValue="100" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="UWQ-uR-PJA">
+                    <rect key="frame" x="10" y="26" width="32" height="32"/>
+                    <constraints>
+                        <constraint firstAttribute="width" constant="32" id="ShG-G9-AMJ"/>
+                        <constraint firstAttribute="width" secondItem="UWQ-uR-PJA" secondAttribute="height" multiplier="1:1" id="Tcq-dQ-mHX"/>
+                    </constraints>
+                </progressIndicator>
+                <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="KlP-OW-SKo">
+                    <rect key="frame" x="52" y="6.5" width="64" height="71"/>
+                    <constraints>
+                        <constraint firstAttribute="width" secondItem="KlP-OW-SKo" secondAttribute="height" multiplier="1:1" id="u2z-cf-k5P"/>
+                        <constraint firstAttribute="width" constant="64" id="ucZ-Lb-C49"/>
+                    </constraints>
+                    <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyUpOrDown" image="doc" catalog="system" id="sA8-Dn-b0s"/>
+                </imageView>
+                <stackView distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dpJ-oy-su9">
+                    <rect key="frame" x="126" y="21" width="202" height="43"/>
+                    <subviews>
+                        <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" verticalCompressionResistancePriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="LDe-7m-hvL">
+                            <rect key="frame" x="-2" y="24" width="206" height="19"/>
+                            <textFieldCell key="cell" lineBreakMode="clipping" title="Locking file filename.txt…" id="Zld-Ku-SeH">
+                                <font key="font" metaFont="systemBold" size="16"/>
+                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                            </textFieldCell>
+                        </textField>
+                        <textField focusRingType="none" verticalHuggingPriority="749" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="DG3-ti-eu7">
+                            <rect key="frame" x="-2" y="0.0" width="180" height="16"/>
+                            <textFieldCell key="cell" selectable="YES" title="Communicating with server..." id="tz0-OE-Too">
+                                <font key="font" metaFont="system"/>
+                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                            </textFieldCell>
+                        </textField>
+                    </subviews>
+                    <constraints>
+                        <constraint firstAttribute="width" relation="lessThanOrEqual" constant="300" id="NrA-4O-5Cz"/>
+                    </constraints>
+                    <visibilityPriorities>
+                        <integer value="1000"/>
+                        <integer value="1000"/>
+                    </visibilityPriorities>
+                    <customSpacing>
+                        <real value="3.4028234663852886e+38"/>
+                        <real value="3.4028234663852886e+38"/>
+                    </customSpacing>
+                </stackView>
+                <button translatesAutoresizingMaskIntoConstraints="NO" id="7qN-mr-hAh">
+                    <rect key="frame" x="338" y="21" width="32" height="43"/>
+                    <buttonCell key="cell" type="bevel" title="Close" bezelStyle="rounded" imagePosition="only" alignment="center" imageScaling="proportionallyDown" inset="2" id="7Oc-Xd-RzM">
+                        <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                        <font key="font" metaFont="system"/>
+                        <imageReference key="image" image="xmark.circle.fill" catalog="system" symbolScale="large"/>
+                    </buttonCell>
+                    <constraints>
+                        <constraint firstAttribute="width" secondItem="7qN-mr-hAh" secondAttribute="height" multiplier="1:1" id="K00-Bi-dEy"/>
+                        <constraint firstAttribute="width" constant="32" id="zVJ-h1-QXJ"/>
+                    </constraints>
+                </button>
+            </subviews>
+            <edgeInsets key="edgeInsets" left="10" right="10" top="10" bottom="10"/>
+            <constraints>
+                <constraint firstItem="7qN-mr-hAh" firstAttribute="leading" secondItem="dpJ-oy-su9" secondAttribute="trailing" constant="10" id="0kg-rO-3s6"/>
+                <constraint firstItem="KlP-OW-SKo" firstAttribute="leading" secondItem="UWQ-uR-PJA" secondAttribute="trailing" constant="10" id="729-KY-1ZO"/>
+                <constraint firstAttribute="trailing" secondItem="7qN-mr-hAh" secondAttribute="trailing" constant="10" id="8le-E0-ewY"/>
+                <constraint firstItem="UWQ-uR-PJA" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Ge9-bk-WPE" secondAttribute="top" constant="10" id="GVS-2N-A5a"/>
+                <constraint firstAttribute="bottom" secondItem="KlP-OW-SKo" secondAttribute="bottom" constant="10" id="Gaf-KL-ad2"/>
+                <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="UWQ-uR-PJA" secondAttribute="bottom" constant="10" id="Ij8-Hs-jUO"/>
+                <constraint firstItem="KlP-OW-SKo" firstAttribute="top" secondItem="Ge9-bk-WPE" secondAttribute="top" constant="10" id="iJh-j0-HpH"/>
+                <constraint firstItem="UWQ-uR-PJA" firstAttribute="leading" secondItem="Ge9-bk-WPE" secondAttribute="leading" constant="10" id="kFD-ha-gp6"/>
+                <constraint firstItem="dpJ-oy-su9" firstAttribute="leading" secondItem="KlP-OW-SKo" secondAttribute="trailing" constant="10" id="tmh-RY-Zz1"/>
+            </constraints>
+            <visibilityPriorities>
+                <integer value="1000"/>
+                <integer value="1000"/>
+                <integer value="1000"/>
+                <integer value="1000"/>
+            </visibilityPriorities>
+            <customSpacing>
+                <real value="3.4028234663852886e+38"/>
+                <real value="3.4028234663852886e+38"/>
+                <real value="3.4028234663852886e+38"/>
+                <real value="3.4028234663852886e+38"/>
+            </customSpacing>
+            <point key="canvasLocation" x="-473.5" y="-32"/>
         </stackView>
     </objects>
+    <resources>
+        <image name="doc" catalog="system" width="14" height="16"/>
+        <image name="xmark.circle.fill" catalog="system" width="20" height="20"/>
+    </resources>
 </document>