Improve the Safari extension container app · refined-github/refined-github@ba878fc · GitHub
Skip to content

Commit ba878fc

Browse files
committed
Improve the Safari extension container app
1 parent ac8de6b commit ba878fc

3 files changed

Lines changed: 98 additions & 23 deletions

File tree

‎safari/Config.xcconfig‎

Lines changed: 2 additions & 2 deletions

‎safari/Refined GitHub/Base.lproj/Main.storyboard‎

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,18 @@
133133
<objects>
134134
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModule="Refined_GitHub" customModuleProvider="target" sceneMemberID="viewController">
135135
<view key="view" id="m2S-Jp-Qdl">
136-
<rect key="frame" x="0.0" y="0.0" width="480" height="481"/>
136+
<rect key="frame" x="0.0" y="0.0" width="480" height="401"/>
137137
<autoresizingMask key="autoresizingMask"/>
138138
<subviews>
139139
<stackView distribution="fill" orientation="vertical" alignment="centerX" spacing="42" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ZLV-xE-AGT">
140-
<rect key="frame" x="0.0" y="34" width="480" height="402"/>
140+
<rect key="frame" x="0.0" y="34" width="480" height="322"/>
141141
<subviews>
142-
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="FWV-e2-WQh" userLabel="IconView">
143-
<rect key="frame" x="176" y="274" width="128" height="128"/>
142+
<imageView horizontalHuggingPriority="1000" verticalHuggingPriority="1000" translatesAutoresizingMaskIntoConstraints="NO" id="FWV-e2-WQh" userLabel="IconView">
143+
<rect key="frame" x="176" y="194" width="128" height="128"/>
144144
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" image="AppIcon" id="Hhb-TZ-Dhg"/>
145145
</imageView>
146146
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="EB0-ac-UZR">
147-
<rect key="frame" x="38" y="200" width="404" height="32"/>
147+
<rect key="frame" x="38" y="120" width="404" height="32"/>
148148
<constraints>
149149
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="400" id="pZE-0p-Ce8"/>
150150
</constraints>
@@ -154,22 +154,8 @@
154154
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
155155
</textFieldCell>
156156
</textField>
157-
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wye-T4-7j1">
158-
<rect key="frame" x="38" y="62" width="404" height="96"/>
159-
<constraints>
160-
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="400" id="UwE-Sp-fw0"/>
161-
</constraints>
162-
<textFieldCell key="cell" selectable="YES" allowsUndo="NO" alignment="center" id="xjP-e5-4g6">
163-
<font key="font" metaFont="system"/>
164-
<string key="title">If the extension doesn‘t show up in Safari, try running the below command in the terminal and restart your computer:
165-
166-
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f /Applications/Safari.app</string>
167-
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
168-
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
169-
</textFieldCell>
170-
</textField>
171157
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ooh-eV-eLQ">
172-
<rect key="frame" x="82" y="-7" width="316" height="32"/>
158+
<rect key="frame" x="82" y="51" width="316" height="32"/>
173159
<buttonCell key="cell" type="push" title="Quit and Open Safari Extensions Preferences…" alternateTitle="Install" bezelStyle="rounded" alignment="center" lineBreakMode="truncatingMiddle" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Srx-0j-A4D">
174160
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
175161
<font key="font" metaFont="system"/>
@@ -181,6 +167,16 @@ DQ
181167
</connections>
182168
</buttonCell>
183169
</button>
170+
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1xC-g0-QV2" customClass="LinkButton" customModule="Refined_GitHub" customModuleProvider="target">
171+
<rect key="frame" x="118" y="-7" width="244" height="27"/>
172+
<buttonCell key="cell" type="push" title="The extension does not show up in Safari" bezelStyle="rounded" alignment="center" controlSize="small" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="HhM-eR-bMR">
173+
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
174+
<font key="font" metaFont="smallSystem"/>
175+
</buttonCell>
176+
<userDefinedRuntimeAttributes>
177+
<userDefinedRuntimeAttribute type="string" keyPath="url" value="https://github.com/sindresorhus/refined-github/issues/4216#issuecomment-817097886"/>
178+
</userDefinedRuntimeAttributes>
179+
</button>
184180
</subviews>
185181
<visibilityPriorities>
186182
<integer value="1000"/>
@@ -209,7 +205,7 @@ DQ
209205
</viewController>
210206
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
211207
</objects>
212-
<point key="canvasLocation" x="75" y="655"/>
208+
<point key="canvasLocation" x="75" y="654.5"/>
213209
</scene>
214210
</scenes>
215211
<resources>

‎safari/Refined GitHub/ViewController.swift‎

Lines changed: 79 additions & 0 deletions

0 commit comments

Comments
 (0)