Skip to content

Commit

Permalink
[W][macos-10.15] - add icon.
Browse files Browse the repository at this point in the history
  • Loading branch information
whoooami committed Jan 17, 2024
1 parent fba17af commit a8a3b83
Show file tree
Hide file tree
Showing 27 changed files with 187 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "arrow_clockwise_circle.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"filename" : "camera-metering-spot_20.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "camera-metering-spot (1).png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"filename" : "edit-camera.viewfinder.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "edit-camera.viewfinder-1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions Easydict/App/Assets.xcassets/dock.rectangle.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "dock.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions Easydict/App/Assets.xcassets/highlighter.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"filename" : "select_40.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "select.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions Easydict/App/Assets.xcassets/keyboard.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"filename" : "keyboard_20.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "keyboard (2).png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions Easydict/App/Assets.xcassets/stop.circle.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "stop circle.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "2.1勾.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
16 changes: 8 additions & 8 deletions Easydict/Feature/Service/Caiyun/CaiyunService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ public final class CaiyunService: QueryService {
}
return orderedDict
}

override public func ocr(_: EZQueryModel) async throws -> EZOCRResult {
NSLog("Caiyun Translate does not support OCR")
throw QueryServiceError.notSupported
}
// override public func ocr(_: EZQueryModel) async throws -> EZOCRResult {
// NSLog("Caiyun Translate does not support OCR")
// throw QueryServiceError.notSupported
// }

private var apiEndPoint = "https://api.interpreter.caiyunai.com/v1/translator"

Expand All @@ -45,7 +45,7 @@ public final class CaiyunService: QueryService {
// easydict://writeKeyValue?EZCaiyunToken=
private var token: String {
let token = UserDefaults.standard.string(forKey: EZCaiyunToken)
if let token, !token.isEmpty {
if let token = token, !token.isEmpty {
return token
} else {
return CaiyunService.defaultTestToken
Expand Down Expand Up @@ -89,8 +89,8 @@ public final class CaiyunService: QueryService {
headers: headers)
.validate()
.responseDecodable(of: CaiyunResponse.self) { [weak self] response in
guard let self else { return }
let result = self.result
guard let me = self else { return }
let result = me.result
switch response.result {
case let .success(value):
result.from = from
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ - (void)setIsPlaying:(BOOL)isPlaying {
// NSImage *audioImage = [NSImage ez_imageWithSymbolName:symbolName size:CGSizeMake(15, 15)];

NSImage *playImage = [NSImage imageNamed:@"audio"];
NSImage *pauseImage = [NSImage ez_imageWithSymbolName:@"pause.circle"];
NSImage *pauseImage = [NSImage imageNamed:@"pause.circle"];

self.image = isPlaying ? pauseImage : playImage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ - (instancetype)initWithFrame:(NSRect)frameRect {
}

- (void)setup {
self.image = [NSImage ez_imageWithSymbolName:@"arrow.forward.square"];
self.image = [NSImage imageNamed:@"arrow.forward.square"];

[self excuteLight:^(NSButton *button) {
button.image = [button.image imageWithTintColor:[NSColor ez_imageTintLightColor]];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ @implementation EZSymbolImageButton

+ (instancetype)buttonWithSybolImageName:(NSString *)sybolImageName {
EZSymbolImageButton *button = [[EZSymbolImageButton alloc] init];
NSImage *audioImage = [NSImage ez_imageWithSymbolName:sybolImageName];
NSImage *audioImage = [NSImage imageNamed:@"audio"];
button.image = audioImage;

[button excuteLight:^(NSButton *button) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ - (void)setup {
[self addSubview:clearButton];
self.clearButton = clearButton;

NSImage *clearImage = [NSImage ez_imageWithSymbolName:@"xmark.circle.fill"];
NSImage *clearImage = [NSImage imageNamed:@"xmark.circle.fill"];
clearImage = [clearImage imageWithTintColor:[NSColor mm_colorWithHexString:@"#868686"]];
clearButton.image = clearImage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ - (void)setup {
EZHoverButton *stopButton = [[EZHoverButton alloc] init];
self.stopButton = stopButton;
[self addSubview:stopButton];
NSImage *stopImage = [NSImage ez_imageWithSymbolName:@"stop.circle"];
NSImage *stopImage = [NSImage imageNamed:@"stop.circle"];
stopImage = [stopImage imageWithTintColor:[NSColor mm_colorWithHexString:@"#707070"]];
stopButton.image = stopImage;
stopButton.mas_key = @"stopButton";
Expand All @@ -161,7 +161,7 @@ - (void)setup {
EZHoverButton *retryButton = [[EZHoverButton alloc] init];
self.retryButton = retryButton;
[self addSubview:retryButton];
NSImage *retryImage = [NSImage ez_imageWithSymbolName:@"arrow.clockwise.circle"];
NSImage *retryImage = [NSImage imageNamed:@"arrow.clockwise.circle"];
retryButton.image = retryImage;
retryButton.mas_key = @"retryButton";
retryButton.toolTip = NSLocalizedString(@"retry", nil);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ - (void)refreshWithResult:(EZQueryResult *)result {
EZOpenLinkButton *linkButton = [[EZOpenLinkButton alloc] init];
[self addSubview:linkButton];

NSImage *linkImage = [NSImage ez_imageWithSymbolName:@"link"];
NSImage *linkImage = [NSImage imageNamed:@"link"];
linkButton.image = linkImage;

NSString *toolTip = NSLocalizedString(@"open_web_link", nil);
Expand Down

0 comments on commit a8a3b83

Please sign in to comment.