-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Ask user to confirm canceling team migration (WPB-11268) (#3546)
- Loading branch information
Showing
11 changed files
with
133 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
app/src/main/kotlin/com/wire/android/ui/userprofile/teammigration/TeamMigrationState.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
package com.wire.android.ui.userprofile.teammigration | ||
|
||
import androidx.compose.foundation.text.input.TextFieldState | ||
|
||
data class TeamMigrationState( | ||
val teamNameTextState: TextFieldState = TextFieldState(), | ||
val passwordTextState: TextFieldState = TextFieldState(), | ||
val shouldShowMigrationLeaveDialog: Boolean = false | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...otlin/com/wire/android/ui/userprofile/teammigration/common/ConfirmMigrationLeaveDialog.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
package com.wire.android.ui.userprofile.teammigration.common | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.res.stringResource | ||
import com.wire.android.R | ||
import com.wire.android.ui.common.WireDialog | ||
import com.wire.android.ui.common.WireDialogButtonProperties | ||
import com.wire.android.ui.common.WireDialogButtonType | ||
import com.wire.android.ui.theme.WireTheme | ||
import com.wire.android.util.ui.PreviewMultipleThemes | ||
|
||
@Composable | ||
fun ConfirmMigrationLeaveDialog( | ||
onContinue: () -> Unit, | ||
onLeave: () -> Unit | ||
) { | ||
WireDialog( | ||
title = stringResource(R.string.personal_to_team_migration_confirm_leave_dialog_title), | ||
text = stringResource(R.string.personal_to_team_migration_confirm_leave_dialog_description), | ||
onDismiss = { }, | ||
optionButton1Properties = WireDialogButtonProperties( | ||
onClick = onContinue, | ||
text = stringResource(R.string.personal_to_team_migration_confirm_leave_dialog_continue_button), | ||
type = WireDialogButtonType.Primary | ||
), | ||
optionButton2Properties = WireDialogButtonProperties( | ||
text = stringResource(id = R.string.personal_to_team_migration_confirm_leave_dialog_leave_button), | ||
onClick = onLeave, | ||
type = WireDialogButtonType.Secondary | ||
), | ||
buttonsHorizontalAlignment = false | ||
) | ||
} | ||
|
||
@PreviewMultipleThemes | ||
@Composable | ||
private fun ConfirmMigrationLeaveDialogPreview() { | ||
WireTheme { | ||
ConfirmMigrationLeaveDialog({}, {}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters