Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
674b7b9
MAS
gee1k Jan 15, 2021
725f135
删除打赏、重启 Finder
gee1k Jan 16, 2021
15e9ece
修改一些信息
L1cardo Jan 16, 2021
96e67cc
Merge branch 'feature/mas' into feature/mas
L1cardo Jan 16, 2021
71be7e4
Merge pull request #169 from L1cardo/feature/mas
gee1k Jan 16, 2021
f8229e8
增加 自定义输出格式配置
L1cardo Jan 17, 2021
e9f6e80
输出格式支持自定义、上传记录图床、大小、时间
gee1k Jan 18, 2021
601e275
修正 Share 分享路径
gee1k Jan 18, 2021
cef4c05
添加磁盘访问授权
L1cardo Jan 18, 2021
ba9dba0
授权磁盘访问
gee1k Jan 19, 2021
a443774
添加欢迎界面,优化数据库页面
L1cardo Jan 20, 2021
3ff0689
接入欢迎页、改造磁盘授权逻辑
gee1k Jan 20, 2021
9ba3447
releasing v1.1.0
gee1k Jan 20, 2021
d55d5d0
添加重启 finder 的帮助
L1cardo Jan 20, 2021
cc8c139
Releasing v1.1.0 build 7
gee1k Jan 20, 2021
9b26605
增加截图权限获取教程、首次请求磁盘权限改为用户主目录
gee1k Jan 21, 2021
62111f7
修复问题
gee1k Jan 23, 2021
765fe5e
数据库界面增加新功能
L1cardo Jan 24, 2021
a48dd1f
录屏权限页面添加约束
L1cardo Jan 24, 2021
467d42a
修复 Bugs 和更新阿里云区域数据
gee1k Jan 25, 2021
be36231
更新命令行参数
gee1k Feb 18, 2021
9cbefbe
移除 Finder Toolbar
gee1k Apr 25, 2021
2f0b4b0
添加 apple script支持
L1cardo Jun 6, 2021
9fe4ab0
升级LoginServiceKit 到版本2.2.1,修复问题#180
L1cardo Jun 6, 2021
ba8d8ac
v1.2.0
gee1k Jun 7, 2021
4d548d2
Add ImageCodec #194
bqlin Jun 15, 2021
832dfe5
Remove ImageCodec meta files
bqlin Jun 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
修复问题
1.修复在使用自定义 S3 协议图床时可能会无法上传的问题
2.修复自定义图床的其他字段无法保存的问题
3.优化本地化文字
4.修复一些其他 bug
  • Loading branch information
