Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Threema/Threema/MyProfile/Backups/   (Social Medium ©)  Datei vom 26.9.2026 mit Größe 2 kB image not shown  

Quelle  BackupsView.swift   Sprache: JAVA

 

import SwiftUI

struct BackupsView: View {
    let model: BackupsViewModel

    var body: some View {
        List {
            Section {
                ButtonNavigation {
                    model.safeButtonTapped()
                } label: {
                    HStack {
                        Text(model.safeButtonTitle)
                        Spacer()
                        Text(model.safeActivationStatusLabel)
                            .foregroundColor(.secondary)
                    }
                }
                .accessibilityIdentifier("threemaSafeButton")
                .disabled(model.safeIsDisabled)
            } footer: {
                Text(model.safeSectionFooter)
            }

            Section {
                ButtonNavigation {
                    model.idExportButtonTapped()
                } label: {
                    HStack {
                        Text(model.idExportButtonTitle)
                        Spacer()
                    }
                }
                .disabled(model.isIDExportDisabled)
            } footer: {
                Text(model.idExportSectionFooter)
            }
        }
        .navigationTitle(model.screenTitle)
        .navigationBarTitleDisplayMode(.inline)
        .onAppear {
            model.onAppear()
        }
    }
}

#if DEBUG
    #Preview("Safe Enabled | Activated") {
        NavigationView {
            BackupsView(
                model: BackupsViewModel(
                    appFlavor: .mock,
                    mdmSetup: .mock,
                    safeManager: .activated
                )
            )
        }
    }

    #Preview("Safe Enabled | Deactivated") {
        NavigationView {
            BackupsView(
                model: BackupsViewModel(
                    appFlavor: .mock,
                    mdmSetup: .mock,
                    safeManager: .deactivated
                )
            )
        }
    }

    #Preview("Safe Disabled") {
        NavigationView {
            BackupsView(
                model: BackupsViewModel(
                    appFlavor: .mock,
                    mdmSetup: .safeBackupDisabled,
                    safeManager: .deactivated
                )
            )
        }
    }

    #Preview("ID Export Disabled") {
        NavigationView {
            BackupsView(
                model: BackupsViewModel(
                    appFlavor: .mock,
                    mdmSetup: .idExportDisabled,
                    safeManager: .mock
                )
            )
        }
    }
#endif

Messung
CHZG
869610093

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.