From f4261de32a11a37717f945638a55476db1c22142 Mon Sep 17 00:00:00 2001 From: Nghia Tran Date: Fri, 22 Jun 2018 10:49:36 +0700 Subject: [PATCH 01/12] [ARTIFY-55] Add Randomize btn --- artify-core/artify-core/Models/Menu.swift | 3 +++ artify-core/artify-core/ViewModels/StatusBarViewModel.swift | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/artify-core/artify-core/Models/Menu.swift b/artify-core/artify-core/Models/Menu.swift index 77f7d8c..25029c3 100644 --- a/artify-core/artify-core/Models/Menu.swift +++ b/artify-core/artify-core/Models/Menu.swift @@ -12,6 +12,7 @@ public struct Menu { public enum Kind { case getFeature + case random case separator case aboutThisPhoto case launchOnStartup @@ -42,6 +43,8 @@ public struct Menu { return "About" case .aboutThisPhoto: return "About this Art" + case .random: + return "Randomize" } } diff --git a/artify-core/artify-core/ViewModels/StatusBarViewModel.swift b/artify-core/artify-core/ViewModels/StatusBarViewModel.swift index d8cc2d4..bf63055 100644 --- a/artify-core/artify-core/ViewModels/StatusBarViewModel.swift +++ b/artify-core/artify-core/ViewModels/StatusBarViewModel.swift @@ -58,6 +58,7 @@ public final class StatusBarViewModel: StatusBarViewModelType, StatusBarViewMode // MARK: - Output public let menuItems = Variable<[NSMenuItem]>([]) public let menus = Variable([Menu(kind: .getFeature, selector: #selector(StatusBarViewModel.getFeatureOnTap(_:)), keyEquivalent: "F"), + Menu(kind: .random, selector: #selector(StatusBarViewModel.getRandomOnTap), keyEquivalent: "R"), Menu(kind: .separator, selector: nil), Menu(kind: .aboutThisPhoto, selector: #selector(StatusBarViewModel.aboutThisArt)), Menu(kind: .separator, selector: nil), @@ -144,6 +145,10 @@ public final class StatusBarViewModel: StatusBarViewModelType, StatusBarViewMode getFeatureAction.execute(()) } + @objc private func getRandomOnTap() { + + } + @objc private func launchOnStartUp(_ menu: NSMenuItem) { let newState = (menu.state == NSControl.StateValue.on) ? NSControl.StateValue.off : NSControl.StateValue.on menu.state = newState From 2c1c760bb22a0af176ffa412956d17480f1adb56 Mon Sep 17 00:00:00 2001 From: Nghia Tran Date: Fri, 22 Jun 2018 11:25:36 +0700 Subject: [PATCH 02/12] [ARTIFY-55] Implement Get Random Photo --- .../Source/Services/FabricTracker.swift | 2 + .../artify-core/Services/ArtifyCoreAPI.swift | 5 ++ .../Services/DownloadService.swift | 16 +++- .../artify-core/Services/NetworkService.swift | 14 ++++ .../Services/TrackingService.swift | 3 + .../Services/WallpaperService.swift | 77 +++++++++++-------- .../ViewModels/StatusBarViewModel.swift | 6 +- 7 files changed, 87 insertions(+), 36 deletions(-) diff --git a/Artify/Artify/Source/Services/FabricTracker.swift b/Artify/Artify/Source/Services/FabricTracker.swift index 647d894..a2ea961 100644 --- a/Artify/Artify/Source/Services/FabricTracker.swift +++ b/Artify/Artify/Source/Services/FabricTracker.swift @@ -21,6 +21,8 @@ final class FabricTracker: Trackable { Answers.logCustomEvent(withName: type.methodName, customAttributes: nil) case .fetchFeaturePhoto(let param): Answers.logCustomEvent(withName: type.methodName, customAttributes: param.toAttribute()) + case .fetchRandomPhoto(let param): + Answers.logCustomEvent(withName: type.methodName, customAttributes: param.toAttribute()) case .launchOnStartup(let param): Answers.logCustomEvent(withName: type.methodName, customAttributes: param.toAttribute()) case .setWallapper(let param): diff --git a/artify-core/artify-core/Services/ArtifyCoreAPI.swift b/artify-core/artify-core/Services/ArtifyCoreAPI.swift index 4b310ee..e288725 100644 --- a/artify-core/artify-core/Services/ArtifyCoreAPI.swift +++ b/artify-core/artify-core/Services/ArtifyCoreAPI.swift @@ -12,6 +12,7 @@ import Alamofire enum ArtifyCoreAPI { case getFeature + case randomPhoto case checkUpdate(AppInfo) } @@ -24,6 +25,8 @@ extension ArtifyCoreAPI: TargetType { switch self { case .getFeature: return "feature/today" + case .randomPhoto: + return "feature/random" case .checkUpdate: return "version/update" } @@ -31,6 +34,8 @@ extension ArtifyCoreAPI: TargetType { var method: Moya.Method { switch self { + case .randomPhoto: + fallthrough case .checkUpdate: fallthrough case .getFeature: diff --git a/artify-core/artify-core/Services/DownloadService.swift b/artify-core/artify-core/Services/DownloadService.swift index 651010b..cc1b591 100644 --- a/artify-core/artify-core/Services/DownloadService.swift +++ b/artify-core/artify-core/Services/DownloadService.swift @@ -15,6 +15,7 @@ import Nuke protocol DownloadServiceType { func downloadFeaturePhoto() -> Observable + func downloadRandomPhoto() -> Observable } final class DownloadService: DownloadServiceType { @@ -41,6 +42,18 @@ final class DownloadService: DownloadServiceType { return self .network .fetchFeaturePhoto() + .flatMapLatest { self.downloadAndSavePhoto($0) } + } + + func downloadRandomPhoto() -> Observable { + return self + .network + .fetchRandomPhoto() + .flatMapLatest { self.downloadAndSavePhoto($0) } + } + + private func downloadAndSavePhoto(_ photo: Photo) -> Observable { + return Observable.just(photo) .flatMapLatest {[unowned self] (photo) -> Single in let imageRequest = ImageRequest(url: URL(string: photo.imageURL)!) return self.imagePipline @@ -51,7 +64,6 @@ final class DownloadService: DownloadServiceType { return self.fileHandler .rx_saveImageIfNeed(payload) .map { DownloadPayload(photo: payload.photo, fileUrl: $0) } - } + } } } - diff --git a/artify-core/artify-core/Services/NetworkService.swift b/artify-core/artify-core/Services/NetworkService.swift index 8fe54e3..8458452 100644 --- a/artify-core/artify-core/Services/NetworkService.swift +++ b/artify-core/artify-core/Services/NetworkService.swift @@ -14,6 +14,7 @@ protocol NetworkingServiceType { var provider: MoyaProvider { get } func fetchFeaturePhoto() -> Observable + func fetchRandomPhoto() -> Observable } @@ -43,6 +44,19 @@ final class NetworkingService: NetworkingServiceType { TrackingService.default.tracking(.fetchFeaturePhoto(FetchFeaturePhotoParam(isSuccess: false, error: error))) }) } + + func fetchRandomPhoto() -> Observable { + return provider + .rx + .request(.randomPhoto) + .mapToModel(type: Photo.self) + .asObservable() + .do(onNext: { (photo) in + TrackingService.default.tracking(.fetchRandomPhoto(FetchFeaturePhotoParam(isSuccess: true, photo: photo))) + }, onError: { (error) in + TrackingService.default.tracking(.fetchRandomPhoto(FetchFeaturePhotoParam(isSuccess: false, error: error))) + }) + } } // MARK: - Private diff --git a/artify-core/artify-core/Services/TrackingService.swift b/artify-core/artify-core/Services/TrackingService.swift index 153153d..8a7754c 100644 --- a/artify-core/artify-core/Services/TrackingService.swift +++ b/artify-core/artify-core/Services/TrackingService.swift @@ -24,6 +24,7 @@ public final class TrackingService: TrackingServiceType { case openApp case exitApp case fetchFeaturePhoto(FetchFeaturePhotoParam) + case fetchRandomPhoto(FetchFeaturePhotoParam) case launchOnStartup(LaunchOnStartupParam) case setWallapper(SetWallpaperParam) case appUpdated(AppUpdatedParam) @@ -42,6 +43,8 @@ public final class TrackingService: TrackingServiceType { return "Set wallpaper" case .appUpdated: return "App updated" + case .fetchRandomPhoto: + return "Fetch random photo" } } } diff --git a/artify-core/artify-core/Services/WallpaperService.swift b/artify-core/artify-core/Services/WallpaperService.swift index 86d3a8c..ce650be 100644 --- a/artify-core/artify-core/Services/WallpaperService.swift +++ b/artify-core/artify-core/Services/WallpaperService.swift @@ -13,6 +13,7 @@ import Action protocol WallpaperServiceType { var setFeaturePhotoAction: Action { get } + var randomizePhotoAction: Action { get } } final class WallpaperService: WallpaperServiceType { @@ -36,42 +37,51 @@ final class WallpaperService: WallpaperServiceType { // MARK: - Public lazy var setFeaturePhotoAction: Action = { return Action { (_) -> Observable in - return Observable.just(()) - .observeOn(ConcurrentDispatchQueueScheduler(qos: DispatchQoS.background)) - .flatMapLatest({[unowned self] _ -> Observable in - return self.downloadService.downloadFeaturePhoto() - }) - .flatMapLatest({[unowned self] (payload) -> Observable in - guard let image = NSImage(contentsOfFile: payload.fileUrl.path) else { - return .error(ArtfiyError.invalidFileURL(payload.fileUrl)) - } - let processPayload = WallpaperPayload(photo: payload.photo, - originalImage: image, - screenSize: self.screenSize, - effect: .gaussianBeautify) - return self.processor.rx_apply(payload: processPayload) - }) - .flatMapLatest({[unowned self] (payload) -> Observable<(Photo, URL)> in - let filePayload = FilePayload(image: payload.wallpaperImage, - photo: payload.photo, - prefix: self.screenSize.toString) - TrackingService.default.tracking(.setWallapper(SetWallpaperParam(photo: payload.photo, screenSize: self.screenSize))) - return self.fileHandler.rx_saveImageIfNeed(filePayload) - .map { return (payload.photo, $0) } - }) - .observeOn(MainScheduler.instance) - .do(onNext: { tub in - print("✅[SUCCESS] Set Wallpaper at \(tub.1)") - }, onError: { error in - print("❌[ERROR] \(error)") - }) - .flatMapLatest({[unowned self] (tub) -> Observable in - return self.setWallpaper(at: tub) - }) + return self.downloadService + .downloadFeaturePhoto() + .flatMapLatest {[unowned self] in self.processDownloadPayload($0) } + } + }() + lazy var randomizePhotoAction: Action = { + return Action { (_) -> Observable in + return self.downloadService + .downloadRandomPhoto() + .flatMapLatest {[unowned self] in self.processDownloadPayload($0) } } }() - + + private func processDownloadPayload(_ payload: DownloadPayload) -> Observable { + return Observable.just(payload) + .flatMapLatest({[unowned self] (payload) -> Observable in + guard let image = NSImage(contentsOfFile: payload.fileUrl.path) else { + return .error(ArtfiyError.invalidFileURL(payload.fileUrl)) + } + let processPayload = WallpaperPayload(photo: payload.photo, + originalImage: image, + screenSize: self.screenSize, + effect: .gaussianBeautify) + return self.processor.rx_apply(payload: processPayload) + }) + .flatMapLatest({[unowned self] (payload) -> Observable<(Photo, URL)> in + let filePayload = FilePayload(image: payload.wallpaperImage, + photo: payload.photo, + prefix: self.screenSize.toString) + TrackingService.default.tracking(.setWallapper(SetWallpaperParam(photo: payload.photo, screenSize: self.screenSize))) + return self.fileHandler.rx_saveImageIfNeed(filePayload) + .map { return (payload.photo, $0) } + }) + .observeOn(MainScheduler.instance) + .do(onNext: { tub in + print("✅[SUCCESS] Set Wallpaper at \(tub.1)") + }, onError: { error in + print("❌[ERROR] \(error)") + }) + .flatMapLatest({[unowned self] (tub) -> Observable in + return self.setWallpaper(at: tub) + }) + } + private func setWallpaper(at payload: (Photo, URL)) -> Observable { var isApplied = false @@ -93,3 +103,4 @@ final class WallpaperService: WallpaperServiceType { return Observable.just(payload.0) } } + diff --git a/artify-core/artify-core/ViewModels/StatusBarViewModel.swift b/artify-core/artify-core/ViewModels/StatusBarViewModel.swift index bf63055..4270e17 100644 --- a/artify-core/artify-core/ViewModels/StatusBarViewModel.swift +++ b/artify-core/artify-core/ViewModels/StatusBarViewModel.swift @@ -44,6 +44,7 @@ public final class StatusBarViewModel: StatusBarViewModelType, StatusBarViewMode // MARK: - Variable private let bag = DisposeBag() private let getFeatureAction: Action + private let getRandomAction: Action private let updater: AppUpdatable private let openAboutPublisher = PublishSubject() private let currentFeaturePhoto = Variable(nil) @@ -82,6 +83,9 @@ public final class StatusBarViewModel: StatusBarViewModelType, StatusBarViewMode // Feauture action getFeatureAction = Coordinator.default.wallpaperService.setFeaturePhotoAction + // Random + getRandomAction = Coordinator.default.wallpaperService.randomizePhotoAction + // isLoading isLoading = getFeatureAction.enabled .map { !$0 } @@ -146,7 +150,7 @@ public final class StatusBarViewModel: StatusBarViewModelType, StatusBarViewMode } @objc private func getRandomOnTap() { - + getRandomAction.execute(()) } @objc private func launchOnStartUp(_ menu: NSMenuItem) { From b6e7de0e4ac1277d5a0dd411c07efac92ae15af7 Mon Sep 17 00:00:00 2001 From: Nghia Tran Date: Fri, 22 Jun 2018 11:28:47 +0700 Subject: [PATCH 03/12] [ARTIFY-55] Merge Random & Feature Action to determine isLoading --- artify-core/artify-core/ViewModels/StatusBarViewModel.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/artify-core/artify-core/ViewModels/StatusBarViewModel.swift b/artify-core/artify-core/ViewModels/StatusBarViewModel.swift index 4270e17..cb0928c 100644 --- a/artify-core/artify-core/ViewModels/StatusBarViewModel.swift +++ b/artify-core/artify-core/ViewModels/StatusBarViewModel.swift @@ -87,7 +87,7 @@ public final class StatusBarViewModel: StatusBarViewModelType, StatusBarViewMode getRandomAction = Coordinator.default.wallpaperService.randomizePhotoAction // isLoading - isLoading = getFeatureAction.enabled + isLoading = Observable.merge([getFeatureAction.enabled, getRandomAction.enabled]) .map { !$0 } .distinctUntilChanged() .share() @@ -138,6 +138,7 @@ public final class StatusBarViewModel: StatusBarViewModelType, StatusBarViewMode .drive(onNext: {[weak self] (isLoading) in guard let strongSelf = self else { return } strongSelf.aboutThisArtBtn.isEnabled = !isLoading + }) .disposed(by: bag) From a9b09cc600a8908bb784ce64836fd2428eca7e1b Mon Sep 17 00:00:00 2001 From: Nghia Tran Date: Fri, 22 Jun 2018 12:05:23 +0700 Subject: [PATCH 04/12] Bump 0.9 --- Artify/Artify/Resources/Info/Info.plist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Artify/Artify/Resources/Info/Info.plist b/Artify/Artify/Resources/Info/Info.plist index 7efdd47..1a824b8 100644 --- a/Artify/Artify/Resources/Info/Info.plist +++ b/Artify/Artify/Resources/Info/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.8 + 0.9 CFBundleVersion - 900 + 950 Fabric APIKey From 3d3bdf91335071ed0782a4b6e681d434fd3c80ba Mon Sep 17 00:00:00 2001 From: Nghia Tran Date: Fri, 22 Jun 2018 12:18:33 +0700 Subject: [PATCH 05/12] [ARTIFY-57] Fix wrong currentPhoto --- .../artify-core/ViewModels/StatusBarViewModel.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/artify-core/artify-core/ViewModels/StatusBarViewModel.swift b/artify-core/artify-core/ViewModels/StatusBarViewModel.swift index cb0928c..b98f763 100644 --- a/artify-core/artify-core/ViewModels/StatusBarViewModel.swift +++ b/artify-core/artify-core/ViewModels/StatusBarViewModel.swift @@ -47,7 +47,7 @@ public final class StatusBarViewModel: StatusBarViewModelType, StatusBarViewMode private let getRandomAction: Action private let updater: AppUpdatable private let openAboutPublisher = PublishSubject() - private let currentFeaturePhoto = Variable(nil) + private let currentPhoto = Variable(nil) private var aboutThisArtBtn: NSMenuItem { let index = menus.value.index(where: { $0.kind == Menu.Kind.aboutThisPhoto } )! return menuItems.value[index] @@ -143,7 +143,8 @@ public final class StatusBarViewModel: StatusBarViewModelType, StatusBarViewMode .disposed(by: bag) // Hook the current feature photo - getFeatureAction.elements.bind(to: currentFeaturePhoto).disposed(by: bag) + getFeatureAction.elements.bind(to: currentPhoto).disposed(by: bag) + getRandomAction.elements.bind(to: currentPhoto).disposed(by: bag) } @objc private func getFeatureOnTap(_ menu: NSMenuItem) { @@ -179,7 +180,7 @@ public final class StatusBarViewModel: StatusBarViewModelType, StatusBarViewMode } @objc private func aboutThisArt() { - guard let photo = currentFeaturePhoto.value else { return } + guard let photo = currentPhoto.value else { return } let url = URL(string: photo.originalSource)! NSWorkspace.shared.open(url) } From b290cf18557a344ba1b72c434e7f60eaa221457e Mon Sep 17 00:00:00 2001 From: Nghia Tran Date: Fri, 22 Jun 2018 13:27:22 +0700 Subject: [PATCH 06/12] Bump 0.9.1 --- Artify/Artify/Resources/Info/Info.plist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Artify/Artify/Resources/Info/Info.plist b/Artify/Artify/Resources/Info/Info.plist index 1a824b8..93cbeb2 100644 --- a/Artify/Artify/Resources/Info/Info.plist +++ b/Artify/Artify/Resources/Info/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9 + 0.9.1 CFBundleVersion - 950 + 960 Fabric APIKey From 7b25e8ef68251292959631f89f3d1c9d82120ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Tue, 26 Jun 2018 23:38:39 +0200 Subject: [PATCH 07/12] Make quotes span full length in readme --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index e9f3680..65c08ac 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ After starting the development server. * **Is it a original idea?** > Nowadays, Almost idea is mixing. The original idea was inspired by a guy in HN-Show I've seen in a couple months ago. It's just a tool to generate a photo after dragging manually my original picture. It has lack of capability. - +> > I'm a lazy guy, I'd something could do it automatically every time. Ultimately, I came up with this idea. * **Where is the Backend side?** @@ -96,7 +96,7 @@ After starting the development server. * **Why do you choose RxSwift + MVVM?** > I have solid experience when working with RxSwift + MVVM for a couple projects on Production. I'm so happy when writing concise, elegant Observable, Driver,... rather than clumsy functions with tons of nested-callbacks. - +> > If something makes me happy, I will follow it. Simple enough 😂 * **Is this app built with Swift?** @@ -106,45 +106,44 @@ After starting the development server. * **Why is it an OSS?** > The source code is a trash if keep it in your inventory forever. I'd contribute back to the dev community when I have an opportunity. - +> > The best way is publishing your source code 👨‍💻. * **Why is 18th century art?** > Every time I have a short trip to an overseas country, I often spent 1 or 2 days to visit all famous art museum. I could stand for an hour to look at the detail, the scrape from those old oil photo. Individual traits could represent the history, the effort, the dream from original authors. - +> > I realize I fall in love with the 18th art somehow 🤣 - +> > Then I come up with the idea, why don't we bring it to everybody, who has the same passion as me. - -> Let imagine, every day, when I open my laptop at 9 AM, I can see the best photo of this day, with detail information, history, and the author. -That would be amazing 😱 - +> +> Let imagine, every day, when I open my laptop at 9 AM, I can see the best photo of this day, with detail information, history, and the author. That would be amazing 😱 +> > Without considering, I start to develop the macOS app as well as the [Artify-Core](https://github.com/NghiaTranUIT/artify-core), which is written by Golang. - +> > All of the art pictures will be hand-picked by me and my best girlfriend. Hope you enjoy it 😍 * **How does Artify generate the beautify wallpaper?** > **[DR;TL]** - +> > 1. Determine the golden size, which relies on your current screen size. It makes sure every generated wallpaper is as nice as possible. > 2. Draw this image with the desired size in the middle > 3. Draw shadow > 4. Scale the background with "aspect to fill" mode > 5. Apply Gaussian algorithm > 6. Combine everything and cached locally. - +> > **[Detail implementation]** - +> > Here is the [algorithm](https://github.com/NghiaTranUIT/artify-macos/blob/master/artify-core/artify-core/Algorithm/Gaussian/GaussianAlgorithm.swift) * **Where does the Artify's resource come from?** > Every art pictures are hand-picked from [WikiArt](https://www.wikiart.org). - +> > If you wonder how I collect the data. Here is my partner, [Spider Man](https://github.com/NghiaTranUIT/artify-core/blob/master/scripts/spider.ruby), which is a Ruby script. - +> > The conjunction of [Nokogiri](http://www.nokogiri.org) and [Watir](http://watir.com) are perfect for this scenario. Indeed,I'm a lazy man, I don't want to collect data like a manual labor 😅. * **What are the tough problems, which you confronts when developing this project?** @@ -156,6 +155,7 @@ That would be amazing 😱 > Defintely, I appreciate your effort to become a contributor. Clone the project and setup your workspace. Happy coding guys 🚢 * **Do you have personal blog?** + > Yes, I often write blog at [My lab](www.nghiatran.me) 👨‍🍳 * **How do I contact you?** From 4007ec3dc14142b1af34308208e51bd780bed669 Mon Sep 17 00:00:00 2001 From: Kamal Nasser Date: Sat, 30 Jun 2018 21:48:52 +0300 Subject: [PATCH 08/12] Fix blog link in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 65c08ac..ffc01b4 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ After starting the development server. * **Do you have personal blog?** -> Yes, I often write blog at [My lab](www.nghiatran.me) 👨‍🍳 +> Yes, I often write blog at [My lab](https://nghiatran.me/) 👨‍🍳 * **How do I contact you?** From a047f04464f3380342580c10f8a010ce437c0088 Mon Sep 17 00:00:00 2001 From: Nghia Tran Date: Sun, 19 Aug 2018 18:20:07 +0700 Subject: [PATCH 09/12] Bump 0.9.2 and Fix URL --- Artify/Artify/Resources/Info/Info.plist | 4 ++-- artify-core/artify-core/Constants/Environment.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Artify/Artify/Resources/Info/Info.plist b/Artify/Artify/Resources/Info/Info.plist index 93cbeb2..05fd948 100644 --- a/Artify/Artify/Resources/Info/Info.plist +++ b/Artify/Artify/Resources/Info/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9.1 + 0.9.2 CFBundleVersion - 960 + 970 Fabric APIKey diff --git a/artify-core/artify-core/Constants/Environment.swift b/artify-core/artify-core/Constants/Environment.swift index 7107960..7a26445 100644 --- a/artify-core/artify-core/Constants/Environment.swift +++ b/artify-core/artify-core/Constants/Environment.swift @@ -22,7 +22,7 @@ public struct Environment { case .sandbox: return "http://0.0.0.0:7300" case .production: - return "https://www.megaton.xyz" + return "https://api.proxyman.app" } } } From 7c85d49e650f7e99d7faa33862a127e9f5e4693c Mon Sep 17 00:00:00 2001 From: Nghia Tran Date: Sun, 28 Oct 2018 10:49:48 +0700 Subject: [PATCH 10/12] [ARTIFY-26] Support Mojave --- Artify/Artify.xcodeproj/project.pbxproj | 14 ++--- .../github.imageset/Contents.json | 3 ++ .../github_logo.imageset/Contents.json | 3 ++ .../link.imageset/Contents.json | 3 ++ .../Resources/Xibs/Base.lproj/Main.storyboard | 54 +++++++------------ .../Scenes/About/AboutWindowController.swift | 2 +- .../artify-core.xcodeproj/project.pbxproj | 10 ++-- 7 files changed, 44 insertions(+), 45 deletions(-) diff --git a/Artify/Artify.xcodeproj/project.pbxproj b/Artify/Artify.xcodeproj/project.pbxproj index 3506942..dd13500 100644 --- a/Artify/Artify.xcodeproj/project.pbxproj +++ b/Artify/Artify.xcodeproj/project.pbxproj @@ -538,7 +538,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.12; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -592,7 +592,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.12; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -608,7 +608,7 @@ CODE_SIGN_IDENTITY = "Mac Developer"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = D54Y88Y9CY; + DEVELOPMENT_TEAM = 3X57WP8E8V; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"${PODS_CONFIGURATION_BUILD_DIR}/Action\"", @@ -630,7 +630,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.12; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" -DDEBUG"; PRODUCT_BUNDLE_IDENTIFIER = com.art.Artify; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -647,7 +647,7 @@ CODE_SIGN_IDENTITY = "Mac Developer"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = D54Y88Y9CY; + DEVELOPMENT_TEAM = 3X57WP8E8V; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"${PODS_CONFIGURATION_BUILD_DIR}/Action\"", @@ -669,7 +669,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.12; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" -DPRODUCTION"; PRODUCT_BUNDLE_IDENTIFIER = com.art.Artify; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -685,6 +685,7 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = 3X57WP8E8V; INFOPLIST_FILE = ArtifyTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -705,6 +706,7 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = 3X57WP8E8V; INFOPLIST_FILE = ArtifyTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/Artify/Artify/Resources/Assets/Assets.xcassets/github.imageset/Contents.json b/Artify/Artify/Resources/Assets/Assets.xcassets/github.imageset/Contents.json index 6c9c9b0..7844a51 100644 --- a/Artify/Artify/Resources/Assets/Assets.xcassets/github.imageset/Contents.json +++ b/Artify/Artify/Resources/Assets/Assets.xcassets/github.imageset/Contents.json @@ -14,5 +14,8 @@ "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/Artify/Artify/Resources/Assets/Assets.xcassets/github_logo.imageset/Contents.json b/Artify/Artify/Resources/Assets/Assets.xcassets/github_logo.imageset/Contents.json index 7c67995..3632533 100644 --- a/Artify/Artify/Resources/Assets/Assets.xcassets/github_logo.imageset/Contents.json +++ b/Artify/Artify/Resources/Assets/Assets.xcassets/github_logo.imageset/Contents.json @@ -14,5 +14,8 @@ "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/Artify/Artify/Resources/Assets/Assets.xcassets/link.imageset/Contents.json b/Artify/Artify/Resources/Assets/Assets.xcassets/link.imageset/Contents.json index 0c67898..600b2d6 100644 --- a/Artify/Artify/Resources/Assets/Assets.xcassets/link.imageset/Contents.json +++ b/Artify/Artify/Resources/Assets/Assets.xcassets/link.imageset/Contents.json @@ -14,5 +14,8 @@ "info" : { "version" : 1, "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" } } \ No newline at end of file diff --git a/Artify/Artify/Resources/Xibs/Base.lproj/Main.storyboard b/Artify/Artify/Resources/Xibs/Base.lproj/Main.storyboard index 138af0a..7f856cf 100644 --- a/Artify/Artify/Resources/Xibs/Base.lproj/Main.storyboard +++ b/Artify/Artify/Resources/Xibs/Base.lproj/Main.storyboard @@ -1,11 +1,9 @@ - + - - + - @@ -688,7 +686,7 @@ - + @@ -713,14 +711,6 @@ - - - - - - - - @@ -729,7 +719,7 @@ - + @@ -737,7 +727,7 @@ - + @@ -745,7 +735,7 @@ - + @@ -753,7 +743,7 @@ - + @@ -762,12 +752,12 @@