mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
feat: Confirmation before revoke all trusted extensions
This commit is contained in:
parent
1b9d0bc76f
commit
7d7e2433c7
3 changed files with 12 additions and 6 deletions
|
@ -63,7 +63,7 @@ fun ExtensionRepoScreen(
|
|||
containerColor = MaterialTheme.colorScheme.surface,
|
||||
title = {
|
||||
Text(
|
||||
text = stringResource(R.string.notice_delete_repo_title),
|
||||
text = stringResource(R.string.confirm_delete_repo_title),
|
||||
fontStyle = MaterialTheme.typography.titleMedium.fontStyle,
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
fontSize = 24.sp,
|
||||
|
@ -71,7 +71,7 @@ fun ExtensionRepoScreen(
|
|||
},
|
||||
text = {
|
||||
Text(
|
||||
text = stringResource(R.string.notice_delete_repo, repoToDelete.orEmpty()),
|
||||
text = stringResource(R.string.confirm_delete_repo, repoToDelete.orEmpty()),
|
||||
fontStyle = MaterialTheme.typography.bodyMedium.fontStyle,
|
||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||
fontSize = 14.sp,
|
||||
|
|
|
@ -376,8 +376,13 @@ class SettingsAdvancedController : SettingsController() {
|
|||
titleRes = R.string.action_revoke_all_extensions
|
||||
|
||||
onClick {
|
||||
trustExtension.revokeAll()
|
||||
activity?.toast(R.string.requires_app_restart)
|
||||
activity?.materialAlertDialog()
|
||||
?.setTitle(R.string.confirm_revoke_all_extensions)
|
||||
?.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
trustExtension.revokeAll()
|
||||
activity?.toast(R.string.requires_app_restart)
|
||||
}
|
||||
?.setNegativeButton(android.R.string.cancel, null)?.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -364,6 +364,7 @@
|
|||
<item quantity="other">%d extension updates available</item>
|
||||
</plurals>
|
||||
<string name="action_revoke_all_extensions">Revoke all trusted extensions</string>
|
||||
<string name="confirm_revoke_all_extensions">Revoke all trusted extensions?</string>
|
||||
|
||||
<!-- Reader -->
|
||||
<string name="set_as_cover">Set as cover</string>
|
||||
|
@ -915,8 +916,8 @@
|
|||
<string name="action_add_repo">Add repo</string>
|
||||
<string name="invalid_repo_url">Invalid repo url</string>
|
||||
<string name="information_empty_repos">You haven\'t added any repos yet.</string>
|
||||
<string name="notice_delete_repo_title">Delete repo?</string>
|
||||
<string name="notice_delete_repo">Are you sure you wish to delete the repo \"%s\"?</string>
|
||||
<string name="confirm_delete_repo_title">Delete repo?</string>
|
||||
<string name="confirm_delete_repo">Are you sure you wish to delete the repo \"%s\"?</string>
|
||||
|
||||
<!-- About section -->
|
||||
<string name="version">Version</string>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue