Skip to content

Commit 8443e92

Browse files
committed
Merge branch 'release/v0.19.6'
2 parents f75a0b8 + 311795a commit 8443e92

32 files changed

+268
-129
lines changed

Podfile.lock

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
PODS:
2-
- Alamofire (5.0.2)
3-
- CryptoSwift (1.3.0)
4-
- Kingfisher (5.13.2):
5-
- Kingfisher/Core (= 5.13.2)
6-
- Kingfisher/Core (5.13.2)
2+
- Alamofire (5.0.5)
3+
- CryptoSwift (1.3.1)
4+
- Kingfisher (5.14.1):
5+
- Kingfisher/Core (= 5.14.1)
6+
- Kingfisher/Core (5.14.1)
77
- libminipng (0.5.6)
8-
- LoginServiceKit (2.1.0)
8+
- LoginServiceKit (2.2.0)
99
- MASShortcut (2.4.0)
1010
- SnapKit (5.0.1)
1111
- Sparkle (1.23.0)
@@ -55,21 +55,21 @@ EXTERNAL SOURCES:
5555

5656
CHECKOUT OPTIONS:
5757
CryptoSwift:
58-
:commit: a842251aee9047b2b335afe0ae0b5b44daf95219
58+
:commit: e793a595747c8f9b97b8de4ebde7b2a440f2d594
5959
:git: https://github.com/krzyzanowskim/CryptoSwift
6060
LoginServiceKit:
61-
:commit: be0b910d825f826d3c64d6ff1207209ec7dea0fa
61+
:commit: 17a916dc09f1aab0f13e6edd1f77cdecee4d0ae8
6262
:git: https://github.com/Clipy/LoginServiceKit.git
6363
SwiftyXMLParser:
64-
:commit: bc85162ecee60d6eb94b778648bc4c51e1c4d34f
64+
:commit: 9d82653e535a13a518b411934c0a5c0c84406c22
6565
:git: https://github.com/yahoojapan/SwiftyXMLParser.git
6666

6767
SPEC CHECKSUMS:
68-
Alamofire: 3ba7a4db18b4f62c4a1c0e1cb39d7f3d52e10ada
69-
CryptoSwift: 1283821600233bdbeb96d7b389c3288c3bf77211
70-
Kingfisher: d342c8354c10c3d85a27d6d4c42c41285924b898
68+
Alamofire: df2f8f826963b08b9a870791ad48e07a10090b2e
69+
CryptoSwift: 27c1f79acf3410c697981c2443076ad0880a62b4
70+
Kingfisher: 8050bc6f7f68cbf3908bd04df7ccbac188f6d6d6
7171
libminipng: a44c35d06b9d54d6640acdf97f4500c034748abb
72-
LoginServiceKit: 9a8b258c3111fa0d9585615052f778b08be92302
72+
LoginServiceKit: 3c86ce2f2bcd1e373326839d6d863d8a6a5915b4
7373
MASShortcut: d9e4909e878661cc42877cc9d6efbe638273ab57
7474
SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
7575
Sparkle: 55b1a87ba69d56913375a281546b7c82dec95bb0
@@ -81,4 +81,4 @@ SPEC CHECKSUMS:
8181

8282
PODFILE CHECKSUM: 4101e450e6b2d21bac70b5245d209294f573f3bb
8383

84-
COCOAPODS: 1.9.1
84+
COCOAPODS: 1.9.3

README-cn.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
-----
2020

