mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 12:00:09 +02:00
✨ Secure and unsecure, new search bar (#58)
This commit is contained in:
@ -737,6 +737,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.0;
|
||||
MARKETING_VERSION = "4.1-beta2";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@ -761,6 +762,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.0;
|
||||
MARKETING_VERSION = "4.1-beta2";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 448 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<path d="M400,224L376,224L376,152C376,68.2 307.8,0 224,0C140.2,0 72,68.2 72,152L72,224L48,224C21.5,224 0,245.5 0,272L0,464C0,490.5 21.5,512 48,512L400,512C426.5,512 448,490.5 448,464L448,272C448,245.5 426.5,224 400,224ZM296,224L152,224L152,152C152,112.3 184.3,80 224,80C263.7,80 296,112.3 296,152L296,224Z" style="fill:rgb(0,192,56);fill-rule:nonzero;"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 811 B |
@ -5,7 +5,7 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "GreenLock.svg",
|
||||
"filename" : "link.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
@ -17,5 +17,8 @@
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
}
|
||||
}
|
1
phpmon/Assets.xcassets/IconLinked.imageset/link.svg
vendored
Normal file
1
phpmon/Assets.xcassets/IconLinked.imageset/link.svg
vendored
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"/></svg>
|
After Width: | Height: | Size: 1.5 KiB |
@ -5,7 +5,7 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "RedLock.svg",
|
||||
"filename" : "car-alt.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
@ -17,5 +17,8 @@
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
}
|
||||
}
|
1
phpmon/Assets.xcassets/IconParked.imageset/car-alt.svg
vendored
Normal file
1
phpmon/Assets.xcassets/IconParked.imageset/car-alt.svg
vendored
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 480 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M438.66 212.33l-11.24-28.1-19.93-49.83C390.38 91.63 349.57 64 303.5 64h-127c-46.06 0-86.88 27.63-103.99 70.4l-19.93 49.83-11.24 28.1C17.22 221.5 0 244.66 0 272v48c0 16.12 6.16 30.67 16 41.93V416c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h256v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-54.07c9.84-11.25 16-25.8 16-41.93v-48c0-27.34-17.22-50.5-41.34-59.67zm-306.73-54.16c7.29-18.22 24.94-30.17 44.57-30.17h127c19.63 0 37.28 11.95 44.57 30.17L368 208H112l19.93-49.83zM80 319.8c-19.2 0-32-12.76-32-31.9S60.8 256 80 256s48 28.71 48 47.85-28.8 15.95-48 15.95zm320 0c-19.2 0-48 3.19-48-15.95S380.8 256 400 256s32 12.76 32 31.9-12.8 31.9-32 31.9z"/></svg>
|
After Width: | Height: | Size: 918 B |
@ -5,7 +5,7 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "search.svg",
|
||||
"filename" : "lock.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
@ -17,5 +17,8 @@
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
}
|
||||
}
|
1
phpmon/Assets.xcassets/Lock.imageset/lock.svg
vendored
Normal file
1
phpmon/Assets.xcassets/Lock.imageset/lock.svg
vendored
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"/></svg>
|
After Width: | Height: | Size: 472 B |
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 448 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<path d="M400,224L376,224L376,152C376,68.2 307.8,0 224,0C140.2,0 72,68.2 72,152L72,224L48,224C21.5,224 0,245.5 0,272L0,464C0,490.5 21.5,512 48,512L400,512C426.5,512 448,490.5 448,464L448,272C448,245.5 426.5,224 400,224ZM296,224L152,224L152,152C152,112.3 184.3,80 224,80C263.7,80 296,112.3 296,152L296,224Z" style="fill:rgb(255,43,20);fill-rule:nonzero;"/>
|
||||
<g transform="matrix(0.549498,0.549498,-0.549498,0.549498,300.93,41.1032)">
|
||||
<g transform="matrix(1,0,0,1,-19,26)">
|
||||
<rect x="113" y="325" width="276" height="42" style="fill:white;"/>
|
||||
</g>
|
||||
<g transform="matrix(6.12323e-17,-1,1,6.12323e-17,-114,623)">
|
||||
<rect x="113" y="325" width="276" height="42" style="fill:white;"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.2 KiB |
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
||||
<path d="M505,442.7L405.3,343C400.8,338.5 394.7,336 388.3,336L372,336C399.6,300.7 416,256.3 416,208C416,93.1 322.9,0 208,0C93.1,0 0,93.1 0,208C0,322.9 93.1,416 208,416C256.3,416 300.7,399.6 336,372L336,388.3C336,394.7 338.5,400.8 343,405.3L442.7,505C452.1,514.4 467.3,514.4 476.6,505L504.9,476.7C514.3,467.3 514.3,452.1 505,442.7ZM208,336C137.3,336 80,278.8 80,208C80,137.3 137.2,80 208,80C278.7,80 336,137.2 336,208C336,278.7 278.8,336 208,336Z" style="fill:rgb(191,191,191);fill-rule:nonzero;"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 954 B |
@ -3,6 +3,7 @@
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19455"/>
|
||||
<capability name="Search Toolbar Item" minToolsVersion="12.0" minSystemVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
@ -518,7 +519,7 @@ Gw
|
||||
<!--Window Controller-->
|
||||
<scene sceneID="4XS-kY-YIS">
|
||||
<objects>
|
||||
<windowController storyboardIdentifier="siteListWindow" id="8Ec-9q-82s" customClass="SiteListWC" sceneMemberID="viewController">
|
||||
<windowController storyboardIdentifier="siteListWindow" id="8Ec-9q-82s" customClass="SiteListWC" customModule="PHP_Monitor" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" id="raw-02-3Q1">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
@ -528,34 +529,54 @@ Gw
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="262"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</view>
|
||||
<toolbar key="toolbar" implicitIdentifier="594015E3-8428-4926-9341-4B8CE4C7E373" autosavesConfiguration="NO" displayMode="iconOnly" sizeMode="regular" id="OOz-oZ-vlN">
|
||||
<allowedToolbarItems>
|
||||
<searchToolbarItem implicitItemIdentifier="AA306E78-6DF1-4567-8EE9-4AEB9D23CB9D" label="Search" paletteLabel="Search" visibilityPriority="1001" id="clO-Y6-CdX">
|
||||
<nil key="toolTip"/>
|
||||
<searchField key="view" verticalHuggingPriority="750" textCompletion="NO" id="5ZH-Q1-kKs">
|
||||
<rect key="frame" x="0.0" y="0.0" width="100" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" usesSingleLineMode="YES" bezelStyle="round" sendsSearchStringImmediately="YES" id="yBe-v6-HqL">
|
||||
<font key="font" usesAppearanceFont="YES"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</searchFieldCell>
|
||||
</searchField>
|
||||
</searchToolbarItem>
|
||||
</allowedToolbarItems>
|
||||
<defaultToolbarItems>
|
||||
<searchToolbarItem reference="clO-Y6-CdX"/>
|
||||
</defaultToolbarItems>
|
||||
</toolbar>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="8Ec-9q-82s" id="xEM-aj-eHL"/>
|
||||
</connections>
|
||||
</window>
|
||||
<connections>
|
||||
<outlet property="searchToolbarItem" destination="clO-Y6-CdX" id="LU0-5d-OHS"/>
|
||||
<segue destination="JZI-Vd-9oq" kind="relationship" relationship="window.shadowedContentViewController" id="9Gy-Gw-hPH"/>
|
||||
</connections>
|
||||
</windowController>
|
||||
<customObject id="VCP-dF-cqM" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-374" y="709"/>
|
||||
<point key="canvasLocation" x="-374" y="774"/>
|
||||
</scene>
|
||||
<!--Site ListVC-->
|
||||
<scene sceneID="aZt-6w-TFl">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="siteList" id="JZI-Vd-9oq" customClass="SiteListVC" customModule="PHP_Monitor" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" misplaced="YES" id="rIZ-4U-bhj">
|
||||
<rect key="frame" x="0.0" y="0.0" width="529" height="415"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="529" height="352"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<scrollView autohidesScrollers="YES" horizontalLineScroll="69" horizontalPageScroll="10" verticalLineScroll="69" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p0j-eB-I2i">
|
||||
<rect key="frame" x="0.0" y="0.0" width="529" height="372"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="529" height="352"/>
|
||||
<clipView key="contentView" id="6IL-DW-37w">
|
||||
<rect key="frame" x="1" y="1" width="527" height="370"/>
|
||||
<rect key="frame" x="1" y="1" width="527" height="350"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" multipleSelection="NO" autosaveColumns="NO" rowHeight="69" rowSizeStyle="automatic" viewBased="YES" id="cp3-34-pQj">
|
||||
<rect key="frame" x="0.0" y="0.0" width="527" height="370"/>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" multipleSelection="NO" autosaveColumns="NO" rowHeight="69" rowSizeStyle="automatic" viewBased="YES" id="cp3-34-pQj">
|
||||
<rect key="frame" x="0.0" y="0.0" width="527" height="350"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<size key="intercellSpacing" width="17" height="0.0"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
@ -599,46 +620,73 @@ Gw
|
||||
<constraint firstAttribute="width" constant="16" id="Bmk-CN-Yyn"/>
|
||||
<constraint firstAttribute="height" constant="16" id="d4z-lb-Ww0"/>
|
||||
</constraints>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="GreenLock" id="aJ0-ia-YrZ"/>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="Lock" id="aJ0-ia-YrZ"/>
|
||||
</imageView>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Uyv-Cs-wjO">
|
||||
<rect key="frame" x="440" y="28" width="62" height="14"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Linked Site" id="DIn-VE-rO6">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YUU-Hg-chL">
|
||||
<rect key="frame" x="362" y="25" width="65" height="20"/>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jKi-Ls-7FZ">
|
||||
<rect key="frame" x="423" y="36" width="79" height="11"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="rSA-sX-afj"/>
|
||||
<constraint firstAttribute="width" constant="75" id="RuE-IX-D3c"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="PHP 8.0" id="d9R-tV-Dlk">
|
||||
<font key="font" metaFont="systemMedium" size="15"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="DRIVER TYPE" id="fjd-eb-itv">
|
||||
<font key="font" metaFont="miniSystem"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TbX-e2-3QL">
|
||||
<rect key="frame" x="423" y="21" width="41" height="16"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Driver" id="GMt-SG-vFl">
|
||||
<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>
|
||||
<box verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="syz-LF-l6P">
|
||||
<rect key="frame" x="0.0" y="-2" width="510" height="5"/>
|
||||
</box>
|
||||
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="YUU-Hg-chL">
|
||||
<rect key="frame" x="301" y="27" width="51" height="14"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="PHP 8.0" id="d9R-tV-Dlk">
|
||||
<font key="font" metaFont="system" size="11"/>
|
||||
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0NQ-ZD-CqD">
|
||||
<rect key="frame" x="399" y="26" width="18" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="18" id="Suw-gm-AEi"/>
|
||||
<constraint firstAttribute="height" constant="18" id="qO6-vg-5nC"/>
|
||||
</constraints>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="IconLinked" id="2ng-pK-kvv"/>
|
||||
<color key="contentTintColor" name="tertiaryLabelColor" catalog="System" colorSpace="catalog"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="TbX-e2-3QL" firstAttribute="leading" secondItem="0NQ-ZD-CqD" secondAttribute="trailing" constant="8" symbolic="YES" id="4cb-D9-8d1"/>
|
||||
<constraint firstItem="XJL-Uw-frD" firstAttribute="leading" secondItem="QPX-eu-eV8" secondAttribute="trailing" constant="15" id="55y-3V-RYt"/>
|
||||
<constraint firstItem="Uyv-Cs-wjO" firstAttribute="centerY" secondItem="5GY-nN-BWd" secondAttribute="centerY" id="7s1-ZB-q0F"/>
|
||||
<constraint firstItem="syz-LF-l6P" firstAttribute="leading" secondItem="5GY-nN-BWd" secondAttribute="leading" id="8QK-nf-Fiw"/>
|
||||
<constraint firstItem="QPX-eu-eV8" firstAttribute="top" secondItem="XJL-Uw-frD" secondAttribute="top" constant="3" id="9QB-jZ-k1V"/>
|
||||
<constraint firstItem="YUU-Hg-chL" firstAttribute="centerY" secondItem="5GY-nN-BWd" secondAttribute="centerY" id="BLi-JF-LuQ"/>
|
||||
<constraint firstItem="TbX-e2-3QL" firstAttribute="top" secondItem="jKi-Ls-7FZ" secondAttribute="bottom" constant="-1" id="J29-wT-Uex"/>
|
||||
<constraint firstItem="XJL-Uw-frD" firstAttribute="leading" secondItem="5GY-nN-BWd" secondAttribute="leading" constant="48" id="Kns-wj-vAJ"/>
|
||||
<constraint firstItem="CXK-Q9-CpO" firstAttribute="leading" secondItem="XJL-Uw-frD" secondAttribute="leading" id="Ojw-VZ-3EG"/>
|
||||
<constraint firstAttribute="trailing" secondItem="syz-LF-l6P" secondAttribute="trailing" id="PWd-5k-AlD"/>
|
||||
<constraint firstItem="XJL-Uw-frD" firstAttribute="top" secondItem="5GY-nN-BWd" secondAttribute="top" constant="15" id="QeE-c7-I9U"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Uyv-Cs-wjO" secondAttribute="trailing" constant="10" id="RCh-KS-hqe"/>
|
||||
<constraint firstAttribute="trailing" secondItem="jKi-Ls-7FZ" secondAttribute="trailing" constant="10" id="Uhk-Dy-c65"/>
|
||||
<constraint firstItem="0NQ-ZD-CqD" firstAttribute="centerY" secondItem="5GY-nN-BWd" secondAttribute="centerY" id="Utr-aa-tqX"/>
|
||||
<constraint firstItem="CXK-Q9-CpO" firstAttribute="top" secondItem="XJL-Uw-frD" secondAttribute="bottom" id="VKg-Vq-sYa"/>
|
||||
<constraint firstItem="Uyv-Cs-wjO" firstAttribute="leading" secondItem="YUU-Hg-chL" secondAttribute="trailing" constant="17" id="ZgE-sh-azb"/>
|
||||
<constraint firstItem="TbX-e2-3QL" firstAttribute="centerY" secondItem="5GY-nN-BWd" secondAttribute="centerY" constant="6" id="cN8-zO-fnc"/>
|
||||
<constraint firstAttribute="bottom" secondItem="syz-LF-l6P" secondAttribute="bottom" id="gj7-cJ-Lle"/>
|
||||
<constraint firstItem="jKi-Ls-7FZ" firstAttribute="leading" secondItem="TbX-e2-3QL" secondAttribute="leading" id="zjN-s3-2Ww"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="imageViewLock" destination="QPX-eu-eV8" id="Nnh-kB-adG"/>
|
||||
<outlet property="imageViewType" destination="0NQ-ZD-CqD" id="Cph-FN-LaY"/>
|
||||
<outlet property="labelDriver" destination="TbX-e2-3QL" id="qJh-Ak-Dge"/>
|
||||
<outlet property="labelPathName" destination="CXK-Q9-CpO" id="iVZ-cL-azB"/>
|
||||
<outlet property="labelPhpVersion" destination="YUU-Hg-chL" id="5Yh-vQ-ksL"/>
|
||||
<outlet property="labelSiteName" destination="XJL-Uw-frD" id="f0t-vd-W68"/>
|
||||
<outlet property="labelSiteType" destination="Uyv-Cs-wjO" id="5dg-qW-3Vl"/>
|
||||
</connections>
|
||||
</tableCellView>
|
||||
</prototypeCellViews>
|
||||
@ -656,7 +704,7 @@ Gw
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="400" id="iRQ-sz-oyv"/>
|
||||
</constraints>
|
||||
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="TDE-ff-DQT">
|
||||
<rect key="frame" x="1" y="243" width="572" height="15"/>
|
||||
<rect key="frame" x="1" y="356" width="527" height="15"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="wFn-93-f10">
|
||||
@ -664,50 +712,25 @@ Gw
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
</scrollView>
|
||||
<textField focusRingType="none" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p3I-BT-dOY">
|
||||
<rect key="frame" x="37" y="382" width="486" height="23"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" focusRingType="none" placeholderString="Search for a domain..." usesSingleLineMode="YES" id="Hgd-Oz-Ggp">
|
||||
<font key="font" metaFont="system" size="19"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="JZI-Vd-9oq" id="IR9-kH-rEv"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Z1T-9h-9ms">
|
||||
<rect key="frame" x="10" y="384" width="24" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="dge-tM-IOH"/>
|
||||
<constraint firstAttribute="width" constant="24" id="gHC-jb-3kU"/>
|
||||
</constraints>
|
||||
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="Search" id="0ya-55-GjS"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="p0j-eB-I2i" firstAttribute="leading" secondItem="rIZ-4U-bhj" secondAttribute="leading" id="2Tx-yb-xrv"/>
|
||||
<constraint firstItem="p0j-eB-I2i" firstAttribute="top" secondItem="p3I-BT-dOY" secondAttribute="bottom" constant="10" id="77g-3w-AMb"/>
|
||||
<constraint firstItem="p0j-eB-I2i" firstAttribute="top" secondItem="rIZ-4U-bhj" secondAttribute="top" id="Pst-5A-dI0"/>
|
||||
<constraint firstAttribute="bottom" secondItem="p0j-eB-I2i" secondAttribute="bottom" id="QEw-5m-u1s"/>
|
||||
<constraint firstAttribute="trailing" secondItem="p3I-BT-dOY" secondAttribute="trailing" constant="8" id="mje-P5-UjW"/>
|
||||
<constraint firstItem="p3I-BT-dOY" firstAttribute="leading" secondItem="Z1T-9h-9ms" secondAttribute="trailing" constant="5" id="nPc-UE-WhI"/>
|
||||
<constraint firstItem="Z1T-9h-9ms" firstAttribute="leading" secondItem="rIZ-4U-bhj" secondAttribute="leading" constant="10" id="oRZ-EK-xb6"/>
|
||||
<constraint firstItem="p3I-BT-dOY" firstAttribute="top" secondItem="rIZ-4U-bhj" secondAttribute="top" constant="10" id="qw7-3Q-kUm"/>
|
||||
<constraint firstItem="Z1T-9h-9ms" firstAttribute="centerY" secondItem="p3I-BT-dOY" secondAttribute="centerY" id="shq-ZM-Iyw"/>
|
||||
<constraint firstAttribute="trailing" secondItem="p0j-eB-I2i" secondAttribute="trailing" id="zWH-TD-RZv"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="tableView" destination="cp3-34-pQj" id="sdw-Ac-27X"/>
|
||||
<outlet property="textFieldSearch" destination="p3I-BT-dOY" id="EXF-u8-Rm6"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<customObject id="HgD-aB-bQb" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="257" y="775"/>
|
||||
<point key="canvasLocation" x="256.5" y="774.5"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="GreenLock" width="448" height="512"/>
|
||||
<image name="Search" width="512" height="512"/>
|
||||
<image name="IconLinked" width="512" height="512"/>
|
||||
<image name="Lock" width="448" height="512"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
@ -66,35 +66,48 @@ class Valet {
|
||||
// MARK: - Structs
|
||||
|
||||
class Site {
|
||||
var name: String
|
||||
var name: String!
|
||||
|
||||
var absolutePath: String
|
||||
var absolutePath: String!
|
||||
var aliasPath: String?
|
||||
var secured: Bool
|
||||
|
||||
init(absolutePath: String, tld: String) {
|
||||
var secured: Bool!
|
||||
var driver: String = "???"
|
||||
|
||||
init() {}
|
||||
|
||||
convenience init(absolutePath: String, tld: String) {
|
||||
self.init()
|
||||
self.absolutePath = absolutePath
|
||||
self.aliasPath = nil
|
||||
self.name = URL(string: absolutePath)!.lastPathComponent
|
||||
self.secured = Shell.fileExists("~/.config/valet/Certificates/\(self.name).\(tld).key")
|
||||
self.aliasPath = nil
|
||||
determineSecured(tld)
|
||||
determineDriver()
|
||||
}
|
||||
|
||||
convenience init(aliasPath: String, tld: String) {
|
||||
// Resolve the symlink
|
||||
let absolutePath = try! FileManager.default
|
||||
.destinationOfSymbolicLink(atPath: aliasPath)
|
||||
self.init(absolutePath: absolutePath, tld: tld)
|
||||
|
||||
// TODO: Make sure the destination is a valid directory!
|
||||
|
||||
// The name should be identical to the alias' name
|
||||
self.init()
|
||||
self.absolutePath = try! FileManager.default.destinationOfSymbolicLink(atPath: aliasPath)
|
||||
self.name = URL(string: aliasPath)!.lastPathComponent
|
||||
|
||||
// Update the alias' path
|
||||
self.aliasPath = aliasPath
|
||||
|
||||
// Make sure we check again, this time for the aliased file
|
||||
self.secured = Shell.fileExists("~/.config/valet/Certificates/\(self.name).\(tld).key")
|
||||
determineSecured(tld)
|
||||
determineDriver()
|
||||
}
|
||||
|
||||
public func determineSecured(_ tld: String) {
|
||||
self.secured = Shell.fileExists("~/.config/valet/Certificates/\(self.name!).\(tld).key")
|
||||
}
|
||||
|
||||
public func determineDriver() {
|
||||
let driver = Shell.pipe("cd \(absolutePath!) && valet which", requiresPath: true)
|
||||
if driver.contains("This site is served by") {
|
||||
self.driver = driver
|
||||
// TODO: Use a regular expression to retrieve the driver instead?
|
||||
.replacingOccurrences(of: "This site is served by [", with: "")
|
||||
.replacingOccurrences(of: "ValetDriver].\n", with: "")
|
||||
} else {
|
||||
self.driver = "???"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,9 +15,10 @@ class SiteListCell: NSTableCellView
|
||||
@IBOutlet weak var labelPathName: NSTextField!
|
||||
|
||||
@IBOutlet weak var imageViewLock: NSImageView!
|
||||
@IBOutlet weak var imageViewType: NSImageView!
|
||||
|
||||
@IBOutlet weak var labelDriver: NSTextField!
|
||||
@IBOutlet weak var labelPhpVersion: NSTextField!
|
||||
@IBOutlet weak var labelSiteType: NSTextField!
|
||||
|
||||
override func draw(_ dirtyRect: NSRect) {
|
||||
super.draw(dirtyRect)
|
||||
|
@ -10,12 +10,10 @@ import Cocoa
|
||||
import HotKey
|
||||
import Carbon
|
||||
|
||||
class SiteListVC: NSViewController, NSTableViewDelegate, NSTableViewDataSource, NSTextFieldDelegate {
|
||||
class SiteListVC: NSViewController, NSTableViewDelegate, NSTableViewDataSource {
|
||||
|
||||
// MARK: - Outlets
|
||||
|
||||
@IBOutlet weak var textFieldSearch: NSTextField!
|
||||
|
||||
@IBOutlet weak var tableView: NSTableView!
|
||||
|
||||
public var editorAvailability: [String] = []
|
||||
@ -26,15 +24,15 @@ class SiteListVC: NSViewController, NSTableViewDelegate, NSTableViewDataSource,
|
||||
|
||||
public static func show(delegate: NSWindowDelegate? = nil) {
|
||||
if (App.shared.siteListWindowController == nil) {
|
||||
let vc = NSStoryboard(name: "Main", bundle: nil)
|
||||
.instantiateController(withIdentifier: "siteList") as! SiteListVC
|
||||
let window = NSWindow(contentViewController: vc)
|
||||
let storyboard = NSStoryboard(name: "Main" , bundle : nil)
|
||||
let windowController = (storyboard.instantiateController(withIdentifier: "siteListWindow")) as! SiteListWC
|
||||
|
||||
window.title = "site_list.title".localized
|
||||
window.delegate = delegate
|
||||
window.styleMask = [.titled, .closable, .resizable]
|
||||
windowController.window!.title = "site_list.title".localized
|
||||
windowController.window!.delegate = delegate
|
||||
windowController.window!.styleMask = [.titled, .closable, .resizable]
|
||||
windowController.window!.maxSize = NSSize(width: 800, height: 10000)
|
||||
|
||||
App.shared.siteListWindowController = SiteListWC(window: window)
|
||||
App.shared.siteListWindowController = windowController
|
||||
}
|
||||
|
||||
App.shared.siteListWindowController!.showWindow(self)
|
||||
@ -70,19 +68,26 @@ class SiteListVC: NSViewController, NSTableViewDelegate, NSTableViewDataSource,
|
||||
let item = self.sites[row]
|
||||
|
||||
/// Make sure to show the TLD
|
||||
userCell.labelSiteName.stringValue = "\(item.name).\(Valet.shared.config.tld)"
|
||||
userCell.labelSiteName.stringValue = "\(item.name!).\(Valet.shared.config.tld)"
|
||||
|
||||
/// Show the absolute path, except make sure to replace the /Users/username segment with ~ for readability
|
||||
userCell.labelPathName.stringValue = item.absolutePath
|
||||
.replacingOccurrences(of: "/Users/\(Paths.whoami)", with: "~")
|
||||
|
||||
/// If the `aliasPath` is nil, we're dealing with a parked site. Otherwise, it's a link that was explicitly created.
|
||||
userCell.labelSiteType.stringValue = item.aliasPath == nil
|
||||
? "Parked Site"
|
||||
: "Linked Site"
|
||||
userCell.imageViewType.image = NSImage(
|
||||
named: item.aliasPath == nil
|
||||
? "IconParked"
|
||||
: "IconLinked"
|
||||
)
|
||||
userCell.imageViewType.contentTintColor = NSColor.tertiaryLabelColor
|
||||
|
||||
/// Show the green or red lock based on whether the site was secured
|
||||
userCell.imageViewLock.image = NSImage(named: item.secured ? "GreenLock" : "RedLock")
|
||||
userCell.imageViewLock.contentTintColor = item.secured ? NSColor.systemGreen
|
||||
: NSColor.red
|
||||
|
||||
/// Show the current driver
|
||||
userCell.labelDriver.stringValue = item.driver
|
||||
|
||||
/// TODO: Load the correct PHP version (not determined as of yet)
|
||||
userCell.labelPhpVersion.stringValue = "PHP 8.0"
|
||||
@ -104,7 +109,7 @@ class SiteListVC: NSViewController, NSTableViewDelegate, NSTableViewDataSource,
|
||||
withTitle: site.secured
|
||||
? "site_list.unsecure".localized
|
||||
: "site_list.secure".localized,
|
||||
action: nil,
|
||||
action: #selector(toggleSecure),
|
||||
keyEquivalent: "L"
|
||||
)
|
||||
|
||||
@ -146,19 +151,43 @@ class SiteListVC: NSViewController, NSTableViewDelegate, NSTableViewDataSource,
|
||||
// MARK: Secure / unsecure
|
||||
|
||||
@objc public func toggleSecure() {
|
||||
// TODO
|
||||
let rowToReload = self.tableView.selectedRow
|
||||
let site = self.sites[self.tableView.selectedRow]
|
||||
let previous = site.secured
|
||||
let action = site.secured ? "unsecure" : "secure"
|
||||
|
||||
let command = "cd \(site.absolutePath!) && sudo \(Paths.valet) \(action) && exit;"
|
||||
let _ = Shell.pipe(command, requiresPath: true)
|
||||
|
||||
site.determineSecured(Valet.shared.config.tld)
|
||||
|
||||
if site.secured == previous {
|
||||
Alert.notify(
|
||||
message: "SSL status not changed",
|
||||
info: "Something went wrong. Try running the command in your terminal manually: `\(command)`")
|
||||
} else {
|
||||
let newState = site.secured ? "secured" : "unsecured"
|
||||
LocalNotification.send(
|
||||
title: "SSL status changed",
|
||||
subtitle: "The domain '\(site.name!).\(Valet.shared.config.tld)' is now \(newState)."
|
||||
)
|
||||
}
|
||||
|
||||
tableView.reloadData(forRowIndexes: [rowToReload], columnIndexes: [0])
|
||||
tableView.deselectRow(rowToReload)
|
||||
tableView.selectRowIndexes([rowToReload], byExtendingSelection: true)
|
||||
}
|
||||
|
||||
// MARK: Open with IDE / Editor
|
||||
|
||||
@objc public func openWithPhpStorm() {
|
||||
let site = self.sites[self.tableView.selectedRow]
|
||||
Shell.run("open -a /Applications/PhpStorm.app \(site.absolutePath)")
|
||||
Shell.run("open -a /Applications/PhpStorm.app \(site.absolutePath!)")
|
||||
}
|
||||
|
||||
@objc public func openWithVSCode() {
|
||||
let site = self.sites[self.tableView.selectedRow]
|
||||
Shell.run("/usr/local/bin/code \(site.absolutePath)")
|
||||
Shell.run("/usr/local/bin/code \(site.absolutePath!)")
|
||||
}
|
||||
|
||||
// MARK: Open in Browser & Finder
|
||||
@ -166,19 +195,19 @@ class SiteListVC: NSViewController, NSTableViewDelegate, NSTableViewDataSource,
|
||||
@objc public func openInBrowser() {
|
||||
let site = self.sites[self.tableView.selectedRow]
|
||||
let prefix = site.secured ? "https://" : "http://"
|
||||
let url = "\(prefix)\(site.name).\(Valet.shared.config.tld)"
|
||||
let url = "\(prefix)\(site.name!).\(Valet.shared.config.tld)"
|
||||
NSWorkspace.shared.open(URL(string: url)!)
|
||||
}
|
||||
|
||||
@objc public func openInFinder() {
|
||||
let site = self.sites[self.tableView.selectedRow]
|
||||
Shell.run("open \(site.absolutePath)")
|
||||
Shell.run("open \(site.absolutePath!)")
|
||||
}
|
||||
|
||||
// MARK: - (Search) Text Field Delegate
|
||||
|
||||
func controlTextDidChange(_ obj: Notification) {
|
||||
let searchString = self.textFieldSearch.stringValue.lowercased()
|
||||
func searchedFor(text: String) {
|
||||
let searchString = text.lowercased()
|
||||
|
||||
if searchString.isEmpty {
|
||||
self.sites = Valet.shared.sites
|
||||
|
@ -8,10 +8,24 @@
|
||||
|
||||
import Cocoa
|
||||
|
||||
class SiteListWC: NSWindowController {
|
||||
class SiteListWC: NSWindowController, NSSearchFieldDelegate {
|
||||
|
||||
@IBOutlet weak var searchToolbarItem: NSSearchToolbarItem!
|
||||
|
||||
override func windowDidLoad() {
|
||||
super.windowDidLoad()
|
||||
self.searchToolbarItem.searchField.delegate = self
|
||||
self.searchToolbarItem.searchField.becomeFirstResponder()
|
||||
}
|
||||
|
||||
func controlTextDidChange(_ notification: Notification) {
|
||||
guard let searchField = notification.object as? NSSearchField else {
|
||||
print("Unexpected control in update notification")
|
||||
return
|
||||
}
|
||||
|
||||
let window = self.contentViewController as! SiteListVC
|
||||
window.searchedFor(text: searchField.stringValue)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
// SITE LIST
|
||||
|
||||
"site_list.title" = "Linked & Parked Domains";
|
||||
"site_list.title" = "Domains";
|
||||
|
||||
// SITE LIST ACTIONS
|
||||
|
||||
|
Reference in New Issue
Block a user