diff --git a/BuyPolish/Pola/LaunchScreen.storyboard b/BuyPolish/Pola/LaunchScreen.storyboard index a14a25182..236a7aa22 100644 --- a/BuyPolish/Pola/LaunchScreen.storyboard +++ b/BuyPolish/Pola/LaunchScreen.storyboard @@ -1,9 +1,9 @@ - + - + @@ -19,9 +19,6 @@ - - - @@ -32,9 +29,6 @@ - - - @@ -52,6 +46,5 @@ - diff --git a/BuyPolish/Pola/LaunchScreen.xcassets/Launch_text_top.imageset/Contents.json b/BuyPolish/Pola/LaunchScreen.xcassets/Launch_text_top.imageset/Contents.json deleted file mode 100644 index 673e5ddcf..000000000 --- a/BuyPolish/Pola/LaunchScreen.xcassets/Launch_text_top.imageset/Contents.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "przyjaciele_poli_2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "przyjaciele_poli_3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/BuyPolish/Pola/LaunchScreen.xcassets/Launch_text_top.imageset/przyjaciele_poli_2x.png b/BuyPolish/Pola/LaunchScreen.xcassets/Launch_text_top.imageset/przyjaciele_poli_2x.png deleted file mode 100644 index 569c58dbb..000000000 Binary files a/BuyPolish/Pola/LaunchScreen.xcassets/Launch_text_top.imageset/przyjaciele_poli_2x.png and /dev/null differ diff --git a/BuyPolish/Pola/LaunchScreen.xcassets/Launch_text_top.imageset/przyjaciele_poli_3x.png b/BuyPolish/Pola/LaunchScreen.xcassets/Launch_text_top.imageset/przyjaciele_poli_3x.png deleted file mode 100644 index a9ce12b43..000000000 Binary files a/BuyPolish/Pola/LaunchScreen.xcassets/Launch_text_top.imageset/przyjaciele_poli_3x.png and /dev/null differ diff --git a/BuyPolish/Pola/Manager/Analytics/AnalyticsEventName.swift b/BuyPolish/Pola/Manager/Analytics/AnalyticsEventName.swift index 1c4487c1b..d47e8062b 100644 --- a/BuyPolish/Pola/Manager/Analytics/AnalyticsEventName.swift +++ b/BuyPolish/Pola/Manager/Analytics/AnalyticsEventName.swift @@ -8,5 +8,6 @@ enum AnalyticsEventName: String { case reportFinished = "report_finished" case menuItemOpened = "menu_item_opened" case donateOpened = "donate_opened" + case aboutPola = "about_pola" case polasFriends = "polas_friends" } diff --git a/BuyPolish/Pola/Manager/Analytics/AnalyticsHelper.swift b/BuyPolish/Pola/Manager/Analytics/AnalyticsHelper.swift index 374915176..375a31892 100644 --- a/BuyPolish/Pola/Manager/Analytics/AnalyticsHelper.swift +++ b/BuyPolish/Pola/Manager/Analytics/AnalyticsHelper.swift @@ -63,6 +63,11 @@ final class AnalyticsHelper { parameters: AnalitycsPolasFriendsParameters(device_id: UIDevice.current.deviceId)) } + class func aboutPolaOpened() { + logEvent(name: .aboutPola, + parameters: AnalitycsPolasFriendsParameters(device_id: UIDevice.current.deviceId)) + } + private class func reportParameters(barcode: String?) -> AnalyticsReportParameters { return AnalyticsReportParameters(code: barcode ?? "No Code", device_id: UIDevice.current.deviceId) diff --git a/BuyPolish/Pola/SupportingFiles/pl.lproj/Localizable.strings b/BuyPolish/Pola/SupportingFiles/pl.lproj/Localizable.strings index 01c356161..6a956cc19 100644 --- a/BuyPolish/Pola/SupportingFiles/pl.lproj/Localizable.strings +++ b/BuyPolish/Pola/SupportingFiles/pl.lproj/Localizable.strings @@ -22,6 +22,7 @@ "created rich salary work places" = "prowadzi badania i rozwój w Polsce"; "producing in PL" = "produkuje w Polsce"; "This is Pola's friend" = "To jest przyjaciel Poli"; +"look at Pola's friends" = "ZOBACZ PRZYJACIÓŁ POLI"; "Loading..." = "Pobieranie danych..."; "Sending..." = "Wysyłanie..."; "Report sent" = "Raport wysłany"; @@ -67,6 +68,7 @@ "Accessibility.Close" = "Zamknij"; "Accessibility.CardHint" = "Otwórz lub zamknij poprzez kliknięcie"; "Accessibility.Report.AddPhoto" = "Dodaj zdjęcie"; +"Accessibility.Logo" = "Strona główna"; "CaptureVideo.Timer.Seconds" = "sek."; "CaptureVideo.Start" = "START"; "CaptureVideo.Sending" = "Wysyłanie zdjęć"; diff --git a/BuyPolish/Pola/UI/ProductSearch/ScanCode/ProductCard/ScanResultView.swift b/BuyPolish/Pola/UI/ProductSearch/ScanCode/ProductCard/ScanResultView.swift index 829cd14f1..818260106 100644 --- a/BuyPolish/Pola/UI/ProductSearch/ScanCode/ProductCard/ScanResultView.swift +++ b/BuyPolish/Pola/UI/ProductSearch/ScanCode/ProductCard/ScanResultView.swift @@ -16,6 +16,7 @@ final class ScanResultView: UIView { } } + let polasFriendsButton = UIButton(type: .custom) let reportProblemButton = UIButton(type: .custom) let reportInfoLabel = UILabel() let separatorView = UIView() @@ -52,6 +53,17 @@ final class ScanResultView: UIView { mainProgressView.sizeToFit() addSubview(mainProgressView) + polasFriendsButton.setTitle(R.string.localizable.lookAtPolaSFriends(), for: .normal) + polasFriendsButton.titleLabel?.font = Theme.buttonFont + polasFriendsButton.layer.borderColor = Theme.actionColor.cgColor + polasFriendsButton.layer.borderWidth = 1 + polasFriendsButton.setTitleColor(Theme.actionColor, for: .normal) + polasFriendsButton.setTitleColor(Theme.clearColor, for: .highlighted) + polasFriendsButton.setBackgroundImage(UIImage.image(color: UIColor.clear), for: .normal) + polasFriendsButton.setBackgroundImage(UIImage.image(color: Theme.actionColor), for: .highlighted) + polasFriendsButton.sizeToFit() + addSubview(polasFriendsButton) + reportProblemButton.titleLabel?.font = Theme.buttonFont reportProblemButton.sizeToFit() addSubview(reportProblemButton) @@ -125,11 +137,20 @@ final class ScanResultView: UIView { rect.origin.y = reportProblemButton.frame.minY - verticalPadding - rect.height reportInfoLabel.frame = rect + if !polasFriendsButton.isHidden { + rect = polasFriendsButton.frame + rect.size = CGSize(width: widthWithPadding, height: buttonHeight) + rect.origin.x = horizontalPadding + rect.origin.y = reportInfoLabel.frame.minY - verticalPadding - rect.height + polasFriendsButton.frame = rect + } + rect = separatorView.frame rect.size.width = bounds.width rect.size.height = 1 rect.origin.x = 0 - rect.origin.y = reportInfoLabel.frame.minY - 15 - rect.height + let viewUnderSeparator = polasFriendsButton.isHidden ? reportInfoLabel : polasFriendsButton + rect.origin.y = viewUnderSeparator.frame.minY - 15 - rect.height separatorView.frame = rect rect = scrollViewForContentView.frame diff --git a/BuyPolish/Pola/UI/ProductSearch/ScanCode/ProductCard/ScanResultViewController.swift b/BuyPolish/Pola/UI/ProductSearch/ScanCode/ProductCard/ScanResultViewController.swift index b8fbd1017..9f5eaaf52 100644 --- a/BuyPolish/Pola/UI/ProductSearch/ScanCode/ProductCard/ScanResultViewController.swift +++ b/BuyPolish/Pola/UI/ProductSearch/ScanCode/ProductCard/ScanResultViewController.swift @@ -39,6 +39,7 @@ final class ScanResultViewController: UIViewController { super.viewDidLoad() castedView.reportProblemButton.addTarget(self, action: #selector(reportProblemTapped), for: .touchUpInside) + castedView.polasFriendsButton.addTarget(self, action: #selector(polasFriendsButtonTapped), for: .touchUpInside) downloadScanResult() } @@ -115,6 +116,16 @@ final class ScanResultViewController: UIViewController { argument: ReportProblemReason.product(productId, barcode))! present(vc, animated: true, completion: nil) } + + @objc + func polasFriendsButtonTapped() { + AnalyticsHelper.polasFriendsOpened() + let vc = AboutWebViewController(url: "https://www.pola-app.pl/m/friends", + title: R.string.localizable.polaSFriends()) + vc.addCloseButton() + let nvc = UINavigationController(rootViewController: vc) + present(nvc, animated: true, completion: nil) + } } extension ScanResultViewController: CardStackViewControllerCard { diff --git a/BuyPolish/Pola/UI/ProductSearch/ScanCode/ScanCodeView.swift b/BuyPolish/Pola/UI/ProductSearch/ScanCode/ScanCodeView.swift index 959ebee85..17298bb67 100644 --- a/BuyPolish/Pola/UI/ProductSearch/ScanCode/ScanCodeView.swift +++ b/BuyPolish/Pola/UI/ProductSearch/ScanCode/ScanCodeView.swift @@ -25,7 +25,7 @@ final class ScanCodeView: UIView { addSubview(dimView) - logoButton.accessibilityLabel = R.string.localizable.accessibilityPolaFriends() + logoButton.accessibilityLabel = R.string.localizable.accessibilityLogo() logoButton.setImage(R.image.logoIcon(), for: .normal) logoButton.sizeToFit() addSubview(logoButton) diff --git a/BuyPolish/Pola/UI/ProductSearch/ScanCode/ScanCodeViewController.swift b/BuyPolish/Pola/UI/ProductSearch/ScanCode/ScanCodeViewController.swift index 680d790b8..bd1ed4cc0 100644 --- a/BuyPolish/Pola/UI/ProductSearch/ScanCode/ScanCodeViewController.swift +++ b/BuyPolish/Pola/UI/ProductSearch/ScanCode/ScanCodeViewController.swift @@ -118,8 +118,8 @@ final class ScanCodeViewController: UIViewController { @objc func tapLogoButton() { - AnalyticsHelper.polasFriendsOpened() - let vc = AboutWebViewController(url: "https://www.pola-app.pl/m/friends", + AnalyticsHelper.aboutPolaOpened() + let vc = AboutWebViewController(url: "https://www.pola-app.pl/m/about", title: R.string.localizable.polaSFriends()) vc.addCloseButton() let nvc = UINavigationController(rootViewController: vc) diff --git a/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone4@2x.png b/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone4@2x.png index 30766c318..6795e1090 100644 Binary files a/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone4@2x.png and b/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone4@2x.png differ diff --git a/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone5@2x.png b/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone5@2x.png index 0885d1c06..ed5c72e4e 100644 Binary files a/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone5@2x.png and b/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone5@2x.png differ diff --git a/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone6@2x.png b/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone6@2x.png index 5fcbcc08e..0b7b8bc99 100644 Binary files a/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone6@2x.png and b/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone6@2x.png differ diff --git a/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone6Plus@2x.png b/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone6Plus@2x.png index fc65cae6e..dce06d20e 100644 Binary files a/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone6Plus@2x.png and b/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhone6Plus@2x.png differ diff --git a/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhoneX@2x.png b/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhoneX@2x.png index 1d2133109..fce9502ac 100644 Binary files a/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhoneX@2x.png and b/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhoneX@2x.png differ diff --git a/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhoneXr@2x.png b/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhoneXr@2x.png index 828629960..6e70da3fe 100644 Binary files a/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhoneXr@2x.png and b/BuyPolish/PolaTests/ReferenceImages_64/PolaTests.LaunchScreenSnapshotTests/testViewOnIPhoneXr@2x.png differ diff --git a/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testKoralCompanyShouldShowAskForDonateButton@2x.png b/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testKoralCompanyShouldShowAskForDonateButton@2x.png index 3b32f77b3..470d01f83 100644 Binary files a/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testKoralCompanyShouldShowAskForDonateButton@2x.png and b/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testKoralCompanyShouldShowAskForDonateButton@2x.png differ diff --git a/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testNaleczowiankaCompanyShouldHas0PolishCapital@2x.png b/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testNaleczowiankaCompanyShouldHas0PolishCapital@2x.png index ae0ffdc0f..56d5ad4e6 100644 Binary files a/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testNaleczowiankaCompanyShouldHas0PolishCapital@2x.png and b/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testNaleczowiankaCompanyShouldHas0PolishCapital@2x.png differ diff --git a/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testRadziemskaCompanyShouldBeMarkedAsPolaFriends@2x.png b/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testRadziemskaCompanyShouldBeMarkedAsPolaFriends@2x.png index fa23e0825..0c4ecce32 100644 Binary files a/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testRadziemskaCompanyShouldBeMarkedAsPolaFriends@2x.png and b/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testRadziemskaCompanyShouldBeMarkedAsPolaFriends@2x.png differ diff --git a/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testStaropramenCompanyShouldNotBeMarkedAsPolaFriends@2x.png b/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testStaropramenCompanyShouldNotBeMarkedAsPolaFriends@2x.png index 618b40495..64c590a6d 100644 Binary files a/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testStaropramenCompanyShouldNotBeMarkedAsPolaFriends@2x.png and b/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.CompanyPageUITests/testStaropramenCompanyShouldNotBeMarkedAsPolaFriends@2x.png differ diff --git a/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.ISBNPageUITests/testISBNPage@2x.png b/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.ISBNPageUITests/testISBNPage@2x.png index 6fd8b863e..ab80628f3 100644 Binary files a/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.ISBNPageUITests/testISBNPage@2x.png and b/BuyPolish/PolaUITests/ReferenceImages_64/PolaUITests.ISBNPageUITests/testISBNPage@2x.png differ