Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IBAN UI] Prompt before removing a local IBAN.
This CL adds a confirmation dialog to confirm a user's intent to remove a locally stored IBAN in settings. The CL also changes the word in IBAN menu from 'Remove' to 'Delete'. Fixed: 1424493, 1424494 Change-Id: Ie97fd6bd955079c90bae849a0442eba8dd85d9cf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4347333 Reviewed-by: Jared Saul <jsaul@google.com> Commit-Queue: Qihui Zhao <qihuizhao@google.com> Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/main@{#1118858}
- Loading branch information
Qihui Zhao
authored and
Chromium LUCI CQ
committed
Mar 17, 2023
1 parent
ce2f784
commit 7b4d7f7
Showing
13 changed files
with
168 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
1 change: 0 additions & 1 deletion
1
chrome/app/settings_strings_grdp/IDS_SETTINGS_IBAN_REMOVE.png.sha1
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...pp/settings_strings_grdp/IDS_SETTINGS_LOCAL_CARD_REMOVE_CONFIRMATION_DESCRIPTION.png.sha1
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
chrome/app/settings_strings_grdp/IDS_SETTINGS_LOCAL_IBAN_REMOVE_CONFIRMATION_TITLE.png.sha1
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 @@ | ||
25a19a3ef76fc955e4292ba476dbe56f0a9a0fb9 |
1 change: 1 addition & 0 deletions
1
...s_strings_grdp/IDS_SETTINGS_LOCAL_PAYMENT_METHOD_REMOVE_CONFIRMATION_DESCRIPTION.png.sha1
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 @@ | ||
458b24270e0e70ac1bdcf4d304c3e92da387524f |
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
2 changes: 1 addition & 1 deletion
2
...rowser/resources/settings/autofill_page/local_credit_card_remove_confirmation_dialog.html
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
12 changes: 12 additions & 0 deletions
12
chrome/browser/resources/settings/autofill_page/local_iban_remove_confirmation_dialog.html
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,12 @@ | ||
<cr-dialog show-on-attach id="dialog" close-text="$i18n{close}"> | ||
<div slot="title">$i18n{removeLocalIbanConfirmationTitle}</div> | ||
<div slot="body">$i18n{removeLocalPaymentMethodConfirmationDescription}</div> | ||
<div slot="button-container"> | ||
<cr-button class="cancel-button" on-click="onCancelClick_" id="cancel"> | ||
$i18n{cancel} | ||
</cr-button> | ||
<cr-button class="action-button" on-click="onRemoveClick_" id="remove"> | ||
$i18n{delete} | ||
</cr-button> | ||
</div> | ||
</cr-dialog> |
58 changes: 58 additions & 0 deletions
58
chrome/browser/resources/settings/autofill_page/local_iban_remove_confirmation_dialog.ts
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 @@ | ||
// Copyright 2023 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
/** | ||
* @fileoverview 'local-iban-remove-confirmation-dialog' is the dialog | ||
* that allows removing a locally-saved IBAN. | ||
*/ | ||
import 'chrome://resources/cr_elements/cr_button/cr_button.js'; | ||
import 'chrome://resources/cr_elements/cr_dialog/cr_dialog.js'; | ||
|
||
import {CrDialogElement} from 'chrome://resources/cr_elements/cr_dialog/cr_dialog.js'; | ||
import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; | ||
|
||
import {getTemplate} from './local_iban_remove_confirmation_dialog.html.js'; | ||
|
||
|
||
export interface SettingsLocalIbanRemoveConfirmationDialogElement { | ||
$: { | ||
dialog: CrDialogElement, | ||
remove: HTMLElement, | ||
cancel: HTMLElement, | ||
}; | ||
} | ||
|
||
export class SettingsLocalIbanRemoveConfirmationDialogElement extends | ||
PolymerElement { | ||
static get is() { | ||
return 'settings-local-iban-remove-confirmation-dialog'; | ||
} | ||
|
||
static get template() { | ||
return getTemplate(); | ||
} | ||
|
||
wasConfirmed(): boolean { | ||
return this.$.dialog.getNative().returnValue === 'success'; | ||
} | ||
|
||
private onRemoveClick_() { | ||
this.$.dialog.close(); | ||
} | ||
|
||
private onCancelClick_() { | ||
this.$.dialog.cancel(); | ||
} | ||
} | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
'settings-local-iban-remove-confirmation-dialog': | ||
SettingsLocalIbanRemoveConfirmationDialogElement; | ||
} | ||
} | ||
|
||
customElements.define( | ||
SettingsLocalIbanRemoveConfirmationDialogElement.is, | ||
SettingsLocalIbanRemoveConfirmationDialogElement); |
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