From 11fd8685deefb4515ddc495294346ff7b1e7907b Mon Sep 17 00:00:00 2001 From: Tisfeng Date: Sat, 30 Mar 2024 22:05:49 +0800 Subject: [PATCH 1/2] Revert "Feautre tips view (#418)" (#477) This reverts commit 074bb73193d0637c38f7f3c41e3bd5b3d976f97f. --- Easydict.xcodeproj/project.pbxproj | 6 - .../tip_Normal.imageset/Contents.json | 22 -- .../tip_Normal.imageset/tip_Normal.png | Bin 907 -> 0 bytes .../tip_Normal.imageset/tip_Normal@2x.png | Bin 2088 -> 0 bytes Easydict/App/Localizable.xcstrings | 203 ------------- .../Feature/Configuration/Configuration.swift | 2 - .../EZCategory/NSString/NSString+EZUtils.h | 5 - .../EZCategory/NSString/NSString+EZUtils.m | 17 +- .../ViewController/Cell/EZTableTipsCell.h | 19 -- .../ViewController/Cell/EZTableTipsCell.m | 266 ------------------ .../View/CustomButton/EZButton/EZButton.h | 2 - .../View/CustomButton/EZButton/EZButton.m | 6 - .../EZBaseQueryViewController.h | 1 - .../EZBaseQueryViewController.m | 64 +---- .../Window/WindowManager/EZWindowManager.m | 5 +- .../Configuration+Defaults.swift | 2 - .../View/SettingView/Tabs/AdvancedTab.swift | 5 +- 17 files changed, 8 insertions(+), 617 deletions(-) delete mode 100644 Easydict/App/Assets.xcassets/tip_Normal.imageset/Contents.json delete mode 100644 Easydict/App/Assets.xcassets/tip_Normal.imageset/tip_Normal.png delete mode 100644 Easydict/App/Assets.xcassets/tip_Normal.imageset/tip_Normal@2x.png delete mode 100644 Easydict/Feature/ViewController/Cell/EZTableTipsCell.h delete mode 100644 Easydict/Feature/ViewController/Cell/EZTableTipsCell.m diff --git a/Easydict.xcodeproj/project.pbxproj b/Easydict.xcodeproj/project.pbxproj index cded438e9..900cdfece 100644 --- a/Easydict.xcodeproj/project.pbxproj +++ b/Easydict.xcodeproj/project.pbxproj @@ -294,7 +294,6 @@ 9672D7D22B4008B40023B8FB /* MASShortcutBinder+EZMASShortcutBinder.m in Sources */ = {isa = PBXBuildFile; fileRef = 9672D7D12B4008B40023B8FB /* MASShortcutBinder+EZMASShortcutBinder.m */; }; 967712EA2B5B913600105E0F /* KeyHolder in Frameworks */ = {isa = PBXBuildFile; productRef = 967712E92B5B913600105E0F /* KeyHolder */; }; 967712EE2B5B943400105E0F /* Shortcut.swift in Sources */ = {isa = PBXBuildFile; fileRef = 967712ED2B5B943400105E0F /* Shortcut.swift */; }; - 96DFEB832B82588000F5C7EF /* EZTableTipsCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 96DFEB822B82588000F5C7EF /* EZTableTipsCell.m */; }; A0B65CA0F31AC8ECFB8347CC /* Pods_EasydictTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 378E73A7EA8FC8FB9C975A63 /* Pods_EasydictTests.framework */; }; B87AC7E36367075BA5D13234 /* Pods_Easydict.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6372B33DFF803C7096A82250 /* Pods_Easydict.framework */; }; C415C0AD2B450D4800A9D231 /* GeminiService.swift in Sources */ = {isa = PBXBuildFile; fileRef = C415C0AC2B450D4800A9D231 /* GeminiService.swift */; }; @@ -826,8 +825,6 @@ 9672D7D02B4008B40023B8FB /* MASShortcutBinder+EZMASShortcutBinder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MASShortcutBinder+EZMASShortcutBinder.h"; sourceTree = ""; }; 9672D7D12B4008B40023B8FB /* MASShortcutBinder+EZMASShortcutBinder.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "MASShortcutBinder+EZMASShortcutBinder.m"; sourceTree = ""; }; 967712ED2B5B943400105E0F /* Shortcut.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Shortcut.swift; sourceTree = ""; }; - 96DFEB812B82588000F5C7EF /* EZTableTipsCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EZTableTipsCell.h; sourceTree = ""; }; - 96DFEB822B82588000F5C7EF /* EZTableTipsCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EZTableTipsCell.m; sourceTree = ""; }; A230E9A2358C7FBC7FB26189 /* Pods-EasydictTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EasydictTests.debug.xcconfig"; path = "Target Support Files/Pods-EasydictTests/Pods-EasydictTests.debug.xcconfig"; sourceTree = ""; }; C415C0AC2B450D4800A9D231 /* GeminiService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeminiService.swift; sourceTree = ""; }; C4DD01E82B12B3C80025EE8E /* TencentService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TencentService.swift; sourceTree = ""; }; @@ -1505,8 +1502,6 @@ children = ( 0396D60F292C932F006A11D9 /* EZSelectLanguageCell.h */, 0396D610292C932F006A11D9 /* EZSelectLanguageCell.m */, - 96DFEB812B82588000F5C7EF /* EZTableTipsCell.h */, - 96DFEB822B82588000F5C7EF /* EZTableTipsCell.m */, 037852B7295D49F900D0E2CF /* EZTableRowView.h */, 037852B8295D49F900D0E2CF /* EZTableRowView.m */, ); @@ -3013,7 +3008,6 @@ 03B022FE29231FA6001C7E63 /* EZBaseQueryViewController.m in Sources */, DC6D9C892B3969510055EFFC /* Appearance.swift in Sources */, 0396D611292C932F006A11D9 /* EZSelectLanguageCell.m in Sources */, - 96DFEB832B82588000F5C7EF /* EZTableTipsCell.m in Sources */, 036196752A000F5900806370 /* FWEncryptorAES.m in Sources */, 9643D9462B71D103000FBEA6 /* KeyHolderRowView.swift in Sources */, 0399C6A829A74E0F00B4AFCC /* EZQueryResult+EZDeepLTranslateResponse.m in Sources */, diff --git a/Easydict/App/Assets.xcassets/tip_Normal.imageset/Contents.json b/Easydict/App/Assets.xcassets/tip_Normal.imageset/Contents.json deleted file mode 100644 index f008b3dac..000000000 --- a/Easydict/App/Assets.xcassets/tip_Normal.imageset/Contents.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "images" : [ - { - "filename" : "tip_Normal.png", - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "tip_Normal@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Easydict/App/Assets.xcassets/tip_Normal.imageset/tip_Normal.png b/Easydict/App/Assets.xcassets/tip_Normal.imageset/tip_Normal.png deleted file mode 100644 index b424c640e5254e7028b2e1cc3d9851aa73ae04ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 907 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VV{wqX6T`Z5GB1G~m(&Q)G+$o^ zEg+kNfw4W4fd!-lh^2s-fq{7eBLg##W(0{XV1mnvEMP{kK?*nB{qUE8f$6KKi(`m| z;L;FpAK^d|TjRM49R#|ax*HlbrOL#XsA_SSX7;QzxY{8t?0F}-amDFJWqa_Qx<{&>GHys++*Xo_gQ>J!})Hjjd1@*foj)iiP*Ql0qmQ_zFv3G+i$ zJCc?*eq8hLmt}HqP06=D1uk~W%j=JQZvDaZbl#r1J16C2>*`OmS>AV2Bgo~1((wlu zgyihgU%Z(1Yimc{p86y`f%E?$|;RMT07gKesPd}q&# ziFmguYsT`NnC|O#+gEqrxj65lk#b{{!Pm{5u@X0S2vmDX`N{D%Z#c@z=f3jMo6kGv zo@Fs(y?NqHqV1V;Yi@qOFt4ywAnL)gmwA~UE!$GooUO?42okzeY1KM!U;aUb{tsMc zHjmA#zZkWurR@*$Y35^yDE+$l`i$O^U3c5I*z(M5Uy)wYI^(q*xB0^);}80W8$*Qz zjlC?&en_}jAO99~S#+x43_*tou>sclYM)HiZ!h*wuv5Fv2a4ya@mt}HpFdz-57pSues&(3C1qa?%slQh7gJJH5*0i>IktKd7-<^@M^yIR*bTIW~+9Rb|=bF0(loEBf zm;d>lvPa_SY_6cqYYb+G-(Ru#f{bnL-i)>TTg#n;XMak1-MLA}IK3wBx{1p2CA0Xq zu1ITCX{i@A`D1Qke$A0rHz}!x=e>3OrCCx!Av&$TYlYkPgTe~DWM4fT;P5# diff --git a/Easydict/App/Assets.xcassets/tip_Normal.imageset/tip_Normal@2x.png b/Easydict/App/Assets.xcassets/tip_Normal.imageset/tip_Normal@2x.png deleted file mode 100644 index a8001c97e72770a12dd0e749c5c0fafef9941b8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2088 zcmV+@2-o+CP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91D4+uX1ONa40RR91C;$Ke0D9(TtN;K9l1W5CR9FeMSZiz)RTMsVW_J5r z=yO|I5GheHzS6XX5MNPDd_*x(FcO3DhYE@B#GfX{M1N?E!AE=~Dxy)0MkGQi#t=o3 zV7E`8Qjm6|2;JQR+ittt-JPAeo^xlWo!y;fr?uW>_uhN%Io~~V?s?o91`E{M+Q1`S z@E-+<9SIDFA6Ot*P!z;~e%v&jnAC3_92=V|#_wi*O-ub{I%7X0ZYTQdV;7TgYr&3kAN%TJKyKGoH#gVn zob3V5n%u|~4H60XMjhC%__TL+v@~`EMnVA#xOG`wldLHBF{a-I46egXYsDJl=Yhij z=TfJZ$?WPoeeSF!qnD~17#G1bkcjc;EPA27=n<1(TT8<=2zqmOF!T=1NioGMzl1*b z2r6FWA$bNE`y`XrUL-}Ys;{psuVh;@8T|{p;)LteTq$T5>{!uo4_fPUr1?AwhqbK= z+}N(bsul@qsu(V5kep7z;Gfg*`wQR(&WC4DYey6&ueX6~F2fVPf(b^tZ|gM*G1f5tkAV#?9F?1qVWgyjHs zkaAld^uSY_OJGrD;pbz>=<$|;$HSrZ@;EGOVh}hcGfjs(nyV}O&W^`Vy4l;6g5-0O zEd7LgmXdOtHmm~A(kB4)1n|_1|2yudC?#k#fTr36G&eFh)US{q+}%)Fwj&fvOgakL zh^`b|R_}WQW!BQMKK=NWP{>W|J2WWy)xQM6J(kk2Xpjlkpz;949qk*{r>0I?wkdNPYNGbt^v z664MHB!RF9Q((_^9yfPrk|d!|mO=$2;r8n_*n2=x3~YEuq#mF2GDi7oJpLBO z;f1bX_(Ou3u^>8ijhWroabT}f#wP}mgt4boLQRi#gZkI2AbA@>iyaa)`V-bu3kMDH zcuS0n&YEjgn$BRC`=m8EeFl|Vi+uwJZkQVW$BVDhQ9);)G$Ag!NIbJ>rbJ%H_ywX} zh&gAZ@uRcWv&$+K92Q@bzdz>;RNdUx#J0=jj*DB6q8jsT@H7X%2%Bt(vL+5?O@>cR z9Frh5X1GGlY8?Y9o0rNT!w?OPnGb7VXEWu@idql>dr4+s$aL%+fbwMk)=w@o7RxW; zf|kRI$=bl^`NL4q!p`Nh&xzgj%$oQ_E;Z7VjT2eA&Ww z;Lz31mCT?c8hTk{l3gN{TI7l^+`U5mOoK+x9w1cHS&NkVoMyN zocPFkDZE*|`=t>@ghiP2mdF|3iq#9N7Q0hndfq!qUUF-$@g2dZ>e6e%k9PkNKV>OW zt&|=1l(0?bqr6(hn%j1Do~Xr|*H6cz@Xe2O{TJ2?PEYEa#u5o}=fEph&(eyjkGRZF zW6> zG&7mzWI+qKeWibk*HiL7&1>-zQCFSs%Ct6tFHE8H#sj3))Yk6d$OlB9OPiO1v;kgl zo%2b7-SJ8_uf2rV7Ql2xe*Wccj(n#^f`Y#LV@wMFq5WqC>->$5+n+c!>`0$0(b;+2 zp-d9n^fcDDoJIjcO*Sv6I262sILE*FE6Cv(?KON{bXnV`QpTkq7CmRsP2Mafmy>xb zh}GZ=+GF3hJM*jATF_+q^>G+D3ea^GKa$?Y79ao)2VH{Vq43 z*=#~t!+BefQ0Uvrl9u>KFzt)rlU8Geq4(J|7XMy6*4M~#y+ett+M2byi^;!QY`Ff! Sl5~v#0000 - -NS_ASSUME_NONNULL_BEGIN - -@interface EZTableTipsCell : NSTableRowView - -- (CGFloat)cellHeight; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Easydict/Feature/ViewController/Cell/EZTableTipsCell.m b/Easydict/Feature/ViewController/Cell/EZTableTipsCell.m deleted file mode 100644 index 1d7563be5..000000000 --- a/Easydict/Feature/ViewController/Cell/EZTableTipsCell.m +++ /dev/null @@ -1,266 +0,0 @@ -// -// EZTableTipsCell.m -// Easydict -// -// Created by Sharker on 2024/2/18. -// Copyright © 2024 izual. All rights reserved. -// - -#import "EZTableTipsCell.h" -#import "EZOpenLinkButton.h" -#import "NSImage+EZSymbolmage.h" -#import "EZLanguageManager.h" - -@interface EZTableTipsCell () -@property (nonatomic, strong) NSView *contentView; -@property (nonatomic, strong) NSImageView *tipsIconImageView; -@property (nonatomic, strong) NSTextField *tipsNameLabel; -@property (nonatomic, strong) NSTextField *tipsContentLabel; -@property (nonatomic, strong) EZOpenLinkButton *moreBtn; -@property (nonatomic, strong) EZOpenLinkButton *solveBtn; -@property (nonatomic, strong) NSDictionary *dataDict; -@property (nonatomic, strong) NSString *questionSolveURL; -@property (nonatomic, strong) NSString *seeMoreURL; -@end - -@implementation EZTableTipsCell - -- (instancetype)initWithFrame:(NSRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self setupUI]; - [self updateQuestionContent]; - } - return self; -} - -- (void)setupUI { - // mas key - self.contentView.mas_key = @"topBarView"; - self.tipsIconImageView.mas_key = @"tipsIconImageView"; - self.tipsNameLabel.mas_key = @"tipsNameLabel"; - self.moreBtn.mas_key = @"moreBtn"; - self.solveBtn.mas_key = @"solveBtn"; - - CGSize iconSize = CGSizeMake(20, 20); - - // constraints - [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { - make.edges.mas_equalTo(0); - }]; - - [self.tipsIconImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(9); - make.top.mas_equalTo(9); - make.size.mas_equalTo(iconSize); - }]; - - [self.tipsNameLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.tipsIconImageView.mas_right).offset(6); - make.centerY.mas_equalTo(self.tipsIconImageView.mas_centerY).offset(1); - }]; - - [self.solveBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(9); - make.top.mas_equalTo(self.tipsContentLabel.mas_bottom).offset(9); - make.size.mas_equalTo(CGSizeMake(98, 32)); - }]; - - [self.moreBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.solveBtn.mas_right).offset(20); - make.top.mas_equalTo(self.solveBtn); - make.size.mas_equalTo(CGSizeMake(94, 32)); - }]; -} - -- (void)updateConstraints { - [self.tipsContentLabel mas_updateConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(9); - make.width.mas_lessThanOrEqualTo(self.bounds.size.width - 9); - make.top.mas_equalTo(self.tipsNameLabel.mas_bottom).offset(12); - }]; - - [super updateConstraints]; -} - -- (void)updateQuestionContent { - NSArray *questions = self.dataDict[@"questions"]; - int index = arc4random() % questions.count; - self.tipsContentLabel.stringValue = questions[index]; - NSArray *solves; - if ([EZLanguageManager.shared isSystemChineseFirstLanguage]) { - solves = self.dataDict[@"solveZh"]; - } else { - solves = self.dataDict[@"solveEn"]; - } - self.questionSolveURL = solves[index]; - self.solveBtn.link = self.questionSolveURL; -} - -- (CGFloat)cellHeight { - CGFloat cellHeight = 9 + 20 + 12 + self.tipsContentLabel.height + 9 + 32 + 6; - return cellHeight; -} - -#pragma mark - Accesstor -- (NSView *)contentView { - if (!_contentView) { - mm_weakify(self); - _contentView = [NSView mm_make:^(NSView *_Nonnull view) { - mm_strongify(self); - [self addSubview:view]; - view.wantsLayer = YES; - view.layer.cornerRadius = EZCornerRadius_8; - [view.layer excuteLight:^(CALayer *layer) { - layer.backgroundColor = [NSColor ez_titleBarBgLightColor].CGColor; - } dark:^(CALayer *layer) { - layer.backgroundColor = [NSColor ez_titleBarBgDarkColor].CGColor; - }]; - }]; - } - return _contentView; -} - -- (NSImageView *)tipsIconImageView { - if (!_tipsIconImageView) { - mm_weakify(self); - _tipsIconImageView = [NSImageView mm_make:^(NSImageView *imageView) { - mm_strongify(self); - [self.contentView addSubview:imageView]; - [imageView setImage:[NSImage imageNamed:@"tip_Normal"]]; - }]; - } - return _tipsIconImageView; -} - -- (NSTextField *)tipsNameLabel { - if (!_tipsNameLabel) { - mm_weakify(self); - _tipsNameLabel = [NSTextField mm_make:^(NSTextField *label) { - mm_strongify(self); - [self.contentView addSubview:label]; - label.stringValue = NSLocalizedString(@"tips_title", nil); - label.editable = NO; - label.bordered = NO; - label.backgroundColor = NSColor.clearColor; - label.alignment = NSTextAlignmentCenter; - label.font = [NSFont systemFontOfSize:14]; - [label excuteLight:^(NSTextField *label) { - label.textColor = [NSColor ez_resultTextLightColor]; - } dark:^(NSTextField *label) { - label.textColor = [NSColor ez_resultTextDarkColor]; - }]; - }]; - } - return _tipsNameLabel; -} - -- (NSTextField *)tipsContentLabel { - if (!_tipsContentLabel) { - mm_weakify(self); - _tipsContentLabel = [NSTextField mm_make:^(NSTextField *label) { - mm_strongify(self); - [self.contentView addSubview:label]; - label.editable = NO; - label.bordered = NO; - label.backgroundColor = NSColor.clearColor; - label.alignment = NSTextAlignmentLeft; - label.stringValue = self.dataDict[@"questions"][0]; - label.usesSingleLineMode = NO; - label.maximumNumberOfLines = 0; - [label excuteLight:^(NSTextField *label) { - label.textColor = [NSColor ez_resultTextLightColor]; - } dark:^(NSTextField *label) { - label.textColor = [NSColor ez_resultTextDarkColor]; - }]; - }]; - } - return _tipsContentLabel; -} - -- (EZOpenLinkButton *)moreBtn { - if (!_moreBtn) { - _moreBtn = [[EZOpenLinkButton alloc] init]; - [self addSubview:_moreBtn]; - NSImage *moreBtnImage = [NSImage ez_imageWithSymbolName:@"ellipsis.circle.fill"]; - _moreBtn.image = moreBtnImage; - _moreBtn.title = NSLocalizedString(@"tips_more", nil); - _moreBtn.imagePosition = NSImageLeft; - _moreBtn.edgeInsets = NSEdgeInsetsMake(0, 3, 0, 3); - [_moreBtn excuteLight:^(NSButton *button) { - button.image = [button.image imageWithTintColor:[NSColor ez_imageTintLightColor]]; - } dark:^(NSButton *button) { - button.image = [button.image imageWithTintColor:[NSColor ez_imageTintDarkColor]]; - }]; - _moreBtn.link = self.seeMoreURL; - } - return _moreBtn; -} - -- (EZOpenLinkButton *)solveBtn { - if (!_solveBtn) { - _solveBtn = [[EZOpenLinkButton alloc] init]; - [self addSubview:_solveBtn]; - NSImage *solveBtnImage = [NSImage ez_imageWithSymbolName:@"link.circle.fill"]; - _solveBtn.image = solveBtnImage; - _solveBtn.imagePosition = NSImageLeft; - _solveBtn.title = NSLocalizedString(@"tips_solve", nil); - _solveBtn.edgeInsets = NSEdgeInsetsMake(0, 3, 0, 3); - [_solveBtn excuteLight:^(NSButton *button) { - button.image = [button.image imageWithTintColor:[NSColor ez_imageTintLightColor]]; - } dark:^(NSButton *button) { - button.image = [button.image imageWithTintColor:[NSColor ez_imageTintDarkColor]]; - }]; - } - return _solveBtn; -} - -- (NSDictionary *)dataDict { - if (!_dataDict) { - _dataDict = @{ - @"questions" : @[ - NSLocalizedString(@"tips_text_empty", nil), - NSLocalizedString(@"tips_mouse_hover", nil), - NSLocalizedString(@"tips_beep", nil), - NSLocalizedString(@"tips_edit_button", nil), - NSLocalizedString(@"tips_might_selecting", nil), - NSLocalizedString(@"tips_word_selection_OCR", nil), - NSLocalizedString(@"tips_select_words", nil), - NSLocalizedString(@"tips_still_pop_up", nil), - ], - @"solveEn" : @[ - @"https://github.com/tisfeng/Easydict/wiki/FAQ#why-is-the-text-empty-when-i-select-words-in-some-applications", - @"https://github.com/tisfeng/Easydict/wiki/FAQ#why-cant-i-use-mouse-hover-to-select-words-in-some-applications", - @"https://github.com/tisfeng/Easydict/wiki/FAQ#why-is-there-a-beep-when-the-selected-word-is-empty-such-as-dragging-in-a-blank-area-in-some-applications", - @"https://github.com/tisfeng/Easydict/wiki/FAQ#why-does-the-edit-button-in-the-upper-right-corner-flicker-when-selecting-words-in-some-applications", - @"https://github.com/tisfeng/Easydict/wiki/FAQ#why-might-selecting-an-empty-word-interrupt-the-music-currently-playing", - @"https://github.com/tisfeng/Easydict/wiki/FAQ#why-do-word-selection-and-ocr-need-to-enable-system-related-permissions", - @"https://github.com/tisfeng/Easydict/wiki/FAQ#why-cant-i-select-words-on-some-web-pages-in-the-browser", - @"https://github.com/tisfeng/Easydict/wiki/FAQ#why-does-macos-still-pop-up-asking-for-permissions-even-though-i-have-given-easydict-the-accessibilityscreen-recording-permissions" - ], - @"solveZh" : @[ - @"https://github.com/tisfeng/Easydict/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98#%E4%B8%BA%E4%BB%80%E4%B9%88%E5%9C%A8%E6%9F%90%E4%BA%9B%E5%BA%94%E7%94%A8%E4%B8%AD%E5%8F%96%E8%AF%8D%E6%96%87%E6%9C%AC%E4%B8%BA%E7%A9%BA", - @"https://github.com/tisfeng/Easydict/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98#%E4%B8%BA%E4%BB%80%E4%B9%88%E5%9C%A8%E6%9F%90%E4%BA%9B%E5%BA%94%E7%94%A8%E4%B8%AD%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%E9%BC%A0%E6%A0%87%E5%88%92%E8%AF%8D", - @"https://github.com/tisfeng/Easydict/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98#%E4%B8%BA%E4%BB%80%E4%B9%88%E5%9C%A8%E6%9F%90%E4%BA%9B%E5%BA%94%E7%94%A8%E5%8F%96%E8%AF%8D%E4%B8%BA%E7%A9%BA%E7%A9%BA%E7%99%BD%E5%A4%84%E6%8B%96%E5%8A%A8%E7%AD%89%E6%97%B6%E4%BC%9A%E5%87%BA%E7%8E%B0%E6%8F%90%E7%A4%BA%E9%9F%B3", - @"https://github.com/tisfeng/Easydict/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98#%E4%B8%BA%E4%BB%80%E4%B9%88%E5%9C%A8%E6%9F%90%E4%BA%9B%E5%BA%94%E7%94%A8%E5%8F%96%E8%AF%8D%E6%97%B6%E5%8F%B3%E4%B8%8A%E8%A7%92%E7%BC%96%E8%BE%91%E6%8C%89%E9%92%AE%E4%BC%9A%E5%87%BA%E7%8E%B0%E9%97%AA%E7%83%81", - @"https://github.com/tisfeng/Easydict/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98#%E4%B8%BA%E4%BB%80%E4%B9%88%E5%8F%96%E8%AF%8D%E4%B8%BA%E7%A9%BA%E6%97%B6%E5%8F%AF%E8%83%BD%E6%89%93%E6%96%AD%E5%BD%93%E5%89%8D%E6%92%AD%E6%94%BE%E7%9A%84%E9%9F%B3%E4%B9%90", - @"https://github.com/tisfeng/Easydict/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98#%E4%B8%BA%E4%BB%80%E4%B9%88%E5%8F%96%E8%AF%8D%E5%92%8C-ocr-%E9%9C%80%E8%A6%81%E5%BC%80%E5%90%AF%E7%B3%BB%E7%BB%9F%E7%9B%B8%E5%85%B3%E6%9D%83%E9%99%90", - @"https://github.com/tisfeng/Easydict/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98#%E4%B8%BA%E4%BB%80%E4%B9%88%E6%B5%8F%E8%A7%88%E5%99%A8%E4%B8%AD%E6%9F%90%E4%BA%9B%E7%BD%91%E9%A1%B5%E6%97%A0%E6%B3%95%E5%8F%96%E8%AF%8D", - @"https://github.com/tisfeng/Easydict/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98#%E5%B7%B2%E7%BB%8F%E7%BB%99-easydict-%E8%BE%85%E5%8A%A9%E5%8A%9F%E8%83%BD%E5%BD%95%E5%B1%8F%E6%9D%83%E9%99%90-macos-%E4%BB%8D%E7%84%B6%E5%BC%B9%E7%AA%97%E8%A6%81%E6%B1%82%E7%BB%99%E4%BA%88%E6%9D%83%E9%99%90" - ], - }; - } - return _dataDict; -} - -- (NSString *)seeMoreURL { - if (!_seeMoreURL) { - if ([EZLanguageManager.shared isSystemChineseFirstLanguage]) { - _seeMoreURL = @"https://github.com/tisfeng/Easydict/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98"; - } else { - _seeMoreURL = @"https://github.com/tisfeng/Easydict/wiki/FAQ"; - } - } - return _seeMoreURL; -} -@end diff --git a/Easydict/Feature/ViewController/View/CustomButton/EZButton/EZButton.h b/Easydict/Feature/ViewController/View/CustomButton/EZButton/EZButton.h index 333c13991..8426194ab 100644 --- a/Easydict/Feature/ViewController/View/CustomButton/EZButton/EZButton.h +++ b/Easydict/Feature/ViewController/View/CustomButton/EZButton/EZButton.h @@ -65,8 +65,6 @@ typedef NS_ENUM(NSUInteger, EZButtonState) { @property (nonatomic, copy) NSAttributedString *attrTitle; -@property (nonatomic, assign) NSEdgeInsets edgeInsets; // setting button padding - @property (nonatomic, copy, nullable) void (^clickBlock)(EZButton *button); @property (nonatomic, copy, nullable) void (^mouseEnterBlock)(EZButton *button); diff --git a/Easydict/Feature/ViewController/View/CustomButton/EZButton/EZButton.m b/Easydict/Feature/ViewController/View/CustomButton/EZButton/EZButton.m index acd2490bc..5226f8e39 100644 --- a/Easydict/Feature/ViewController/View/CustomButton/EZButton/EZButton.m +++ b/Easydict/Feature/ViewController/View/CustomButton/EZButton/EZButton.m @@ -39,12 +39,6 @@ - (void)viewWillMoveToSuperview:(NSView *)newSuperview { [self updateButtonApperaceWithState:self.buttonState]; } -- (void)drawRect:(NSRect)dirtyRect { - NSRect originRect = self.bounds; - self.bounds = NSInsetRect(originRect, self.edgeInsets.left + self.edgeInsets.right, self.edgeInsets.top + self.edgeInsets.bottom); - [super drawRect:dirtyRect]; - self.bounds = originRect; -} #pragma mark - Mouse Actions diff --git a/Easydict/Feature/ViewController/Window/BaseQueryWindow/EZBaseQueryViewController.h b/Easydict/Feature/ViewController/Window/BaseQueryWindow/EZBaseQueryViewController.h index 2ab27da7f..c6a0136a6 100644 --- a/Easydict/Feature/ViewController/Window/BaseQueryWindow/EZBaseQueryViewController.h +++ b/Easydict/Feature/ViewController/Window/BaseQueryWindow/EZBaseQueryViewController.h @@ -62,7 +62,6 @@ NS_ASSUME_NONNULL_BEGIN - (void)disableReplaceTextButton; -- (void)updateActionType:(EZActionType)actionType; - (void)receiveTitlebarAction:(EZTitlebarAction)action; @end diff --git a/Easydict/Feature/ViewController/Window/BaseQueryWindow/EZBaseQueryViewController.m b/Easydict/Feature/ViewController/Window/BaseQueryWindow/EZBaseQueryViewController.m index ff6bcbdad..19b5d85f3 100644 --- a/Easydict/Feature/ViewController/Window/BaseQueryWindow/EZBaseQueryViewController.m +++ b/Easydict/Feature/ViewController/Window/BaseQueryWindow/EZBaseQueryViewController.m @@ -11,7 +11,6 @@ #import "EZQueryView.h" #import "EZResultView.h" #import "EZSelectLanguageCell.h" -#import "EZTableTipsCell.h" #import #import "EZCoordinateUtils.h" #import "EZWindowManager.h" @@ -33,7 +32,6 @@ static NSString *const EZQueryViewId = @"EZQueryViewId"; static NSString *const EZSelectLanguageCellId = @"EZSelectLanguageCellId"; -static NSString *const EZTableTipsCellId = @"EZTableTipsCellId"; static NSString *const EZResultViewId = @"EZResultViewId"; static NSString *const EZColumnId = @"EZColumnId"; @@ -57,7 +55,6 @@ @interface EZBaseQueryViewController () ("disableTipsViewKey", default: false) } extension Defaults.Keys { diff --git a/Easydict/NewApp/View/SettingView/Tabs/AdvancedTab.swift b/Easydict/NewApp/View/SettingView/Tabs/AdvancedTab.swift index b28381b93..c53648b10 100644 --- a/Easydict/NewApp/View/SettingView/Tabs/AdvancedTab.swift +++ b/Easydict/NewApp/View/SettingView/Tabs/AdvancedTab.swift @@ -26,9 +26,7 @@ struct AdvancedTab: View { Toggle(isOn: $enableBetaNewApp) { Text("enable_beta_new_app") } - Toggle(isOn: $disableTipsView) { - Text("disable_tips_view") - } + } header: { Text("setting.general.advance.header") } @@ -41,7 +39,6 @@ struct AdvancedTab: View { @Default(.defaultTTSServiceType) private var defaultTTSServiceType @Default(.enableBetaFeature) private var enableBetaFeature @Default(.enableBetaNewApp) private var enableBetaNewApp - @Default(.disableTipsView) private var disableTipsView } @available(macOS 13, *) From c3379367155823e93380f7e70159b8b43b33191d Mon Sep 17 00:00:00 2001 From: tisfeng Date: Mon, 25 Mar 2024 22:52:26 +0800 Subject: [PATCH 2/2] docs: update sponsor list --- README.md | 1 + README_EN.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 08d81daa4..f718215fc 100644 --- a/README.md +++ b/README.md @@ -815,6 +815,7 @@ Easydict 作为一个免费开源的非盈利项目,目前主要是作者个 | 2024-02-28 | | 20 | 感谢你的 Easydict | | 2024-03-11 | | 20 | 感谢 | | 2024-03-16 | 幻影 | 20 | 非常感谢 | +| 2024-03-25 | | 10 | 感谢大佬 |

diff --git a/README_EN.md b/README_EN.md index 87e0dfb94..f6c58fd27 100644 --- a/README_EN.md +++ b/README_EN.md @@ -812,6 +812,7 @@ If you don't want your username to be displayed in the list, please choose anony | 2024-02-28 | | 20 | 感谢你的 Easydict | | 2024-03-11 | | 20 | 感谢 | | 2024-03-16 | 幻影 | 20 | 非常感谢 | +| 2024-03-25 | | 10 | 感谢大佬 |