1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2024-11-24 12:16:28 +01:00

Add confirmation dialog for forgetting accounts

This commit is contained in:
Henry Le Grys 2021-02-09 01:41:49 +00:00
parent 3effa7d674
commit 2ec8180d2a
2 changed files with 8 additions and 1 deletions

View File

@ -111,8 +111,13 @@ public class AccountSelectDialog extends JDialog {
removeSelected.addActionListener(ev -> { removeSelected.addActionListener(ev -> {
if (accountList.getSelectedValue() != null) { if (accountList.getSelectedValue() != null) {
boolean confirmed = SwingHelper.confirmDialog(this, SharedLocale.tr("accounts.confirmForget"),
SharedLocale.tr("accounts.confirmForgetTitle"));
if (confirmed) {
launcher.getAccounts().remove(accountList.getSelectedValue()); launcher.getAccounts().remove(accountList.getSelectedValue());
} }
}
}); });
accountList.setSelectedIndex(0); accountList.setSelectedIndex(0);

View File

@ -93,6 +93,8 @@ accounts.refreshingStatus=Refreshing login session...
accounts.addMojang=Add Mojang account accounts.addMojang=Add Mojang account
accounts.addMicrosoft=Add Microsoft account accounts.addMicrosoft=Add Microsoft account
accounts.removeSelected=Forget selected account accounts.removeSelected=Forget selected account
accounts.confirmForgetTitle=Forget account
accounts.confirmForget=Are you sure that you want to forget that account?
login.login=Login... login.login=Login...
login.recoverAccount=Forgot your login? login.recoverAccount=Forgot your login?