gee1k committed Jan 23, 2021
commit 62111f7e1d0b897a4cc96f76e99dd3e00a93eeed
28 changes: 16 additions & 12 deletions uPic.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
16AFDB3424E50DD30008E5A7 /* S3Util.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16AFDB3324E50DD30008E5A7 /* S3Util.swift */; };
16AFDB3624E50F0A0008E5A7 /* S3ConfigView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16AFDB3524E50F0A0008E5A7 /* S3ConfigView.swift */; };
16AFDB3824E50F450008E5A7 /* S3Region.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16AFDB3724E50F450008E5A7 /* S3Region.swift */; };
16B4314625BC8D2F00651BE0 /* ScreenshotAuthorizationHelpViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16B4314525BC8D2F00651BE0 /* ScreenshotAuthorizationHelpViewController.swift */; };
16B4F0BC23ADCFAC00846BD3 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 164745EF22B65FE900F9575D /* String+Extension.swift */; };
16B4F0BE23ADD09300846BD3 /* String+Crypto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16B4F0BD23ADCFFF00846BD3 /* String+Crypto.swift */; };
16BDDDFF22EA96AE0080E467 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 16BDDDFE22EA96AE0080E467 /* Assets.xcassets */; };
Expand Down Expand Up @@ -309,6 +310,7 @@
16AFDB3324E50DD30008E5A7 /* S3Util.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = S3Util.swift; sourceTree = "<group>"; };
16AFDB3524E50F0A0008E5A7 /* S3ConfigView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = S3ConfigView.swift; sourceTree = "<group>"; };
16AFDB3724E50F450008E5A7 /* S3Region.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = S3Region.swift; sourceTree = "<group>"; };
16B4314525BC8D2F00651BE0 /* ScreenshotAuthorizationHelpViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScreenshotAuthorizationHelpViewController.swift; sourceTree = "<group>"; };
16B4F0BD23ADCFFF00846BD3 /* String+Crypto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Crypto.swift"; sourceTree = "<group>"; };
16BDDDFE22EA96AE0080E467 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
16BDDE0222EAA2920080E467 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
Expand Down Expand Up @@ -724,6 +726,7 @@
isa = PBXGroup;
children = (
165C86D525B91F8000C538AD /* ScreenshotAuthorizationHelp.storyboard */,
16B4314525BC8D2F00651BE0 /* ScreenshotAuthorizationHelpViewController.swift */,
);
path = ScreenshotAuthorizationHelpWindow;
sourceTree = "<group>";
Expand Down Expand Up @@ -1133,6 +1136,7 @@
1647474322B66ACE00F9575D /* Data+Extension.swift in Sources */,
167D7F4B22B4D31300DD0A7A /* HostType.swift in Sources */,
167620EE23081B0C008F8363 /* ImgurUploader.swift in Sources */,
16B4314625BC8D2F00651BE0 /* ScreenshotAuthorizationHelpViewController.swift in Sources */,
1690E7E422BF111500FC81F8 /* QiniuConfigView.swift in Sources */,
1690E7E922BF1A6D00FC81F8 /* QiniuRegion.swift in Sources */,
965E817125B721650031A01F /* WelcomeViewController.swift in Sources */,
Expand Down Expand Up @@ -1466,7 +1470,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = W863J6W8DZ;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "$(SRCROOT)/uPic/Supporting Files/Info.plist";
Expand All @@ -1475,7 +1479,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.svend.uPic.macos;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1496,7 +1500,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = W863J6W8DZ;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "$(SRCROOT)/uPic/Supporting Files/Info.plist";
Expand All @@ -1505,7 +1509,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.svend.uPic.macos;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1522,7 +1526,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = W863J6W8DZ;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = uPicFinderExtension/Info.plist;
Expand All @@ -1532,7 +1536,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.svend.uPic.macos.uPicFinderExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1549,7 +1553,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = W863J6W8DZ;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = uPicFinderExtension/Info.plist;
Expand All @@ -1559,7 +1563,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.svend.uPic.macos.uPicFinderExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1575,7 +1579,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = W863J6W8DZ;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = uPicShareExtension/Info.plist;
Expand All @@ -1585,7 +1589,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.svend.uPic.macos.uPicShareExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1601,7 +1605,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = W863J6W8DZ;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = uPicShareExtension/Info.plist;
Expand All @@ -1611,7 +1615,7 @@
"@executable_path/../../../../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.12;
MARKETING_VERSION = 1.1.0;
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.svend.uPic.macos.uPicShareExtension;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down
1 change: 0 additions & 1 deletion uPic/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ extension AppDelegate {
if !hasPermission {
// 无截图权限,申请截图权限并弹出帮助界面、跳转到设置界面
ScreenUtil.requestRecordScreenPermissions()
ScreenUtil.openPrivacyScreenCapture()

_ = WindowManager.shared.showWindow(storyboard: "ScreenshotAuthorizationHelp", withIdentifier: "screenshotAuthorizationHelpWindowController")
return
Expand Down
2 changes: 1 addition & 1 deletion uPic/Models/S3/S3HostConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import SwiftyJSON

@objcMembers
class S3HostConfig: HostConfig {
dynamic var region: String = ""
dynamic var region: String?
dynamic var endpoint: String?
dynamic var bucket: String = ""
dynamic var accessKey: String = ""
Expand Down
4 changes: 2 additions & 2 deletions uPic/Models/S3/S3Region.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ public class S3Region {
return regionDict["name"] ?? key
}

public static func endPoint(_ key: String) -> String {
if key.isEmpty {
public static func endPoint(_ key: String?) -> String {
guard let key = key, !key.isEmpty else {
return ""
}
if key == "cn-north-1" || key == "cn-northwest-1" {
Expand Down
8 changes: 6 additions & 2 deletions uPic/Models/S3/S3Uploader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ class S3Uploader: BaseUploader {
let accessKey = config.accessKey
let secretKey = config.secretKey
let domain = config.domain
let region = AWSSDKSwiftCore.Region(rawValue: config.region)
var region = config.region == nil ? .useast1 : AWSSDKSwiftCore.Region(rawValue: config.region!)

var endpoint = config.endpoint

if !customize {
if customize {
region = .useast1
} else {
endpoint = S3Region.endPoint(config.region)
}

Expand Down Expand Up @@ -85,6 +87,8 @@ class S3Uploader: BaseUploader {
case .failure(let e):
if let s3Error = e as? S3ErrorType {
super.faild(errorMsg: s3Error.description)
} else if let s3Error = e as? AWSResponseError {
super.faild(errorMsg: s3Error.message)
} else {
super.faild(errorMsg: e.localizedDescription)
}
Expand Down
2 changes: 1 addition & 1 deletion uPic/Models/S3/S3Util.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import SwiftyJSON
public class S3Util {
private static let schema = "https://"

static func computeUrl(bucket: String, region: String, customize: Bool, endpoint: String?) -> String {
static func computeUrl(bucket: String, region: String?, customize: Bool, endpoint: String?) -> String {

if customize, let endpoint = endpoint {
if (endpoint.last == "/") {
Expand Down
9 changes: 3 additions & 6 deletions uPic/Notifier/Notifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,22 @@ public extension Notifier where Notification.RawValue == String {
static func postNotification(_ notification: Notification, object: String? = nil, userInfo: [AnyHashable: Any]? = nil) {
let name = nameFor(notification: notification)

DistributedNotificationCenter.default()
.postNotificationName(NSNotification.Name(rawValue: name), object: object, userInfo: userInfo, deliverImmediately: true)
NotificationCenter.default.post(name: NSNotification.Name(rawValue: name), object: object, userInfo: userInfo)
}

// addObserver

static func addObserver(observer: AnyObject, selector: Selector, notification: Notification, object: String? = nil) {
let name = nameFor(notification: notification)

DistributedNotificationCenter.default()
.addObserver(observer, selector: selector, name: NSNotification.Name(rawValue: name), object: object)
NotificationCenter.default.addObserver(observer, selector: selector, name: NSNotification.Name(rawValue: name), object: object)
}

// removeObserver

static func removeObserver(observer: AnyObject, notification: Notification, object: String? = nil) {
let name = nameFor(notification: notification)

DistributedNotificationCenter.default()
.removeObserver(observer, name: NSNotification.Name(rawValue: name), object: object)
NotificationCenter.default.removeObserver(observer, name: NSNotification.Name(rawValue: name), object: object)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class S3ConfigView: ConfigView {
if selectRegion != nil {
regionButtonPopUp.select(selectRegion)
// 初次设置,手动处罚一下事件,将数据写入data
if data.region.isEmpty {
if data.region == nil || data.region!.isEmpty {
self.regionChange(regionButtonPopUp)
}
}
Expand Down Expand Up @@ -204,6 +204,10 @@ class S3ConfigView: ConfigView {
endpointLabel.isHidden = !customize
endpointField.isHidden = !customize

if (customize) {
self.data?.setValue(nil, forKey: "region")
}

if (!customize && !endpointField.stringValue.isEmpty) {
endpointField.stringValue = ""
self.data?.setValue(nil, forKey: "endpoint")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@
"ugx-B2-gPe.title" = "圖標:";

/* Class = "NSTextFieldCell"; title = "✋Welcome Page:"; ObjectID = "ul8-3a-sB4"; */
"ul8-3a-sB4.title" = "✋欢迎页:";
"ul8-3a-sB4.title" = "✋歡迎頁:";

/* Class = "NSTextFieldCell"; title = "Output Format Customization"; ObjectID = "w0T-ah-0NT"; */
"w0T-ah-0NT.title" = "输出格式自定义";
"w0T-ah-0NT.title" = "輸出格式自定義";

/* Class = "NSTextFieldCell"; title = "💬 Telegram:"; ObjectID = "yO0-9g-BJK"; */
"yO0-9g-BJK.title" = "💬 Telegram:";
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@
</objects>
<point key="canvasLocation" x="-325" y="10"/>
</scene>
<!--View Controller-->
<!--Screenshot Authorization Help View Controller-->
<scene sceneID="Byu-fP-b39">
<objects>
<viewController id="XVs-vl-zI8" sceneMemberID="viewController">
<viewController id="XVs-vl-zI8" customClass="ScreenshotAuthorizationHelpViewController" customModule="uPic" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" id="fuL-gK-zxy">
<rect key="frame" x="0.0" y="0.0" width="654" height="815"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="heY-B4-ZcQ">
<rect key="frame" x="32" y="776" width="591" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="请打开系统偏好设置,“点击安全性与隐私”" id="8OE-MZ-BV3">
<textFieldCell key="cell" lineBreakMode="charWrapping" alignment="center" title="请打开系统偏好设置,“点击安全性与隐私”" usesSingleLineMode="YES" id="8OE-MZ-BV3">
<font key="font" metaFont="systemBold" size="16"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -54,7 +54,7 @@
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cun-fB-NG4">
<rect key="frame" x="32" y="385" width="591" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" alignment="center" title="授予 uPic “屏幕录制”权限" id="qqL-jK-k4X">
<textFieldCell key="cell" lineBreakMode="charWrapping" alignment="center" title="授予 uPic “屏幕录制”权限" usesSingleLineMode="YES" id="qqL-jK-k4X">
<font key="font" metaFont="systemBold" size="16"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -70,8 +70,22 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="screenshotHelp2" id="6tu-Xr-Ja0"/>
</imageView>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CTh-1S-N6J">
<rect key="frame" x="233" y="9" width="189" height="38"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Open Security &amp; Privacy" bezelStyle="rounded" alignment="center" state="on" borderStyle="border" inset="2" id="MZV-nV-okO">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="didClickopenPreferencesButton:" id="nbu-Rg-mfb"/>
</connections>
</button>
</subviews>
</view>
<connections>
<outlet property="openPreferencesButton" destination="CTh-1S-N6J" id="1Hv-rd-hUX"/>
</connections>
</viewController>
<customObject id="nE2-7X-yIo" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// ScreenshotAuthorizationHelpViewController.swift
// uPic
//
// Created by Svend Jin on 2021/1/24.
// Copyright © 2021 Svend Jin. All rights reserved.
//

import Cocoa

class ScreenshotAuthorizationHelpViewController: NSViewController {

@IBOutlet weak var openPreferencesButton: NSButton!

@IBAction func didClickopenPreferencesButton(_ sender: NSButton) {
ScreenUtil.openPrivacyScreenCapture()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"IIp-aX-hKg.title" = "Get Screenshot Permission Tutorial";

/* Class = "NSTextFieldCell"; title = "请打开系统偏好设置,“点击安全性与隐私”"; ObjectID = "8OE-MZ-BV3"; Note = "step1"; */
"8OE-MZ-BV3.title" = "Please open System Preferences and click `Security and Privacy`.";
"8OE-MZ-BV3.title" = "Please open System Preferences and click `Security and Privacy`";

/* Class = "NSTextFieldCell"; title = "授予 uPic “屏幕录制”权限"; ObjectID = "qqL-jK-k4X"; */
"qqL-jK-k4X.title" = "Grant uPic `screen recording` permission";

/* Class = "NSButton"; title = "Open Security & Privacy"; ObjectID = "MZV-nV-okO"; */
"MZV-nV-okO.title" = "Open Security & Privacy";
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@

/* Class = "NSTextFieldCell"; title = "授予 uPic “屏幕录制”权限"; ObjectID = "qqL-jK-k4X"; */
"qqL-jK-k4X.title" = "授予 uPic “屏幕录制”权限";

/* Class = "NSButton"; title = "Open Security & Privacy"; ObjectID = "MZV-nV-okO"; */
"MZV-nV-okO.title" = "打开安全性与隐私";
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@

/* Class = "NSTextFieldCell"; title = "授予 uPic “屏幕录制”权限"; ObjectID = "qqL-jK-k4X"; */
"qqL-jK-k4X.title" = "授予 uPic “荧幕錄製”許可權";

/* Class = "NSButton"; title = "Open Security & Privacy"; ObjectID = "MZV-nV-okO"; */
"MZV-nV-okO.title" = "打開安全性與隱私";
6 changes: 0 additions & 6 deletions uPic/Views/WelcomeView/WelcomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ class WelcomViewController: NSViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do view setup here.
// 打开偏好设置时在 Dock 栏显示应用图标,方便用户再次返回设置界面
if NSApp.activationPolicy() == .accessory {
NSApp.setActivationPolicy(.regular)
}

closeButton.alphaValue = 0.5

Expand Down Expand Up @@ -65,8 +61,6 @@ class WelcomViewController: NSViewController {

func closeWindow(_ sender: Any) {
view.window?.close()
// 关闭偏好设置时在去掉 Dock 栏显示应用图标
NSApp.setActivationPolicy(.accessory)
}

}
Expand Down
Loading