Skip to content

Commit

Permalink
Merge pull request #32 from kyleduo/1.0.2
Browse files Browse the repository at this point in the history
v1.0.2
  • Loading branch information
kyleduo authored Sep 19, 2019
2 parents 152a506 + f251456 commit 058b8c9
Show file tree
Hide file tree
Showing 9 changed files with 100 additions and 92 deletions.
77 changes: 38 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ This is a client of [TinyPNG](https://tinypng.com) for Mac, with which you can c

[中文](./README_ZH.md)

### Version 1.0.1

1. Migrate to Swift 5.0, thanks [@gewill](https://github.com/gewill)
2. Downward compatibility to macOS 10.10
3. Fixed [#19](https://github.com/kyleduo/TinyPNG4Mac/issues/19), [#22](https://github.com/kyleduo/TinyPNG4Mac/issues/22)



### Usage
Expand All @@ -24,47 +18,52 @@ This is a client of [TinyPNG](https://tinypng.com) for Mac, with which you can c

### Download

[From Github](https://github.com/kyleduo/TinyPNG4Mac/releases)
[Release Page](https://github.com/kyleduo/TinyPNG4Mac/releases)

[七牛下载](https://static.kyleduo.com/project/release/tinypng4mac/tinypng4mac_1_0_1.app.zip)
[CDN](https://static.kyleduo.com/project/release/tinypng4mac/tinypng4mac_1_0_1.app.zip)

Check "Anywhere" in `Preferences -> Security & privacy` if you can not open this app. Just for the first time, and I suggest you uncheck it after you open this app for security.

### Thanks

[droptogif](https://github.com/mortenjust/droptogif) -- A very useful client for convert video to gif. I learnt how to create window from that project.

### History

> **Version 1.0.0**
>
> 1. New icon and interface
> 2. Support "in place"
> 3. Improve stability and fix bugs
>
>
>
> **Version 0.9.3**
>
> 1. Update to **Swift 3**
> 2. Add `Pods/` to `.gitignore`
> 3. Display progress when uploading/downloaing.
>
>
>
> **Version 0.9.2**
>
> 1. Support **JPG** and **JPEG**.
>
>
>
> **Version 0.9 brings a lot of change.**
>
> 1. Whole new design UI.
> 2. New workflow and easy to use.
> 3. Custom ouput path support.
> 4. Sorted task list.
> 5. Chinese support.
### Release Notes

**Version 1.0.2**

1. Fixed [#29](https://github.com/kyleduo/TinyPNG4Mac/issues/29)
2. Fixed a typo.

**Version 1.0.1**

1. Migrate to Swift 5.0, thanks [@gewill](https://github.com/gewill)
2. Downward compatibility to macOS 10.10
3. Fixed [#19](https://github.com/kyleduo/TinyPNG4Mac/issues/19), [#22](

**Version 1.0.0**

1. New icon and interface
2. Support "in place"
3. Improve stability and fix bugs

**Version 0.9.3**

1. Update to **Swift 3**
2. Add `Pods/` to `.gitignore`
3. Display progress when uploading/downloaing.

**Version 0.9.2**

1. Support **JPG** and **JPEG**.

**Version 0.9 brings a lot of change.**

1. Whole new design UI.
2. New workflow and easy to use.
3. Custom ouput path support.
4. Sorted task list.
5. Chinese support.

### License

Expand Down
73 changes: 41 additions & 32 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@

这是[TinyPNG](https://tinypng.com)的Mac客户端。TinyPNG提供了PNG图片的“几乎无损”压缩服务。使用TinyPNG4Mac,你可以通过简单的拖拽完成对PNG图片的压缩,无需打开浏览器,无需手动下载图片。

### 1.0.1版本

1. 迁移到Swift 5.0
2. 向下兼容macOS 10.10
3. 修复问题 [#19](https://github.com/kyleduo/TinyPNG4Mac/issues/19), [#22](https://github.com/kyleduo/TinyPNG4Mac/issues/22)
[English](./README.md)



Expand All @@ -18,43 +14,56 @@
3. 拖拽图片到窗口中。




### 下载

[直接下载](https://github.com/kyleduo/TinyPNG4Mac/releases)
[Release Page](https://github.com/kyleduo/TinyPNG4Mac/releases)

[七牛下载](https://static.kyleduo.com/project/release/tinypng4mac/tinypng4mac_1_0_1.app.zip)
[CDN下载](https://static.kyleduo.com/project/release/tinypng4mac/tinypng4mac_1_0_1.app.zip)

第一次打开可能出现“无法打开”的提示,请到`设置 -> 安全性与隐私`里面勾选`所有来源`。出于安全考虑,建议打开之后关闭这个选项。

### 致谢

[droptogif](https://github.com/mortenjust/droptogif) -- 实用的视频转Gif的工具。我在里面学习了如何创建Window。

### 版本历史

> **Version 1.0.0**
>
> 1. 新设计的icon和界面
> 2. 支持“替换原图”
> 3. 修复bug,提升稳定性
>
> **Version 0.9.3**
>
> 1. 升级到Swift 3
> 2.`Pod/`添加到`.gitignore`
> 3. 上传和下载时显示进度
>
> **Version 0.9.2**
>
> 1. 支持 **JPG****JPEG**.
>
> **0.9版本带来了很多更新**
>
> 1. 重新设计的UI;
> 2. 新的流程更加易用,安全;
> 3. 支持自定义保存路径;
> 4. 任务列表排序;
> 5. 支持中文。
### 更新信息

**Version 1.0.2**

1. 修复 [#29](https://github.com/kyleduo/TinyPNG4Mac/issues/29)
2. 修复一处拼写错误

**Version 1.0.1**

1. 迁移到Swift 5.0
2. 向下兼容macOS 10.10
3. 修复问题 [#19](https://github.com/kyleduo/TinyPNG4Mac/issues/19), [#22](https://github.com/kyleduo/TinyPNG4Mac/issues/22)

**Version 1.0.0**

1. 新设计的icon和界面
2. 支持“替换原图”
3. 修复bug,提升稳定性

**Version 0.9.3**

1. 升级到Swift 3
2.`Pod/`添加到`.gitignore`
3. 上传和下载时显示进度

**Version 0.9.2**

1. 支持 **JPG****JPEG**.

**0.9版本带来了很多更新**

1. 重新设计的UI;
2. 新的流程更加易用,安全;
3. 支持自定义保存路径;
4. 任务列表排序;
5. 支持中文。

### 协议

Expand Down
Binary file added archive/TinyPNG4Mac_1_0_2.zip
Binary file not shown.
Binary file removed archive/tinypng4mac_1_0_1.app.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion source/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 1e14da6108c97041b7daef307aaa48a8f180f7a4

COCOAPODS: 1.6.1
COCOAPODS: 1.7.5
3 changes: 1 addition & 2 deletions source/tinypng4mac.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,9 @@
};
buildConfigurationList = 277AAF4A1D23F24900788F37 /* Build configuration list for PBXProject "tinypng4mac" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
"zh-Hans",
Expand Down
18 changes: 9 additions & 9 deletions source/tinypng4mac/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -168,23 +168,23 @@
<rect key="frame" x="0.0" y="-4" width="320" height="104"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="j7S-Iz-wE1">
<rect key="frame" x="18" y="43" width="104" height="18"/>
<rect key="frame" x="18" y="43" width="97" height="18"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Output Path:" id="wAc-5q-1kG">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="NnK-w1-6b9">
<rect key="frame" x="18" y="16" width="104" height="18"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Replace Origion:" id="7il-ST-uVu">
<rect key="frame" x="18" y="16" width="97" height="18"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="Replace Origin:" id="7il-ST-uVu">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="752" translatesAutoresizingMaskIntoConstraints="NO" id="iOT-w7-ALe">
<rect key="frame" x="18" y="70" width="104" height="18"/>
<rect key="frame" x="18" y="70" width="97" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="18" id="zLS-ML-ggj"/>
</constraints>
Expand All @@ -195,7 +195,7 @@
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fT1-QL-4Nq">
<rect key="frame" x="132" y="41" width="146" height="22"/>
<rect key="frame" x="125" y="41" width="153" height="22"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="99a-9k-u4D">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -216,15 +216,15 @@
</connections>
</button>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vPz-Tz-wUm">
<rect key="frame" x="132" y="68" width="172" height="22"/>
<rect key="frame" x="125" y="68" width="179" height="22"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="OCF-de-u9Q">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button translatesAutoresizingMaskIntoConstraints="NO" id="zRv-TO-bMw">
<rect key="frame" x="132" y="16" width="22" height="18"/>
<rect key="frame" x="125" y="16" width="22" height="18"/>
<constraints>
<constraint firstAttribute="height" constant="14" id="mm5-iS-Q2I"/>
</constraints>
Expand Down Expand Up @@ -442,15 +442,15 @@
<rect key="frame" x="107" y="396" width="107" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="TinyPNG for Mac" id="8Ac-Uq-uCZ">
<font key="font" metaFont="system"/>
<color key="textColor" name="highlightColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="D8d-TS-a2j">
<rect key="frame" x="14" y="117" width="57" height="17"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" truncatesLastVisibleLine="YES" sendsActionOnEndEditing="YES" title="Reduce: " id="400-FH-fhZ">
<font key="font" metaFont="system"/>
<color key="textColor" name="highlightColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
Expand Down
4 changes: 2 additions & 2 deletions source/tinypng4mac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.1</string>
<string>1.0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>8</string>
<string>9</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSHumanReadableCopyright</key>
Expand Down
15 changes: 8 additions & 7 deletions source/tinypng4mac/views/InputKeyAlert.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class InputKeyAlert: NSAlert, NSTextFieldDelegate {
let view = NSView.init(frame: CGRect(x: 0, y: 0, width: 300, height: 54))
self.input = NSTextField.init(frame: CGRect(x: 0, y: 30, width: 300, height: 24))
self.input?.delegate = self
self.input?.usesSingleLineMode = true
view.addSubview(self.input!)
let button = self.createRegisterButton()
view.addSubview(button)
Expand All @@ -38,7 +39,7 @@ class InputKeyAlert: NSAlert, NSTextFieldDelegate {
let paragraphStyle = NSMutableParagraphStyle.init()
paragraphStyle.alignment = NSTextAlignment.center
let title = NSMutableAttributedString.init(string: NSLocalizedString("Register", comment: "Register"))
title.addAttributes([NSAttributedString.Key.foregroundColor: NSColor.blue,
title.addAttributes([NSAttributedString.Key.foregroundColor: NSColor.linkColor,
NSAttributedString.Key.paragraphStyle:paragraphStyle,
NSAttributedString.Key.underlineStyle:NSUnderlineStyle.single.rawValue], range: NSMakeRange(0, title.length))
button.attributedTitle = title
Expand All @@ -60,10 +61,10 @@ class InputKeyAlert: NSAlert, NSTextFieldDelegate {
}
})
}
func controlTextDidEndEditing(_ obj: Notification) {
if let text = input?.stringValue {
self.submitButton?.isEnabled = text.count > 0
}
}
func controlTextDidChange(_ obj: Notification) {
if let text = input?.stringValue {
self.submitButton?.isEnabled = text.count > 0
}
}
}

0 comments on commit 058b8c9

Please sign in to comment.