Skip to content

Commit

Permalink
show listen ip
Browse files Browse the repository at this point in the history
  • Loading branch information
fuji246 committed Jul 29, 2021
1 parent e5578b4 commit 84fa25a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 10 deletions.
38 changes: 30 additions & 8 deletions LomoAgent/Base.lproj/PreferencesWindow.xib
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="18122" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15505"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="18122"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand All @@ -12,6 +12,7 @@
<outlet property="debugModeCheckBox" destination="6In-C0-Ox8" id="Elp-qb-8ve"/>
<outlet property="homeDirTextField" destination="eQt-yd-8Oh" id="iWN-ft-Og1"/>
<outlet property="imageQRCode" destination="Ha9-zw-3Td" id="CaF-1f-0Zm"/>
<outlet property="ipTextField" destination="xNB-4l-h21" id="jFu-Nn-aSh"/>
<outlet property="lastBackupLabel" destination="hLc-hC-7B1" id="GnP-0e-iJK"/>
<outlet property="openBackupButton" destination="9uI-GV-J4c" id="htL-VN-8YV"/>
<outlet property="openHomeButton" destination="AyW-Hh-bcP" id="Dvx-Bf-pkk"/>
Expand All @@ -29,7 +30,7 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="360" height="360"/>
<rect key="screenRect" x="0.0" y="0.0" width="1792" height="1097"/>
<rect key="screenRect" x="0.0" y="0.0" width="1792" height="1095"/>
<view key="contentView" wantsLayer="YES" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="360" height="360"/>
<autoresizingMask key="autoresizingMask"/>
Expand Down Expand Up @@ -102,7 +103,7 @@
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" id="QnP-UT-T1E"/>
</imageView>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8OA-ER-QGA">
<rect key="frame" x="261" y="40" width="59" height="22"/>
<rect key="frame" x="261" y="13" width="59" height="22"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="X2E-Ty-WCS">
<font key="font" metaFont="system"/>
Expand All @@ -113,6 +114,18 @@
<action selector="onPortChange:" target="-2" id="s9f-52-8ak"/>
</connections>
</textField>
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="xNB-4l-h21">
<rect key="frame" x="62" y="12" width="107" height="22"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" id="xek-7O-Gf8">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<action selector="onPortChange:" target="-2" id="FnB-Ap-n1V"/>
</connections>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hLc-hC-7B1">
<rect key="frame" x="38" y="178" width="83" height="17"/>
<autoresizingMask key="autoresizingMask"/>
Expand Down Expand Up @@ -143,7 +156,7 @@
</connections>
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="UpZ-2D-dVU">
<rect key="frame" x="36" y="18" width="198" height="18"/>
<rect key="frame" x="142" y="42" width="198" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Auto Start when system boot" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="0kb-oT-IRY">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
Expand All @@ -153,10 +166,10 @@
</connections>
</buttonCell>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FeW-Jp-XEh">
<rect key="frame" x="225" y="43" width="30" height="17"/>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HJy-yO-KmA">
<rect key="frame" x="38" y="14" width="30" height="17"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Port" id="VTa-Lr-Xxo">
<textFieldCell key="cell" lineBreakMode="clipping" title="IP" id="y9g-be-UFN">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand Down Expand Up @@ -191,6 +204,15 @@
<action selector="onUnsetBackupPath:" target="-2" id="8Sa-Db-qz5"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FeW-Jp-XEh">
<rect key="frame" x="225" y="13" width="30" height="17"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" lineBreakMode="clipping" title="Port" id="VTa-Lr-Xxo">
<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>
</view>
<connections>
Expand Down
4 changes: 2 additions & 2 deletions LomoAgent/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>98eba03</string>
<string>e5578b4</string>
<key>CFBundleVersion</key>
<string>2021_06_09.16_44_45.0.98eba03</string>
<string>2021_07_28.16_59_40.0.e5578b4</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down
3 changes: 3 additions & 0 deletions LomoAgent/PreferencesWindow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class PreferencesWindow: NSWindowController, NSWindowDelegate {

@IBOutlet weak var portTextField: NSTextField!

@IBOutlet weak var ipTextField: NSTextField!

@IBOutlet weak var debugModeCheckBox: NSButton!

@IBOutlet weak var startOnBootCheckBox: NSButton!
Expand Down Expand Up @@ -306,6 +308,7 @@ class PreferencesWindow: NSWindowController, NSWindowDelegate {
guard let data = url.data(using: String.Encoding.utf8, allowLossyConversion: false) else {
return
}
ipTextField.stringValue = firstAddr
userTipsLabel.textColor = .black
userTipsLabel.stringValue = userTipsScanQRCode
imageQRCode.image = QRCodeImageWith(data: data, size: imageQRCode.frame.size.width)
Expand Down

0 comments on commit 84fa25a

Please sign in to comment.