21-
**👬联系: _[Telegram](https://t.me/upic_host), [Twitter](https://twitter.com/geee1k), [微博](https://weibo.com/6436660358), [微信群](https://raw.githubusercontent.com/gee1k/oss/master/personal/geee1k.JPG)_**
21+
**👬联系: _[Telegram](https://t.me/upic_host), [Twitter](https://twitter.com/realSvend), [微博](https://weibo.com/6436660358), [微信群](https://raw.githubusercontent.com/gee1k/oss/master/personal/geee1k.JPG)_**
2222

2323
**☕️赞助: _[Paypal](https://paypal.me/geeee1k), [支付宝](https://raw.githubusercontent.com/gee1k/oss/master/qrcode/alipay.JPG), [微信支付](https://raw.githubusercontent.com/gee1k/oss/master/qrcode/wechat_pay.JPG)_**
2424

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
-----
2020

21-
**👬Chat: _[Telegram](https://t.me/upic_host), [Twitter](https://twitter.com/geee1k), [Weibo](https://weibo.com/6436660358), [Wechat Group](https://raw.githubusercontent.com/gee1k/oss/master/personal/geee1k.JPG)_**
21+
**👬Chat: _[Telegram](https://t.me/upic_host), [Twitter](https://twitter.com/realSvend), [Weibo](https://weibo.com/6436660358), [Wechat Group](https://raw.githubusercontent.com/gee1k/oss/master/personal/geee1k.JPG)_**
2222

2323
**☕️Donate: _[Paypal](https://paypal.me/geeee1k), [Alipay](https://raw.githubusercontent.com/gee1k/oss/master/qrcode/alipay.JPG), [WechatPay](https://raw.githubusercontent.com/gee1k/oss/master/qrcode/wechat_pay.JPG)_**
2424

uPic.sketch

1.77 MB
Binary file not shown.

uPic.xcodeproj/project.pbxproj

+10-10
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@
323323
68BBB2F5FAEEFFF55935F022 /* AmazonS3Util.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AmazonS3Util.swift; sourceTree = "<group>"; };
324324
68BBB5C4550545707614BE4D /* AmazonS3Uploader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AmazonS3Uploader.swift; sourceTree = "<group>"; };
325325
68BBB8CF2838A67CA1AD438F /* AmazonS3HostConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AmazonS3HostConfig.swift; sourceTree = "<group>"; };
326-
9667517C240D2BA6007C7012 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = "<group>"; };
326+
96319C6E24CE7CEB004A6E62 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = "<group>"; };
327327
968ECC08240DFCF900B2D78C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
328328
968ECC0A240DFCFA00B2D78C /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
329329
969018A3240D998400B545B2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Preferences.strings; sourceTree = "<group>"; };
@@ -1102,8 +1102,8 @@
11021102
children = (
11031103
1648A215238E742600B99B9D /* Base */,
11041104
1648A218238E743200B99B9D /* zh-Hans */,
1105-
9667517C240D2BA6007C7012 /* en */,
11061105
1605DDD8246D993C00262C89 /* zh-Hant */,
1106+
96319C6E24CE7CEB004A6E62 /* en */,
11071107
);
11081108
name = Main.storyboard;
11091109
sourceTree = "<group>";
@@ -1260,7 +1260,7 @@
12601260
CODE_SIGN_IDENTITY = "Apple Development";
12611261
CODE_SIGN_STYLE = Automatic;
12621262
COMBINE_HIDPI_IMAGES = YES;
1263-
CURRENT_PROJECT_VERSION = 20200723;
1263+
CURRENT_PROJECT_VERSION = 20200728;
12641264
DEVELOPMENT_TEAM = W863J6W8DZ;
12651265
ENABLE_HARDENED_RUNTIME = YES;
12661266
INFOPLIST_FILE = "$(SRCROOT)/uPic/Supporting Files/Info.plist";
@@ -1269,7 +1269,7 @@
12691269
"@executable_path/../Frameworks",
12701270
);
12711271
MACOSX_DEPLOYMENT_TARGET = 10.12;
1272-
MARKETING_VERSION = 0.19.5;
1272+
MARKETING_VERSION = 0.19.6;
12731273
PRODUCT_BUNDLE_IDENTIFIER = com.svend.uPic;
12741274
PRODUCT_NAME = "$(TARGET_NAME)";
12751275
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1290,7 +1290,7 @@
12901290
CODE_SIGN_IDENTITY = "Apple Development";
12911291
CODE_SIGN_STYLE = Automatic;
12921292
COMBINE_HIDPI_IMAGES = YES;
1293-
CURRENT_PROJECT_VERSION = 20200723;
1293+
CURRENT_PROJECT_VERSION = 20200728;
12941294
DEVELOPMENT_TEAM = W863J6W8DZ;
12951295
ENABLE_HARDENED_RUNTIME = YES;
12961296
INFOPLIST_FILE = "$(SRCROOT)/uPic/Supporting Files/Info.plist";
@@ -1299,7 +1299,7 @@
12991299
"@executable_path/../Frameworks",
13001300
);
13011301
MACOSX_DEPLOYMENT_TARGET = 10.12;
1302-
MARKETING_VERSION = 0.19.5;
1302+
MARKETING_VERSION = 0.19.6;
13031303
PRODUCT_BUNDLE_IDENTIFIER = com.svend.uPic;
13041304
PRODUCT_NAME = "$(TARGET_NAME)";
13051305
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1316,7 +1316,7 @@
13161316
CODE_SIGN_IDENTITY = "Apple Development";
13171317
CODE_SIGN_STYLE = Automatic;
13181318
COMBINE_HIDPI_IMAGES = YES;
1319-
CURRENT_PROJECT_VERSION = 20200723;
1319+
CURRENT_PROJECT_VERSION = 20200728;
13201320
DEVELOPMENT_TEAM = W863J6W8DZ;
13211321
ENABLE_HARDENED_RUNTIME = YES;
13221322
INFOPLIST_FILE = uPicFinderExtension/Info.plist;
@@ -1326,7 +1326,7 @@
13261326
"@executable_path/../../../../Frameworks",
13271327
);
13281328
MACOSX_DEPLOYMENT_TARGET = 10.12;
1329-
MARKETING_VERSION = 0.19.5;
1329+
MARKETING_VERSION = 0.19.6;
13301330
PRODUCT_BUNDLE_IDENTIFIER = com.svend.uPic.uPicFinderExtension;
13311331
PRODUCT_NAME = "$(TARGET_NAME)";
13321332
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -1343,7 +1343,7 @@
13431343
CODE_SIGN_IDENTITY = "Apple Development";
13441344
CODE_SIGN_STYLE = Automatic;
13451345
COMBINE_HIDPI_IMAGES = YES;
1346-
CURRENT_PROJECT_VERSION = 20200723;
1346+
CURRENT_PROJECT_VERSION = 20200728;
13471347
DEVELOPMENT_TEAM = W863J6W8DZ;
13481348
ENABLE_HARDENED_RUNTIME = YES;
13491349
INFOPLIST_FILE = uPicFinderExtension/Info.plist;
@@ -1353,7 +1353,7 @@
13531353
"@executable_path/../../../../Frameworks",
13541354
);
13551355
MACOSX_DEPLOYMENT_TARGET = 10.12;
1356-
MARKETING_VERSION = 0.19.5;
1356+
MARKETING_VERSION = 0.19.6;
13571357
PRODUCT_BUNDLE_IDENTIFIER = com.svend.uPic.uPicFinderExtension;
13581358
PRODUCT_NAME = "$(TARGET_NAME)";
13591359
PROVISIONING_PROFILE_SPECIFIER = "";
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
22
"images" : [
33
{
4-
"idiom" : "universal",
54
"filename" : "lsky.png",
5+
"idiom" : "universal",
66
"scale" : "1x"
77
},
88
{
9-
"idiom" : "universal",
109
"filename" : "[email protected]",
10+
"idiom" : "universal",
1111
"scale" : "2x"
1212
},
1313
{
14-
"idiom" : "universal",
1514
"filename" : "[email protected]",
15+
"idiom" : "universal",
1616
"scale" : "3x"
1717
}
1818
],
1919
"info" : {
20-
"version" : 1,
21-
"author" : "xcode"
20+
"author" : "xcode",
21+
"version" : 1
2222
}
23-
}
23+
}
Loading
Loading
Loading

uPic/Assets.xcassets/hosts/host_icon_minio.imageset/Contents.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"images" : [
33
{
4-
"filename" : "MINIO_Bird.png",
4+
"filename" : "minio.png",
55
"idiom" : "universal",
66
"scale" : "1x"
77
},
88
{
9-
"filename" : "MINIO_Bird@2x.png",
9+
"filename" : "minio@2x.png",
1010
"idiom" : "universal",
1111
"scale" : "2x"
1212
},
1313
{
14-
"filename" : "MINIO_Bird@3x.png",
14+
"filename" : "minio@3x.png",
1515
"idiom" : "universal",
1616
"scale" : "3x"
1717
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading
Loading

uPic/Base.lproj/Main.storyboard

+27-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
33
<dependencies>
44
<deployment identifier="macosx"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15705"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097.2"/>
66
</dependencies>
77
<scenes>
88
<!--Application-->
@@ -105,7 +105,8 @@
105105
<outlet property="compressFactorMenuItem" destination="eIU-EA-uQZ" id="uMq-Nm-vXy"/>
106106
<outlet property="historyMenu" destination="MjM-mX-Ci5" id="b7E-HG-zZU"/>
107107
<outlet property="hostMenuItem" destination="d02-bT-1Lv" id="Ah0-J0-Z4M"/>
108-
<outlet property="ouputFormatMenuItem" destination="1BX-LF-q51" id="H54-M9-CBq"/>
108+
<outlet property="outputFormatEncodedMenuItem" destination="NcU-Ek-lED" id="yc4-kN-ufV"/>
109+
<outlet property="outputFormatMenuItem" destination="1BX-LF-q51" id="H54-M9-CBq"/>
109110
<outlet property="statusMenu" destination="fqV-BN-CNE" id="XoS-be-xDF"/>
110111
<outlet property="uploadFromPasteboardMenuItem" destination="orX-KL-q11" id="v7z-nL-hxW"/>
111112
<outlet property="uploadFromScreenshotMenuItem" destination="ueU-fm-1nn" id="Fnc-s1-TnL"/>
@@ -151,25 +152,44 @@
151152
<menuItem title="URL" id="U1c-9i-q5b">
152153
<modifierMask key="keyEquivalentModifierMask"/>
153154
<connections>
154-
<action selector="ouputFormatMenuItemClicked:" target="veO-oa-UPB" id="rRb-CM-Htv"/>
155+
<action selector="outputFormatMenuItemClicked:" target="veO-oa-UPB" id="rRb-CM-Htv"/>
155156
</connections>
156157
</menuItem>
157158
<menuItem title="HTML" tag="1" id="wCN-Y7-fdU">
158159
<modifierMask key="keyEquivalentModifierMask"/>
159160
<connections>
160-
<action selector="ouputFormatMenuItemClicked:" target="veO-oa-UPB" id="v5l-L7-7KA"/>
161+
<action selector="outputFormatMenuItemClicked:" target="veO-oa-UPB" id="v5l-L7-7KA"/>
161162
</connections>
162163
</menuItem>
163164
<menuItem title="Markdown" tag="2" id="Opc-aA-hUg">
164165
<modifierMask key="keyEquivalentModifierMask"/>
165166
<connections>
166-
<action selector="ouputFormatMenuItemClicked:" target="veO-oa-UPB" id="Xxd-x1-2BP"/>
167+
<action selector="outputFormatMenuItemClicked:" target="veO-oa-UPB" id="Xxd-x1-2BP"/>
167168
</connections>
168169
</menuItem>
169170
<menuItem title="UBB" tag="3" id="Hz2-gj-luo">
170171
<modifierMask key="keyEquivalentModifierMask"/>
171172
<connections>
172-
<action selector="ouputFormatMenuItemClicked:" target="veO-oa-UPB" id="BYo-1k-amH"/>
173+
<action selector="outputFormatMenuItemClicked:" target="veO-oa-UPB" id="BYo-1k-amH"/>
174+
</connections>
175+
</menuItem>
176+
</items>
177+
</menu>
178+
</menuItem>
179+
<menuItem title="Output format encode" id="NcU-Ek-lED">
180+
<modifierMask key="keyEquivalentModifierMask"/>
181+
<menu key="submenu" title="Output format encode" id="jbA-xM-vl3">
182+
<items>
183+
<menuItem title="On" id="ynd-0y-yEv">
184+
<modifierMask key="keyEquivalentModifierMask"/>
185+
<connections>
186+
<action selector="outputFormatEncodeMenuItemClicked:" target="veO-oa-UPB" id="Ihl-ST-fGa"/>
187+
</connections>
188+
</menuItem>
189+
<menuItem title="Off" tag="1" id="yW4-Cl-nF5">
190+
<modifierMask key="keyEquivalentModifierMask"/>
191+
<connections>
192+
<action selector="outputFormatEncodeMenuItemClicked:" target="veO-oa-UPB" id="lQv-LX-iqu"/>
173193
</connections>
174194
</menuItem>
175195
</items>

uPic/General/Managers/ConfigManager.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,15 @@ extension ConfigManager {
8888

8989
extension ConfigManager {
9090
func getOutputType() -> OutputType {
91-
return OutputType(value: Defaults[.ouputFormat])
91+
OutputType(value: Defaults[.outputFormat])
9292
}
9393

9494
func setOutputType(_ outputType: OutputType) {
95-
Defaults[.ouputFormat] = outputType.rawValue
95+
Defaults[.outputFormat] = outputType.rawValue
9696
}
9797

9898
func setOutputType(_ outputTypeRawValue: Int) {
99-
Defaults[.ouputFormat] = outputTypeRawValue
99+
Defaults[.outputFormat] = outputTypeRawValue
100100
}
101101
}
102102

uPic/General/Utils/PreferenceKey.swift

+13-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ struct Keys {
1212
static let firstUsage = "uPic_FirstUsage"
1313
static let hostItems = "uPic_hostItems"
1414
static let defaultHostId = "uPic_DefaultHostId"
15-
static let ouputFormat = "uPic_OutputFormat"
15+
static let outputFormat = "uPic_OutputFormat"
16+
static let outputFormatEncoded = "uPic_OutputFormatEncoded"
1617
static let historyList = "uPic_HistoryList_New"
1718
static let historyLimit = "uPic_HistoryLimit_New"
1819
static let compressFactor = "uPic_CompressFactor"
@@ -48,7 +49,8 @@ extension DefaultsKeys {
4849
static let firstUsage = DefaultsKey<String>(Keys.firstUsage)
4950
static let hostItems = DefaultsKey<[Host]>(Keys.hostItems)
5051
static let defaultHostId = DefaultsKey<String>(Keys.defaultHostId)
51-
static let ouputFormat = DefaultsKey<Int>(Keys.ouputFormat)
52+
static let outputFormat = DefaultsKey<Int>(Keys.outputFormat)
53+
static let outputFormatEncoded = DefaultsKey<Bool>(Keys.outputFormatEncoded)
5254
static let historyList = DefaultsKey<[[String: Any]]>(Keys.historyList)
5355
static let historyLimit = DefaultsKey<Int>(Keys.historyLimit)
5456
static let compressFactor = DefaultsKey<Int>(Keys.compressFactor)
@@ -64,6 +66,15 @@ extension DefaultsKeys {
6466
let Defaults = UserDefaults.standard
6567

6668
extension UserDefaults {
69+
subscript(key: DefaultsKey<Bool>) -> Bool? {
70+
get {
71+
bool(forKey: key._key)
72+
}
73+
set {
74+
set(newValue, forKey: key._key)
75+
}
76+
}
77+
6778
subscript(key: DefaultsKey<String>) -> String? {
6879
get {
6980
return string(forKey: key._key)

uPic/Models/OutputType.swift

+8-9
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,27 @@ enum OutputType: Int {
4747
}
4848

4949
func formatUrl(_ url: String) -> String {
50-
let url = url.urlDecoded()
50+
var formatUrl = url
51+
if Defaults[.outputFormatEncoded]! {
52+
formatUrl = url.urlEncoded()
53+
}
5154
var filename = url.lastPathComponent.deletingPathExtension.trim()
5255
let tempArr = filename.components(separatedBy: .whitespaces).map{ $0.trim() }.filter{ !$0.isEmpty }
5356
filename = tempArr.joined(separator: "")
54-
55-
let encodedUrl = url.urlOutputEncoded()
5657
var outputUrl = ""
5758
switch self {
5859
case .html:
59-
outputUrl = "<img src='\(encodedUrl)' alt='\(filename)'/>"
60+
outputUrl = "<img src='\(formatUrl)' alt='\(filename)'/>"
6061
break
6162
case .markdown:
62-
outputUrl = "![\(filename)](\(encodedUrl))"
63+
outputUrl = "![\(filename)](\(formatUrl))"
6364
break
6465
case .ubb:
65-
outputUrl = "[img]\(encodedUrl)[/img]"
66+
outputUrl = "[img]\(formatUrl)[/img]"
6667
break
6768
default:
68-
outputUrl = encodedUrl
69-
69+
outputUrl = formatUrl
7070
}
71-
7271
return outputUrl
7372
}
7473
}

0 commit comments

Comments
 (0)