diff --git a/Multisig/Cross-layer/Configuration/Config.Example.xcconfig b/Multisig/Cross-layer/Configuration/Config.Example.xcconfig index ab80cd862..5bd988315 100644 --- a/Multisig/Cross-layer/Configuration/Config.Example.xcconfig +++ b/Multisig/Cross-layer/Configuration/Config.Example.xcconfig @@ -138,6 +138,11 @@ _APP_STORE_REVIEW_URL_DEV = https:/$()/apps.apple.com/app/id1515758190?ac _APP_STORE_REVIEW_URL_STAGING = https:/$()/apps.apple.com/app/id1518013939?action=write-review _APP_STORE_REVIEW_URL_PROD = https:/$()/apps.apple.com/app/id1515759131?action=write-review +// Claim URLS +CLAIM_DISCUSS_URL = https:/$()/forum.gnosis-safe.io/ +CLAIM_PROPOSE_URL = https:/$()/docs.google.com/document/d/1t79exFjYZQO80yDc8X2S61d4Sc1_QjBwnzZgTSWqoUo/edit#heading=h.ao7vqnfg6hyh +CLAIM_CHAT_URL = https:/$()/discord.com/invite/AjG7AQD9Qn + APP_STORE_REVIEW_URL = $(_APP_STORE_REVIEW_URL_$(SERVICE_ENV):default=$(_APP_STORE_REVIEW_URL_PROD)) // App name on the home screen (will be used for CFBundleDisplayName) diff --git a/Multisig/Cross-layer/Configuration/Configuration.swift b/Multisig/Cross-layer/Configuration/Configuration.swift index 264037f4f..bd5f42ed7 100644 --- a/Multisig/Cross-layer/Configuration/Configuration.swift +++ b/Multisig/Cross-layer/Configuration/Configuration.swift @@ -144,6 +144,17 @@ struct AppConfiguration { // Add feature toggles here } + struct Claim { + @ConfigurationKey("CLAIM_DISCUSS_URL") + var discussURL: URL + + @ConfigurationKey("CLAIM_PROPOSE_URL") + var proposeURL: URL + + @ConfigurationKey("CLAIM_CHAT_URL") + var chatURL: URL + } + let services = Services() let help = Help() let legal = Legal() @@ -151,4 +162,5 @@ struct AppConfiguration { let app = App() let walletConnect = WalletConnect() let toggles = FeatureToggles() + let claim = Claim() } diff --git a/Multisig/Info.plist b/Multisig/Info.plist index 421abc16e..a9f7a061b 100644 --- a/Multisig/Info.plist +++ b/Multisig/Info.plist @@ -265,5 +265,11 @@ $(WALLETCONNECT_BRIDGE_URL) WALLETCONNECT_REGISTRY_URL $(WALLETCONNECT_REGISTRY_URL) + CLAIM_DISCUSS_URL + $(CLAIM_DISCUSS_URL) + CLAIM_PROPOSE_URL + $(CLAIM_PROPOSE_URL) + CLAIM_CHAT_URL + $(CLAIM_CHAT_URL) diff --git a/Multisig/UI/ClaimToken/NavigatingDAOViewController.swift b/Multisig/UI/ClaimToken/NavigatingDAOViewController.swift index e2fd84691..6d03338e8 100644 --- a/Multisig/UI/ClaimToken/NavigatingDAOViewController.swift +++ b/Multisig/UI/ClaimToken/NavigatingDAOViewController.swift @@ -35,7 +35,7 @@ class NavigatingDAOViewController: UIViewController { ViewControllerFactory.removeNavigationBarBorder(self) navigationItem.largeTitleDisplayMode = .never - + screenTitle.setStyle(.claimTitle) introductionParagraph.setStyle(.secondary) @@ -44,10 +44,36 @@ class NavigatingDAOViewController: UIViewController { nextButton.setText("Start claiming", .filled) - discussItemLabel.setStyle(.secondary) - proposeItemLabel.setStyle(.secondary) + discussItemLabel.hyperLinkLabel("Discuss SafeDAO improvements - post topics and discuss in our", + prefixStyle: .secondary, + linkText: "Forum", + linkIcon: nil, + underlined: false, + postfixText: "." + ) + openUrlOnTap(link: .discuss, label: discussItemLabel) + + proposeItemLabel.hyperLinkLabel("Propose improvements - read our governance ", + prefixStyle: .secondary, + linkText: "process", + linkIcon: nil, + underlined: false, + postfixText: " and post an SIP." + ) + openUrlOnTap(link: .propose, label: proposeItemLabel) + + let governText = "Govern improvements - vote on our Snapshot." governItemLabel.setStyle(.secondary) + chatItemLabel.setStyle(.secondary) + chatItemLabel.hyperLinkLabel("Chat with the community - join our Safe ", + prefixStyle: .secondary, + linkText: "Discord", + linkIcon: nil, + underlined: false, + postfixText: "." + ) + openUrlOnTap(link: .chat, label: chatItemLabel) subTitle.setStyle(.headline) subTitle.textAlignment = .center @@ -58,4 +84,33 @@ class NavigatingDAOViewController: UIViewController { completion?() } + func openUrlOnTap(link: link, label: UILabel) { + var tapRecognizer: UITapGestureRecognizer + switch link { + case .discuss: tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(discussTap(sender:))) + case .propose: tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(proposeTap(sender:))) + case .chat: tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(chatTap(sender:))) + } + label.addGestureRecognizer(tapRecognizer) + } + + @objc + func discussTap(sender: UITapGestureRecognizer) { + openInSafari(App.configuration.claim.discussURL) + } + + @objc + func proposeTap(sender: UITapGestureRecognizer) { + openInSafari(App.configuration.claim.proposeURL) + } + + @objc + func chatTap(sender: UITapGestureRecognizer) { + openInSafari(App.configuration.claim.chatURL) + } + + enum link { + case discuss, propose, chat + } } + diff --git a/Multisig/UI/ClaimToken/NavigatingDAOViewController.xib b/Multisig/UI/ClaimToken/NavigatingDAOViewController.xib index cac66e15d..02ebb4ee9 100644 --- a/Multisig/UI/ClaimToken/NavigatingDAOViewController.xib +++ b/Multisig/UI/ClaimToken/NavigatingDAOViewController.xib @@ -68,7 +68,7 @@ -