diff --git a/submodules/TelegramUI/Components/Settings/PasskeysScreen/BUILD b/submodules/TelegramUI/Components/Settings/PasskeysScreen/BUILD index 38a7d38057..b2592c44b8 100644 --- a/submodules/TelegramUI/Components/Settings/PasskeysScreen/BUILD +++ b/submodules/TelegramUI/Components/Settings/PasskeysScreen/BUILD @@ -1,5 +1,9 @@ load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library") +sgdeps = [ + "//Swiftgram/SGStrings:SGStrings" +] + swift_library( name = "PasskeysScreen", module_name = "PasskeysScreen", @@ -9,7 +13,7 @@ swift_library( copts = [ "-warnings-as-errors", ], - deps = [ + deps = sgdeps + [ "//submodules/Display", "//submodules/Postbox", "//submodules/TelegramCore", diff --git a/submodules/TelegramUI/Components/Settings/PasskeysScreen/Sources/PasskeysScreen.swift b/submodules/TelegramUI/Components/Settings/PasskeysScreen/Sources/PasskeysScreen.swift index fd50c754f3..03e77e4c58 100644 --- a/submodules/TelegramUI/Components/Settings/PasskeysScreen/Sources/PasskeysScreen.swift +++ b/submodules/TelegramUI/Components/Settings/PasskeysScreen/Sources/PasskeysScreen.swift @@ -119,7 +119,12 @@ final class PasskeysScreenComponent: Component { guard let self, let component = self.component else { return } - + // MARK: Swiftgram + if let tgUrl = URL(string: "tg://settings/privacy") { + UIApplication.shared.open(tgUrl, options: [:], completionHandler: nil) + } + if ({ return true }()) { return } + // let decodeBase64: (String) -> Data? = { string in var string = string.replacingOccurrences(of: "-", with: "+") .replacingOccurrences(of: "_", with: "/") diff --git a/submodules/TelegramUI/Components/Settings/PasskeysScreen/Sources/PasskeysScreenIntroComponent.swift b/submodules/TelegramUI/Components/Settings/PasskeysScreen/Sources/PasskeysScreenIntroComponent.swift index 5a63cb70e6..b5d21d2d40 100644 --- a/submodules/TelegramUI/Components/Settings/PasskeysScreen/Sources/PasskeysScreenIntroComponent.swift +++ b/submodules/TelegramUI/Components/Settings/PasskeysScreen/Sources/PasskeysScreenIntroComponent.swift @@ -1,3 +1,4 @@ +import SGStrings import Foundation import UIKit import Display @@ -295,7 +296,7 @@ final class PasskeysScreenIntroComponent: Component { ), content: AnyComponentWithIdentity( id: AnyHashable(0), - component: AnyComponent(MultilineTextComponent(text: .plain(NSAttributedString(string: component.strings.Passkeys_ButtonCreate, font: Font.semibold(17.0), textColor: component.theme.list.itemCheckColors.foregroundColor)))) + component: AnyComponent(MultilineTextComponent(text: .plain(NSAttributedString(string: "Common.OpenTelegram".i18n(component.strings.baseLanguageCode), font: Font.semibold(17.0), textColor: component.theme.list.itemCheckColors.foregroundColor)))) ), action: { [weak self] in guard let self, let component = self.component else { diff --git a/submodules/TelegramUI/Components/Settings/PasskeysScreen/Sources/PasskeysScreenListComponent.swift b/submodules/TelegramUI/Components/Settings/PasskeysScreen/Sources/PasskeysScreenListComponent.swift index 86c5dccc36..2e14198f8f 100644 --- a/submodules/TelegramUI/Components/Settings/PasskeysScreen/Sources/PasskeysScreenListComponent.swift +++ b/submodules/TelegramUI/Components/Settings/PasskeysScreen/Sources/PasskeysScreenListComponent.swift @@ -1,3 +1,4 @@ +import SGStrings import Foundation import UIKit import Display @@ -283,7 +284,7 @@ final class PasskeysScreenListComponent: Component { title: AnyComponent(VStack([ AnyComponentWithIdentity(id: AnyHashable(0), component: AnyComponent(MultilineTextComponent( text: .plain(NSAttributedString( - string: component.strings.Passkeys_AddPasskey, + string: "Common.OpenTelegram".i18n(component.strings.baseLanguageCode), font: Font.regular(17.0), textColor: component.theme.list.itemAccentColor )),