From c20f14dbbb5f7a05a4b16aeb921ad0c5986ed0f1 Mon Sep 17 00:00:00 2001 From: Markus Tamm Date: Wed, 28 Jan 2026 13:41:42 +0200 Subject: [PATCH] Change launch screen design --- RIADigiDoc/RIADigiDocApp.swift | 1 + .../Supporting files/LaunchScreen.storyboard | 41 ++++++++---- .../Supporting files/Localizable.xcstrings | 63 +++++++------------ RIADigiDoc/UI/Component/InitView.swift | 44 ++++++++++--- .../Component/Shared/LaunchScreenView.swift | 33 ++++++++-- RIADigiDoc/UI/Theme/Dimensions.swift | 1 + 6 files changed, 118 insertions(+), 65 deletions(-) diff --git a/RIADigiDoc/RIADigiDocApp.swift b/RIADigiDoc/RIADigiDocApp.swift index d75f9254..37ed00cb 100644 --- a/RIADigiDoc/RIADigiDocApp.swift +++ b/RIADigiDoc/RIADigiDocApp.swift @@ -109,6 +109,7 @@ struct RIADigiDocApp: App { .onAppear { onLaunchScreenViewAppear() } .environment(themeSettings) .preferredColorScheme(.light) + .environment(languageSettings) } } } diff --git a/RIADigiDoc/Supporting files/LaunchScreen.storyboard b/RIADigiDoc/Supporting files/LaunchScreen.storyboard index 2d409edc..db54db73 100644 --- a/RIADigiDoc/Supporting files/LaunchScreen.storyboard +++ b/RIADigiDoc/Supporting files/LaunchScreen.storyboard @@ -1,12 +1,17 @@ - + - + + + + RobotoCondensed-Medium + + @@ -16,18 +21,30 @@ - - - - - - + + + + + + + + + + + + + - + - - + + @@ -37,6 +54,6 @@ - + diff --git a/RIADigiDoc/Supporting files/Localizable.xcstrings b/RIADigiDoc/Supporting files/Localizable.xcstrings index 1131e27b..bb767558 100644 --- a/RIADigiDoc/Supporting files/Localizable.xcstrings +++ b/RIADigiDoc/Supporting files/Localizable.xcstrings @@ -1974,7 +1974,7 @@ } }, "Information system authority" : { - "comment" : "RIA name. Used in initial language screen", + "comment" : "RIA name", "extractionState" : "manual", "localizations" : { "en" : { @@ -1991,6 +1991,24 @@ } } }, + "Init footer RIA" : { + "comment" : "Init footer smallcaps RIA text", + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Riigi Infosüsteemi Amet" + } + }, + "et" : { + "stringUnit" : { + "state" : "translated", + "value" : "Riigi Infosüsteemi Amet" + } + } + } + }, "Init lang locale en" : { "comment" : "Init lang locale en", "extractionState" : "manual", @@ -1998,13 +2016,13 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "In English" + "value" : "English" } }, "et" : { "stringUnit" : { "state" : "translated", - "value" : "In English" + "value" : "English" } } } @@ -2016,13 +2034,13 @@ "en" : { "stringUnit" : { "state" : "translated", - "value" : "Eesti keel" + "value" : "Eesti" } }, "et" : { "stringUnit" : { "state" : "translated", - "value" : "Eesti keel" + "value" : "Eesti" } } } @@ -2266,23 +2284,6 @@ } } }, - "Logo" : { - "comment" : "Accessibility label for launch screen logo", - "localizations" : { - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Logo" - } - }, - "et" : { - "stringUnit" : { - "state" : "translated", - "value" : "Logo" - } - } - } - }, "Main about 1 logo text" : { "comment" : "Main about Estonia logo text", "extractionState" : "manual", @@ -5987,24 +5988,6 @@ } } }, - "RIA small caps" : { - "comment" : "RIA small caps", - "extractionState" : "manual", - "localizations" : { - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Rɪɪɢɪ Iɴꜰᴏꜱüꜱᴛᴇᴇᴍɪ Aᴍᴇᴛ" - } - }, - "et" : { - "stringUnit" : { - "state" : "translated", - "value" : "Rɪɪɢɪ Iɴꜰᴏꜱüꜱᴛᴇᴇᴍɪ Aᴍᴇᴛ" - } - } - } - }, "Role and address title" : { "comment" : "Role and address view title", "extractionState" : "manual", diff --git a/RIADigiDoc/UI/Component/InitView.swift b/RIADigiDoc/UI/Component/InitView.swift index 6492f00f..b544f3c2 100644 --- a/RIADigiDoc/UI/Component/InitView.swift +++ b/RIADigiDoc/UI/Component/InitView.swift @@ -34,6 +34,9 @@ struct InitView: View { private var appName: String { languageSettings.localized("App name") } + private var footerRIA: String { + languageSettings.localized("Init footer RIA") + } init() { _viewModel = State(wrappedValue: Container.shared.initViewModel()) @@ -80,14 +83,10 @@ struct InitView: View { .padding(.vertical, Dimensions.Padding.MPadding) Spacer() - - Text(languageSettings.localized("RIA small caps")) - .font(typography.titleMedium) - .foregroundStyle(Color.white) - .padding(.bottom, Dimensions.Padding.MPadding) - .accessibilityLabel( - Text(verbatim: languageSettings.localized("Information system authority")) - ) + smallCapsTextView( + footerRIA, + accessibilityLabel: footerRIA + ) } .frame(minHeight: geometry.size.height) .frame(minWidth: geometry.size.width) @@ -95,6 +94,35 @@ struct InitView: View { } } } + + func smallCapsTextView(_ text: String, accessibilityLabel: String) -> some View { + var attr = AttributedString(text) + var isStartOfWord = true + + for index in attr.characters.indices { + let char = attr.characters[index] + + let nextIndex = attr.characters.index(after: index) + let range = index..