Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS-2659 Update auth screen #1208

Merged
merged 11 commits into from
Apr 15, 2024
2 changes: 1 addition & 1 deletion Anytype/Generated/ImageAssets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal extension ImageAsset {
static let appIconSmile = ImageAsset.bundle(name: "AppIconsPreview/AppIconSmile")
}
static let authPhotoIcon = ImageAsset.bundle(name: "auth_photo_icon")
static let theEverythingApp = ImageAsset.bundle(name: "the-everything-app")
static let localInternet = ImageAsset.bundle(name: "local-internet")
enum BottomAlert {
static let error = ImageAsset.bundle(name: "BottomAlert/error")
static let question = ImageAsset.bundle(name: "BottomAlert/question")
Expand Down
14 changes: 8 additions & 6 deletions Anytype/Generated/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ internal enum Loc {
internal static let initializingSync = Loc.tr("Localizable", "Initializing sync", fallback: "Initializing sync")
/// Into object
internal static let intoObject = Loc.tr("Localizable", "Into object", fallback: "Into object")
/// Join
internal static let join = Loc.tr("Localizable", "Join", fallback: "Join")
/// New Vault
internal static let join = Loc.tr("Localizable", "Join", fallback: "New Vault")
/// Just e-mail
internal static let justEMail = Loc.tr("Localizable", "Just e-mail", fallback: "Just e-mail")
/// Layout
Expand Down Expand Up @@ -737,8 +737,8 @@ internal enum Loc {
internal enum Auth {
/// Please allow access
internal static let cameraPermissionTitle = Loc.tr("Localizable", "Auth.CameraPermissionTitle", fallback: "Please allow access")
/// Log In
internal static let logIn = Loc.tr("Localizable", "Auth.LogIn", fallback: "Log In")
/// I have a Key
internal static let logIn = Loc.tr("Localizable", "Auth.LogIn", fallback: "I have a Key")
/// Next
internal static let next = Loc.tr("Localizable", "Auth.Next", fallback: "Next")
internal enum Caption {
Expand Down Expand Up @@ -862,8 +862,10 @@ internal enum Loc {
}
}
internal enum Welcome {
/// Anytype is your safe space to write, plan, think and organise everything that matters to you.
internal static let subtitle = Loc.tr("Localizable", "Auth.Welcome.Subtitle", fallback: "Anytype is your safe space to write, plan, think and organise everything that matters to you.")
/// Co-create digitally independent spaces. Encrypted with keys you control. Everything works offline. All code is [open](%@).
internal static func subtitle(_ p1: Any) -> String {
return Loc.tr("Localizable", "Auth.Welcome.Subtitle", String(describing: p1), fallback: "Co-create digitally independent spaces. Encrypted with keys you control. Everything works offline. All code is [open](%@).")
}
}
}
internal enum BlockLink {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "the-everything-app.pdf",
"filename" : "local-internet.pdf",
"idiom" : "universal"
}
],
Expand Down
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions Anytype/Resources/Strings/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@
"Scan QR code" = "Scan QR code";
"Auth.CameraPermissionTitle" = "Please allow access";
"Restore secret phrase from keychain" = "Restore Recovery Phrase from the keychain";
"Auth.LogIn" = "Log In";
"Join" = "Join";
"Auth.Welcome.Subtitle" = "Anytype is your safe space to write, plan, think and organise everything that matters to you.";
"Auth.LogIn" = "I have a Key";
"Join" = "New Vault";
"Auth.Welcome.Subtitle" = "Co-create digitally independent spaces. Encrypted with keys you control. Everything works offline. All code is [open](%@).";
"Auth.Caption.Privacy.Text" = "By continuing you agree to [Terms of Use](%@) and [Privacy Policy](%@)";
"Auth.Next" = "Next";

Expand Down
19 changes: 14 additions & 5 deletions Anytype/Sources/PresentationLayer/Auth/Auth/AuthView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct AuthView: View {

private var greetings: some View {
VStack(alignment: .center, spacing: 0) {
Image(asset: .theEverythingApp)
Image(asset: .localInternet)
.onTapGesture(count: 10) {
AudioServicesPlaySystemSound(1109)
model.showDebugMenu.toggle()
Expand All @@ -53,10 +53,19 @@ struct AuthView: View {

Spacer.fixedHeight(20)

AnytypeText(Loc.Auth.Welcome.subtitle, style: .uxCalloutRegular)
.foregroundColor(.Auth.body)
.multilineTextAlignment(.center)
.padding(.horizontal, UIDevice.isPad ? 85 : 38)
AnytypeText(
Loc.Auth.Welcome.subtitle(AboutApp.anyprotoLink),
style: .uxCalloutRegular,
enableMarkdown: true
)
.foregroundColor(.Auth.body)
.accentColor(.Auth.text)
.multilineTextAlignment(.center)
.padding(.horizontal, UIDevice.isPad ? 85 : 38)
.environment(\.openURL, OpenURLAction { url in
model.onUrlTapAction(url)
return .handled
})
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
enum AboutApp {
static let anyprotoLink = "https://github.com/anyproto"
static let whatsNewLink = "https://anytype.io/release-notes/ios"
static let communityLink = "https://community.anytype.io"
static let helpLink = "https://doc.anytype.io/"
Expand Down
Loading