mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-26 06:35:51 +00:00
Added "Change Seed" button
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
// Step 5 code additions - start
|
||||
window.electronAPI.onOpenSeedDialog((_event) => {
|
||||
const seedDialog = document.getElementById('seed-dialog');
|
||||
const seedInput = seedDialog.querySelector('input');
|
||||
const submitButton = seedDialog.querySelector('button[type="submit"]');
|
||||
const seedDialog = document.getElementById('seed-dialog')
|
||||
const seedInput = seedDialog.querySelector('input')
|
||||
const submitButton = seedDialog.querySelector('button[type="submit"]')
|
||||
|
||||
submitButton.addEventListener('click', () => {
|
||||
const seed = seedInput.value;
|
||||
const seed = seedInput.value
|
||||
window.electronAPI.onEnterSeed(seed)
|
||||
seedDialog.close()
|
||||
});
|
||||
@@ -14,16 +14,22 @@ window.electronAPI.onOpenSeedDialog((_event) => {
|
||||
})
|
||||
|
||||
window.electronAPI.onOpenPasswordDialog((_event) => {
|
||||
const passwordDialog = document.getElementById('password-dialog');
|
||||
const passwordInput = passwordDialog.querySelector('input');
|
||||
const submitButton = passwordDialog.querySelector('button[type="submit"]');
|
||||
const passwordDialog = document.getElementById('password-dialog')
|
||||
const passwordInput = passwordDialog.querySelector('input')
|
||||
const submitButton = passwordDialog.querySelector('button[type="submit"]')
|
||||
const changeSeedButton = passwordDialog.querySelector('button[type="button"]')
|
||||
|
||||
submitButton.addEventListener('click', () => {
|
||||
const password = passwordInput.value;
|
||||
const password = passwordInput.value
|
||||
window.electronAPI.onEnterPassword(password)
|
||||
passwordDialog.close()
|
||||
});
|
||||
|
||||
changeSeedButton.addEventListener('click', () => {
|
||||
passwordDialog.close()
|
||||
window.electronAPI.requestSeedChange()
|
||||
});
|
||||
|
||||
passwordDialog.showModal()
|
||||
});
|
||||
// Step 5 code additions - end
|
||||
|
||||
Reference in New Issue
Block a user