Skip to content

Commit

Permalink
- Fixes git settings
Browse files Browse the repository at this point in the history
  • Loading branch information
glushchenko committed Oct 5, 2024
1 parent 2f6fc8b commit 979e147
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
44 changes: 22 additions & 22 deletions FSNotes/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,7 @@ CA
<edgeInsets key="contentInsets" left="0.0" right="0.0" top="38" bottom="0.0"/>
</clipView>
<edgeInsets key="scrollerInsets" left="0.0" right="0.0" top="38" bottom="0.0"/>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="hZT-KZ-qyF">
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="0.23935756602005698" horizontal="YES" id="hZT-KZ-qyF">
<rect key="frame" x="0.0" y="584" width="144" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
Expand Down Expand Up @@ -1782,11 +1782,11 @@ CA
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView identifier="NoteCellView" id="8qL-z4-nzh" customClass="NoteCellView" customModule="FSNotes" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="236" height="115"/>
<rect key="frame" x="0.0" y="0.0" width="235" height="115"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField identifier="cellDate" autoresizesSubviews="NO" focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="abw-Lq-K7d">
<rect key="frame" x="167" y="99" width="48" height="16"/>
<rect key="frame" x="166" y="99" width="48" height="16"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="2/23/11" id="9w3-fa-di3">
<font key="font" metaFont="system"/>
<color key="textColor" name="tertiaryLabelColor" catalog="System" colorSpace="catalog"/>
Expand Down Expand Up @@ -2514,8 +2514,8 @@ Gw
<scene sceneID="bm4-A4-SJq">
<objects>
<viewController id="6OZ-zZ-7EL" customClass="AboutViewController" customModule="FSNotes" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" id="stc-Pf-K3l">
<rect key="frame" x="0.0" y="0.0" width="482" height="544"/>
<view key="view" misplaced="YES" id="stc-Pf-K3l">
<rect key="frame" x="0.0" y="0.0" width="481" height="544"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView toolTip="In memory of Mars. ? - 25.08.2022" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="TKE-yB-wPs" customClass="AboutImageView" customModule="FSNotes" customModuleProvider="target">
Expand All @@ -2538,7 +2538,7 @@ Gw
</attributedString>
</textField>
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="3f9-vz-qWm">
<rect key="frame" x="89" y="300" width="304" height="32"/>
<rect key="frame" x="90" y="300" width="304" height="32"/>
<textFieldCell key="cell" selectable="YES" alignment="center" id="0f7-Za-V0B">
<font key="font" metaFont="system"/>
<string key="title">Copyright © 2017-2024 Oleksandr Hlushchenko.
Expand All @@ -2551,7 +2551,7 @@ All rights reserved.</string>
</textFieldCell>
</textField>
<button focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="FPM-RD-i0c">
<rect key="frame" x="168" y="425" width="146" height="16"/>
<rect key="frame" x="169" y="425" width="146" height="16"/>
<buttonCell key="cell" type="bevel" title="🔗fsnotes/contributors" bezelStyle="regularSquare" alignment="center" focusRingType="none" imageScaling="proportionallyDown" inset="2" id="jQ1-6K-9ar">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
Expand All @@ -2564,7 +2564,7 @@ All rights reserved.</string>
</connections>
</button>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JMy-4k-NeF">
<rect key="frame" x="18" y="20" width="446" height="32"/>
<rect key="frame" x="18" y="20" width="447" height="32"/>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" id="sWS-bo-99f">
<font key="font" metaFont="system"/>
<string key="title">Dylan Seeger — https://www.lovably.com
Expand All @@ -2585,38 +2585,38 @@ Olena Hlushcneko</string>
</textFieldCell>
</textField>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Md6-vL-c1a">
<rect key="frame" x="203" y="264" width="76" height="16"/>
<rect key="frame" x="204" y="264" width="76" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Translators:" id="13t-eQ-kOr">
<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 horizontalHuggingPriority="249" verticalHuggingPriority="750" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="2QL-BH-sCT">
<rect key="frame" x="20" y="381" width="442" height="5"/>
<rect key="frame" x="20" y="381" width="443" height="5"/>
</box>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gR1-Um-ivy">
<rect key="frame" x="214" y="347" width="54" height="16"/>
<rect key="frame" x="215" y="347" width="54" height="16"/>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Version" id="ELw-Y4-DV0">
<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>
<scrollView autohidesScrollers="YES" horizontalLineScroll="24" horizontalPageScroll="10" verticalLineScroll="24" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2Mi-Tc-usi">
<rect key="frame" x="20" y="96" width="442" height="160"/>
<rect key="frame" x="20" y="96" width="443" height="160"/>
<clipView key="contentView" drawsBackground="NO" id="ncf-mP-Txi">
<rect key="frame" x="1" y="1" width="440" height="158"/>
<rect key="frame" x="1" y="1" width="441" height="158"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" tableStyle="fullWidth" alternatingRowBackgroundColors="YES" multipleSelection="NO" autosaveColumns="NO" rowHeight="24" rowSizeStyle="automatic" viewBased="YES" id="dxm-ar-pH7">
<rect key="frame" x="0.0" y="0.0" width="440" height="158"/>
<rect key="frame" x="0.0" y="0.0" width="441" height="158"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="17" height="0.0"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn identifier="table.about.0" width="116" minWidth="40" maxWidth="1000" id="8C6-wv-c5i">
<tableColumn identifier="table.about.0" width="116.5" minWidth="40" maxWidth="1000" id="8C6-wv-c5i">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
Expand Down Expand Up @@ -2652,7 +2652,7 @@ Olena Hlushcneko</string>
</tableCellView>
</prototypeCellViews>
</tableColumn>
<tableColumn identifier="table.about.1" width="295" minWidth="40" maxWidth="1000" id="Kap-cy-IbZ">
<tableColumn identifier="table.about.1" width="296" minWidth="40" maxWidth="1000" id="Kap-cy-IbZ">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border">
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -2665,11 +2665,11 @@ Olena Hlushcneko</string>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView id="Svh-Z4-DD5">
<rect key="frame" x="139" y="0.0" width="292" height="24"/>
<rect key="frame" x="139.43878710624381" y="0.0" width="293" height="24"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="JRs-Lb-Adc">
<rect key="frame" x="0.0" y="4" width="292" height="16"/>
<rect key="frame" x="0.0" y="4" width="293" height="16"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="zoX-MN-b3x">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -2693,8 +2693,8 @@ Olena Hlushcneko</string>
</subviews>
<nil key="backgroundColor"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="PCs-t5-9ug">
<rect key="frame" x="1" y="128" width="408" height="16"/>
<scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="PCs-t5-9ug">
<rect key="frame" x="1" y="143" width="441" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="bvv-u1-Zg1">
Expand Down Expand Up @@ -3149,7 +3149,7 @@ Olena Hlushcneko</string>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<secureTextField focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Y9p-ND-X8k">
<secureTextField identifier="gitPassphraseMain" focusRingType="none" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Y9p-ND-X8k">
<rect key="frame" x="256" y="105" width="273" height="21"/>
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="passphrase" drawsBackground="YES" usesSingleLineMode="YES" id="rzB-ln-uyl">
<font key="font" metaFont="system"/>
Expand Down Expand Up @@ -3409,7 +3409,7 @@ Olena Hlushcneko</string>
<constraint firstAttribute="width" constant="30" id="awb-KD-AQU"/>
</constraints>
</progressIndicator>
<textField identifier="gitOrigin" focusRingType="none" verticalHuggingPriority="749" translatesAutoresizingMaskIntoConstraints="NO" id="Jo4-zQ-htF">
<textField identifier="gitOriginMain" focusRingType="none" verticalHuggingPriority="749" translatesAutoresizingMaskIntoConstraints="NO" id="Jo4-zQ-htF">
<rect key="frame" x="256" y="80" width="273" height="22"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="git@github.com:username/repo.git" drawsBackground="YES" id="4Sj-5v-Clo">
<font key="font" metaFont="system"/>
Expand Down
6 changes: 4 additions & 2 deletions FSNotes/Preferences/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,14 @@ class SettingsViewController: NSViewController, NSTextFieldDelegate {
public func controlTextDidChange(_ notification: Notification) {
guard let textField = notification.object as? NSTextField else { return }

if textField.identifier?.rawValue == "gitOrigin" {
let id = textField.identifier?.rawValue

if id == "gitOrigin" || id == "gitOriginMain" {
gitProject?.settings.setOrigin(textField.stringValue)
updateButtons()
}

if textField.identifier?.rawValue == "gitPassphrase" {
if id == "gitPassphrase" || id == "gitPassphraseMain" {
gitProject?.settings.gitPrivateKeyPassphrase = textField.stringValue
}

Expand Down

0 comments on commit 979e147

Please sign in to comment.