mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 23:18:27 +02:00
Added screens for federation introduction
This commit is contained in:
20
Riot/Assets/Images.xcassets/BWI/introduce_federation_1_dark.imageset/Contents.json
vendored
Normal file
20
Riot/Assets/Images.xcassets/BWI/introduce_federation_1_dark.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
11
Riot/Assets/Images.xcassets/BWI/introduce_federation_1_light.imageset/Contents.json
vendored
Normal file
11
Riot/Assets/Images.xcassets/BWI/introduce_federation_1_light.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
15
Riot/Assets/Images.xcassets/BWI/introduce_federation_2_dark.imageset/Contents.json
vendored
Normal file
15
Riot/Assets/Images.xcassets/BWI/introduce_federation_2_dark.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Kennzeichnung_BuM_dark_mobile.svg",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "original"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<svg width="110" height="108" viewBox="0 0 110 108" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<mask id="path-1-inside-1_2287_4246" fill="white">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M81.6759 95.0462C73.7757 100.383 64.2518 103.5 54 103.5C42.8565 103.5 32.573 99.8177 24.3 93.6036C12.277 84.5728 4.5 70.1946 4.5 54C4.5 26.6619 26.6619 4.5 54 4.5C81.3381 4.5 103.5 26.6619 103.5 54C103.5 71.0863 94.843 86.1507 81.6759 95.0462ZM54 56.475C62.2014 56.475 68.85 49.2724 68.85 40.3875C68.85 31.5026 62.2014 24.3 54 24.3C45.7986 24.3 39.15 31.5026 39.15 40.3875C39.15 49.2724 45.7986 56.475 54 56.475ZM54 93.6C64.7018 93.6 74.4121 89.3548 81.5387 82.4566C77.1314 71.5753 66.462 63.9 54 63.9C41.538 63.9 30.8686 71.5753 26.4613 82.4566C33.5879 89.3548 43.2982 93.6 54 93.6Z"/>
|
||||
</mask>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M81.6759 95.0462C73.7757 100.383 64.2518 103.5 54 103.5C42.8565 103.5 32.573 99.8177 24.3 93.6036C12.277 84.5728 4.5 70.1946 4.5 54C4.5 26.6619 26.6619 4.5 54 4.5C81.3381 4.5 103.5 26.6619 103.5 54C103.5 71.0863 94.843 86.1507 81.6759 95.0462ZM54 56.475C62.2014 56.475 68.85 49.2724 68.85 40.3875C68.85 31.5026 62.2014 24.3 54 24.3C45.7986 24.3 39.15 31.5026 39.15 40.3875C39.15 49.2724 45.7986 56.475 54 56.475ZM54 93.6C64.7018 93.6 74.4121 89.3548 81.5387 82.4566C77.1314 71.5753 66.462 63.9 54 63.9C41.538 63.9 30.8686 71.5753 26.4613 82.4566C33.5879 89.3548 43.2982 93.6 54 93.6Z" fill="#26282D"/>
|
||||
<path d="M81.6759 95.0462L82.4596 96.2062L82.4596 96.2062L81.6759 95.0462ZM24.3 93.6036L23.4592 94.723L23.4592 94.723L24.3 93.6036ZM81.5387 82.4566L82.5124 83.4626L83.1907 82.806L82.8363 81.9311L81.5387 82.4566ZM26.4613 82.4566L25.1637 81.9311L24.8093 82.806L25.4876 83.4626L26.4613 82.4566ZM54 104.9C64.5398 104.9 74.3352 101.695 82.4596 96.2062L80.8922 93.8861C73.2161 99.072 63.9638 102.1 54 102.1V104.9ZM23.4592 94.723C31.9663 101.113 42.5429 104.9 54 104.9V102.1C43.1701 102.1 33.1797 98.5225 25.1408 92.4842L23.4592 94.723ZM3.1 54C3.1 70.6535 11.0993 85.4391 23.4592 94.723L25.1408 92.4842C13.4547 83.7064 5.9 69.7357 5.9 54H3.1ZM54 3.1C25.8887 3.1 3.1 25.8887 3.1 54H5.9C5.9 27.4351 27.4351 5.9 54 5.9V3.1ZM104.9 54C104.9 25.8887 82.1113 3.1 54 3.1V5.9C80.5649 5.9 102.1 27.4351 102.1 54H104.9ZM82.4596 96.2062C95.9956 87.0615 104.9 71.5709 104.9 54H102.1C102.1 70.6018 93.6904 85.2398 80.8922 93.8861L82.4596 96.2062ZM67.45 40.3875C67.45 48.6068 61.3248 55.075 54 55.075V57.875C63.078 57.875 70.25 49.938 70.25 40.3875H67.45ZM54 25.7C61.3248 25.7 67.45 32.1682 67.45 40.3875H70.25C70.25 30.837 63.078 22.9 54 22.9V25.7ZM40.55 40.3875C40.55 32.1682 46.6752 25.7 54 25.7V22.9C44.922 22.9 37.75 30.837 37.75 40.3875H40.55ZM54 55.075C46.6752 55.075 40.55 48.6068 40.55 40.3875H37.75C37.75 49.938 44.922 57.875 54 57.875V55.075ZM80.565 81.4507C73.689 88.1063 64.324 92.2 54 92.2V95C65.0796 95 75.1352 90.6033 82.5124 83.4626L80.565 81.4507ZM54 65.3C65.8724 65.3 76.0405 72.6112 80.2411 82.9822L82.8363 81.9311C78.2223 70.5394 67.0517 62.5 54 62.5V65.3ZM27.7589 82.9822C31.9595 72.6112 42.1276 65.3 54 65.3V62.5C40.9483 62.5 29.7777 70.5394 25.1637 81.9311L27.7589 82.9822ZM54 92.2C43.676 92.2 34.311 88.1063 27.4349 81.4507L25.4876 83.4626C32.8648 90.6033 42.9204 95 54 95V92.2Z" fill="#26282D" mask="url(#path-1-inside-1_2287_4246)"/>
|
||||
<ellipse cx="75.648" cy="83.52" rx="20.648" ry="20.52" fill="#101317"/>
|
||||
<ellipse cx="88.6128" cy="83.52" rx="20.648" ry="20.52" fill="#101317"/>
|
||||
<ellipse cx="88.6126" cy="83.5256" rx="14.4056" ry="14.3163" fill="white"/>
|
||||
<ellipse cx="75.6484" cy="83.5181" rx="18.2471" ry="18.134" fill="#101317"/>
|
||||
<ellipse cx="75.6478" cy="83.5256" rx="14.4056" ry="14.3163" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
15
Riot/Assets/Images.xcassets/BWI/introduce_federation_2_light.imageset/Contents.json
vendored
Normal file
15
Riot/Assets/Images.xcassets/BWI/introduce_federation_2_light.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Kennzeichnung_BuM_light_mobile.svg",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "original"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<svg width="110" height="108" viewBox="0 0 110 108" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<mask id="path-1-inside-1_2287_4245" fill="white">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M81.6759 95.0462C73.7757 100.383 64.2518 103.5 54 103.5C42.8565 103.5 32.573 99.8177 24.3 93.6036C12.277 84.5728 4.5 70.1946 4.5 54C4.5 26.6619 26.6619 4.5 54 4.5C81.3381 4.5 103.5 26.6619 103.5 54C103.5 71.0863 94.843 86.1507 81.6759 95.0462ZM54 56.475C62.2014 56.475 68.85 49.2724 68.85 40.3875C68.85 31.5026 62.2014 24.3 54 24.3C45.7986 24.3 39.15 31.5026 39.15 40.3875C39.15 49.2724 45.7986 56.475 54 56.475ZM54 93.6C64.7018 93.6 74.4121 89.3548 81.5387 82.4566C77.1314 71.5753 66.462 63.9 54 63.9C41.538 63.9 30.8686 71.5753 26.4613 82.4566C33.5879 89.3548 43.2982 93.6 54 93.6Z"/>
|
||||
</mask>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M81.6759 95.0462C73.7757 100.383 64.2518 103.5 54 103.5C42.8565 103.5 32.573 99.8177 24.3 93.6036C12.277 84.5728 4.5 70.1946 4.5 54C4.5 26.6619 26.6619 4.5 54 4.5C81.3381 4.5 103.5 26.6619 103.5 54C103.5 71.0863 94.843 86.1507 81.6759 95.0462ZM54 56.475C62.2014 56.475 68.85 49.2724 68.85 40.3875C68.85 31.5026 62.2014 24.3 54 24.3C45.7986 24.3 39.15 31.5026 39.15 40.3875C39.15 49.2724 45.7986 56.475 54 56.475ZM54 93.6C64.7018 93.6 74.4121 89.3548 81.5387 82.4566C77.1314 71.5753 66.462 63.9 54 63.9C41.538 63.9 30.8686 71.5753 26.4613 82.4566C33.5879 89.3548 43.2982 93.6 54 93.6Z" fill="#E3E8F0"/>
|
||||
<path d="M81.6759 95.0462L82.4596 96.2062L82.4596 96.2062L81.6759 95.0462ZM24.3 93.6036L23.4592 94.723L23.4592 94.723L24.3 93.6036ZM81.5387 82.4566L82.5124 83.4626L83.1907 82.806L82.8363 81.9311L81.5387 82.4566ZM26.4613 82.4566L25.1637 81.9311L24.8093 82.806L25.4876 83.4626L26.4613 82.4566ZM54 104.9C64.5398 104.9 74.3352 101.695 82.4596 96.2062L80.8922 93.8861C73.2161 99.072 63.9638 102.1 54 102.1V104.9ZM23.4592 94.723C31.9663 101.113 42.5429 104.9 54 104.9V102.1C43.1701 102.1 33.1797 98.5225 25.1408 92.4842L23.4592 94.723ZM3.1 54C3.1 70.6535 11.0993 85.4391 23.4592 94.723L25.1408 92.4842C13.4547 83.7064 5.9 69.7357 5.9 54H3.1ZM54 3.1C25.8887 3.1 3.1 25.8887 3.1 54H5.9C5.9 27.4351 27.4351 5.9 54 5.9V3.1ZM104.9 54C104.9 25.8887 82.1113 3.1 54 3.1V5.9C80.5649 5.9 102.1 27.4351 102.1 54H104.9ZM82.4596 96.2062C95.9956 87.0615 104.9 71.5709 104.9 54H102.1C102.1 70.6018 93.6904 85.2398 80.8922 93.8861L82.4596 96.2062ZM67.45 40.3875C67.45 48.6068 61.3248 55.075 54 55.075V57.875C63.078 57.875 70.25 49.938 70.25 40.3875H67.45ZM54 25.7C61.3248 25.7 67.45 32.1682 67.45 40.3875H70.25C70.25 30.837 63.078 22.9 54 22.9V25.7ZM40.55 40.3875C40.55 32.1682 46.6752 25.7 54 25.7V22.9C44.922 22.9 37.75 30.837 37.75 40.3875H40.55ZM54 55.075C46.6752 55.075 40.55 48.6068 40.55 40.3875H37.75C37.75 49.938 44.922 57.875 54 57.875V55.075ZM80.565 81.4507C73.689 88.1063 64.324 92.2 54 92.2V95C65.0796 95 75.1352 90.6033 82.5124 83.4626L80.565 81.4507ZM54 65.3C65.8724 65.3 76.0405 72.6112 80.2411 82.9822L82.8363 81.9311C78.2223 70.5394 67.0517 62.5 54 62.5V65.3ZM27.7589 82.9822C31.9595 72.6112 42.1276 65.3 54 65.3V62.5C40.9483 62.5 29.7777 70.5394 25.1637 81.9311L27.7589 82.9822ZM54 92.2C43.676 92.2 34.311 88.1063 27.4349 81.4507L25.4876 83.4626C32.8648 90.6033 42.9204 95 54 95V92.2Z" fill="#E3E8F0" mask="url(#path-1-inside-1_2287_4245)"/>
|
||||
<ellipse cx="75.648" cy="83.52" rx="20.648" ry="20.52" fill="white"/>
|
||||
<ellipse cx="88.6128" cy="83.52" rx="20.648" ry="20.52" fill="white"/>
|
||||
<ellipse cx="88.6131" cy="83.5256" rx="14.4056" ry="14.3163" fill="#17191C"/>
|
||||
<ellipse cx="75.6477" cy="83.52" rx="17.7669" ry="17.6567" fill="white"/>
|
||||
<ellipse cx="75.6483" cy="83.5256" rx="14.4056" ry="14.3163" fill="#17191C"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
15
Riot/Assets/Images.xcassets/BWI/introduce_federation_3.imageset/Contents.json
vendored
Normal file
15
Riot/Assets/Images.xcassets/BWI/introduce_federation_3.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "Group_4105.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "original"
|
||||
}
|
||||
}
|
||||
BIN
Riot/Assets/Images.xcassets/BWI/introduce_federation_3.imageset/Group_4105.png
vendored
Normal file
BIN
Riot/Assets/Images.xcassets/BWI/introduce_federation_3.imageset/Group_4105.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 374 KiB |
@@ -51,6 +51,7 @@
|
||||
"bwi_settings_developer_restrict_user" = "Nutzer einschränken";
|
||||
"bwi_settings_developer_unrestrict_user" = "Nutzereinschränkung aufheben";
|
||||
"bwi_settings_developer_unmark_banner" = "Banner als nicht gelesen markieren";
|
||||
"bwi_settings_developer_introduce_federation" = "Erklärung zur Föderation";
|
||||
"bwi_settings_developer_well_known" = "Well-Known";
|
||||
"bwi_settings_developer_capabilities" = "Capabilities";
|
||||
"bwi_settings_developer_maintenance" = "Maintenance";
|
||||
@@ -700,3 +701,11 @@
|
||||
"room_participants_invite_prompt_server_acl_for_room_not_configured_text" = "Du kannst noch keine Personen aus einer föderierten Organisation einladen, da die Freigabe hierfür noch nicht erteilt wurde. Gib dem Admin Bescheid, dass die Einstellung getroffen werden muss.";
|
||||
|
||||
"room_participants_invite_prompt_server_acl_loading_error_text" = "Die Person kann aktuell nicht eingeladen werden, bitte versuche es später erneut.";
|
||||
"introduce_federation_screen1_title" = "Föderation";
|
||||
"introduce_federation_screen1_description" = "Übergreifende sichere Kommunikation zwischen verschiedenen Organisationen";
|
||||
"introduce_federation_screen2_title" = "Kennzeichnung";
|
||||
"introduce_federation_screen2_description" = "Föderierte Personen und Räume erkennst du am Symbol mit den zwei sich überschneidenden Kreisen.";
|
||||
"introduce_federation_screen3_title" = "Individuelle Einstellung";
|
||||
"introduce_federation_screen3_description" = "Bestimme als Admin, welche Räume für eine Föderation zugelassen sind.";
|
||||
"introduce_federation_start" = "Loslegen";
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
"bwi_settings_developer_restrict_user" = "Restrict user";
|
||||
"bwi_settings_developer_unrestrict_user" = "Remove user restriction";
|
||||
"bwi_settings_developer_unmark_banner" = "Unmark Feature Banner";
|
||||
"bwi_settings_developer_introduce_federation" = "Introduce Federation";
|
||||
"bwi_settings_developer_well_known" = "Well-Known";
|
||||
"bwi_settings_developer_capabilities" = "Capabilities";
|
||||
"bwi_settings_developer_maintenance" = "Maintenance";
|
||||
@@ -613,3 +614,10 @@
|
||||
"room_participants_invite_prompt_server_acl_for_room_not_configured_text" = "You cannot yet invite people from a federated organization, as this has not yet been approved. Let the admin know that the setting needs to be made.";
|
||||
|
||||
"room_participants_invite_prompt_server_acl_loading_error_text" = "You cannot invite this user at the moment, please try again later.";
|
||||
"introduce_federation_screen1_title" = "Federation";
|
||||
"introduce_federation_screen1_description" = "Secure communication across different organizations";
|
||||
"introduce_federation_screen2_title" = "Characterization";
|
||||
"introduce_federation_screen2_description" = "The symbol of overlaping circles helps to identify federated people.";
|
||||
"introduce_federation_screen3_title" = "Individual settings";
|
||||
"introduce_federation_screen3_description" = "Decide as an admin which room should be authorized for federation.";
|
||||
"introduce_federation_start" = "Start now";
|
||||
|
||||
@@ -55,6 +55,11 @@ internal class Asset: NSObject {
|
||||
internal static let federationPillEnBumLight = ImageAsset(name: "federation_pill_en_bum_light")
|
||||
internal static let fileAttachmentIcon = ImageAsset(name: "file_attachment_icon")
|
||||
internal static let fileScanInfected = ImageAsset(name: "file_scan_infected")
|
||||
internal static let introduceFederation1Dark = ImageAsset(name: "introduce_federation_1_dark")
|
||||
internal static let introduceFederation1Light = ImageAsset(name: "introduce_federation_1_light")
|
||||
internal static let introduceFederation2Dark = ImageAsset(name: "introduce_federation_2_dark")
|
||||
internal static let introduceFederation2Light = ImageAsset(name: "introduce_federation_2_light")
|
||||
internal static let introduceFederation3 = ImageAsset(name: "introduce_federation_3")
|
||||
internal static let newFeatures = ImageAsset(name: "new_features")
|
||||
internal static let qrcodeViewfinder = ImageAsset(name: "qrcode_viewfinder")
|
||||
internal static let roomFederatedBumIconDark = ImageAsset(name: "room_federated_bum_icon_dark")
|
||||
|
||||
@@ -35,6 +35,7 @@ struct DeveloperSettingsView: View {
|
||||
@State private var showAlert = false
|
||||
@State private var showAlertBirthdayCampaign = false
|
||||
@State private var permalinkPrefix: String? = UserDefaults.standard.string(forKey: "bwi_permalink_prefix")
|
||||
@State private var showIntroduceFederation = false
|
||||
|
||||
var body: some View {
|
||||
Form {
|
||||
@@ -79,6 +80,15 @@ struct DeveloperSettingsView: View {
|
||||
.foregroundColor(Color(ThemeService.shared().theme.tintColor))
|
||||
.font(.system(size: 17))
|
||||
}
|
||||
Button(action: { showIntroduceFederation = true }) {
|
||||
Text(BWIL10n.bwiSettingsDeveloperIntroduceFederation)
|
||||
.foregroundColor(Color(ThemeService.shared().theme.tintColor))
|
||||
.font(.system(size: 17))
|
||||
}
|
||||
.sheet(isPresented: $showIntroduceFederation) {
|
||||
IntroduceFederationView()
|
||||
.interactiveDismissDisabled()
|
||||
}
|
||||
}
|
||||
if BWIBuildSettings.shared.permalinkPrefixSettings && !BWIBuildSettings.shared.permalinkPrefixes.isEmpty {
|
||||
SwiftUI.Section(header: Text(BWIL10n.settingsPermalinkPrefixPickerTitle)) {
|
||||
|
||||
62
bwi/IntroduceFederation/IntroduceFederationScreen1.swift
Normal file
62
bwi/IntroduceFederation/IntroduceFederationScreen1.swift
Normal file
@@ -0,0 +1,62 @@
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2023 BWI GmbH
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct IntroduceFederationScreen1: View {
|
||||
var body: some View {
|
||||
ZStack(alignment: .top) {
|
||||
Color(ThemeService.shared().theme.backgroundColor)
|
||||
|
||||
VStack(spacing: 26) {
|
||||
ZStack {
|
||||
Color(hex: 0xE3E8F0)
|
||||
.frame(width: IntroduceFederationView.imageSize, height: IntroduceFederationView.imageSize)
|
||||
.clipShape(Circle())
|
||||
.padding(.leading, 76)
|
||||
Image(uiImage: Asset.SharedImages.loginFlowLogo.image)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.clipShape(Circle())
|
||||
.padding(1) // inner border size
|
||||
.background(Color(hex: 0xE3E8F0))
|
||||
.clipShape(Circle())
|
||||
.padding(5) // outer border size
|
||||
.background(Color(ThemeService.shared().theme.backgroundColor))
|
||||
.clipShape(Circle())
|
||||
.frame(width: IntroduceFederationView.imageSize + 10, height: IntroduceFederationView.imageSize + 10)
|
||||
.padding(.trailing, 76)
|
||||
}
|
||||
Text(BWIL10n.introduceFederationScreen1Title)
|
||||
.foregroundColor(Color(ThemeService.shared().theme.textPrimaryColor))
|
||||
.font(.system(size: 28, weight: .semibold))
|
||||
.multilineTextAlignment(.center)
|
||||
Text(BWIL10n.introduceFederationScreen1Description)
|
||||
.foregroundColor(Color(ThemeService.shared().theme.textSecondaryColor))
|
||||
.font(.system(size: 17))
|
||||
.multilineTextAlignment(.center)
|
||||
Spacer()
|
||||
}
|
||||
.padding(.horizontal)
|
||||
.padding(.top, IntroduceFederationView.topConstraintTitle - IntroduceFederationView.imageSize)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
IntroduceFederationScreen1()
|
||||
}
|
||||
52
bwi/IntroduceFederation/IntroduceFederationScreen2.swift
Normal file
52
bwi/IntroduceFederation/IntroduceFederationScreen2.swift
Normal file
@@ -0,0 +1,52 @@
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2023 BWI GmbH
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct IntroduceFederationScreen2: View {
|
||||
var body: some View {
|
||||
ZStack(alignment: .top) {
|
||||
Color(ThemeService.shared().theme.backgroundColor)
|
||||
|
||||
VStack(spacing: 26) {
|
||||
Image(uiImage: getImage(darkmode: ThemeService.shared().isCurrentThemeDark()))
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(height: IntroduceFederationView.imageSize)
|
||||
Text(BWIL10n.introduceFederationScreen2Title)
|
||||
.foregroundColor(Color(ThemeService.shared().theme.textPrimaryColor))
|
||||
.font(.system(size: 28, weight: .semibold))
|
||||
.multilineTextAlignment(.center)
|
||||
Text(BWIL10n.introduceFederationScreen2Description)
|
||||
.foregroundColor(Color(ThemeService.shared().theme.textSecondaryColor))
|
||||
.font(.system(size: 17))
|
||||
.multilineTextAlignment(.center)
|
||||
Spacer()
|
||||
}
|
||||
.padding(.horizontal)
|
||||
.padding(.top, IntroduceFederationView.topConstraintTitle - IntroduceFederationView.imageSize)
|
||||
}
|
||||
}
|
||||
|
||||
private func getImage(darkmode: Bool) -> UIImage {
|
||||
return darkmode ? Asset.Images.introduceFederation2Dark.image : Asset.Images.introduceFederation2Light.image
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
IntroduceFederationScreen2()
|
||||
}
|
||||
62
bwi/IntroduceFederation/IntroduceFederationScreen3.swift
Normal file
62
bwi/IntroduceFederation/IntroduceFederationScreen3.swift
Normal file
@@ -0,0 +1,62 @@
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2023 BWI GmbH
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct IntroduceFederationScreen3: View {
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
var body: some View {
|
||||
ZStack(alignment: .top) {
|
||||
Color(ThemeService.shared().theme.backgroundColor)
|
||||
|
||||
VStack(spacing: 26) {
|
||||
Image(uiImage: Asset.Images.introduceFederation3.image)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.frame(height: IntroduceFederationView.topConstraintTitle)
|
||||
Text(BWIL10n.introduceFederationScreen3Title)
|
||||
.foregroundColor(Color(ThemeService.shared().theme.textPrimaryColor))
|
||||
.font(.system(size: 28, weight: .semibold))
|
||||
.multilineTextAlignment(.center)
|
||||
Text(BWIL10n.introduceFederationScreen3Description)
|
||||
.foregroundColor(Color(ThemeService.shared().theme.textSecondaryColor))
|
||||
.font(.system(size: 17))
|
||||
.multilineTextAlignment(.center)
|
||||
Spacer()
|
||||
Button(action: onConfirm) {
|
||||
Text(BWIL10n.introduceFederationStart)
|
||||
.padding(10)
|
||||
.frame(maxWidth: .infinity, maxHeight: 40)
|
||||
.foregroundColor(.white)
|
||||
.background(Color(ThemeService.shared().theme.tintColor))
|
||||
.clipShape(RoundedRectangle(cornerRadius: 10))
|
||||
}
|
||||
.padding(.bottom, 80)
|
||||
}
|
||||
.padding(.horizontal)
|
||||
}
|
||||
}
|
||||
|
||||
private func onConfirm() {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
IntroduceFederationScreen3()
|
||||
}
|
||||
60
bwi/IntroduceFederation/IntroduceFederationView.swift
Normal file
60
bwi/IntroduceFederation/IntroduceFederationView.swift
Normal file
@@ -0,0 +1,60 @@
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2023 BWI GmbH
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
enum VisibleScreen {
|
||||
case screen1
|
||||
case screen2
|
||||
case screen3
|
||||
}
|
||||
|
||||
struct IntroduceFederationView: View {
|
||||
static let imageSize: CGFloat = 108
|
||||
static let topConstraintTitle: CGFloat = 390
|
||||
@State var visibleScreen = VisibleScreen.screen1
|
||||
|
||||
var body: some View {
|
||||
TabView(selection: $visibleScreen) {
|
||||
IntroduceFederationScreen1().tag(VisibleScreen.screen1)
|
||||
IntroduceFederationScreen2().tag(VisibleScreen.screen2)
|
||||
IntroduceFederationScreen3().tag(VisibleScreen.screen3)
|
||||
}
|
||||
.tabViewStyle(.page(indexDisplayMode: .always))
|
||||
.background {
|
||||
Color(ThemeService.shared().theme.backgroundColor)
|
||||
}
|
||||
.overlay(alignment: .bottom) {
|
||||
HStack {
|
||||
if visibleScreen != .screen1 {
|
||||
Image(systemName: "arrow.left")
|
||||
.foregroundColor(Color(ThemeService.shared().theme.textSecondaryColor))
|
||||
}
|
||||
Spacer()
|
||||
if visibleScreen != .screen3 {
|
||||
Image(systemName: "arrow.right")
|
||||
.foregroundColor(Color(ThemeService.shared().theme.textSecondaryColor))
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
IntroduceFederationView()
|
||||
}
|
||||
Reference in New Issue
Block a user