|
|
|
@ -58,7 +58,7 @@ const getViews = screen => {
|
|
|
|
|
text({ content: `${name} v${version} | ${description}\n\nBy ${author.name} | ${homepage}\n\nDistributed under the ${license} licence.` });
|
|
|
|
|
const actions = flexContainer({ top: 6 }, disclaimerForm);
|
|
|
|
|
const submitButton = button({ content: 'Proceed' }, undefined, actions);
|
|
|
|
|
button({ content: 'Cancel' }, { color: 'gray' }, actions).on('press', reject);
|
|
|
|
|
button({ content: 'Cancel' }, undefined, actions).on('press', reject);
|
|
|
|
|
disclaimerForm.on('submit', () => resolve());
|
|
|
|
|
submitButton.on('press', () => disclaimerForm.submit());
|
|
|
|
|
screen.render();
|
|
|
|
@ -100,7 +100,7 @@ const getViews = screen => {
|
|
|
|
|
let n = 2;
|
|
|
|
|
const codeInput = textbox({ top: n, name: 'code' }, otpLoginForm);
|
|
|
|
|
const actions = flexContainer({ top: n += 4 }, otpLoginForm);
|
|
|
|
|
button({ content: 'Cancel', hidden: !isCancellable }, { color: 'gray' }, actions)
|
|
|
|
|
button({ content: 'Cancel', hidden: !isCancellable }, undefined, actions)
|
|
|
|
|
.on('press', () => callback({ isCancelled: true }));
|
|
|
|
|
button({ content: 'Submit' }, undefined, actions)
|
|
|
|
|
.on('press', () => otpLoginForm.submit());
|
|
|
|
@ -151,7 +151,7 @@ const getViews = screen => {
|
|
|
|
|
text({ top: n += qrText.$height + 2, content: 'Input OTP code to confirm :' }, otpSetupForm);
|
|
|
|
|
const codeInput = textbox({ top: n += 2, name: 'code' }, otpSetupForm);
|
|
|
|
|
const actions = flexContainer({ top: n += 4 }, otpSetupForm);
|
|
|
|
|
button({ content: 'Cancel' }, { color: 'gray' }, actions)
|
|
|
|
|
button({ content: 'Cancel' }, undefined, actions)
|
|
|
|
|
.on('press', () => callback({ isCancelled: true }));
|
|
|
|
|
button({ content: 'Submit' }, undefined, actions)
|
|
|
|
|
.on('press', () => otpSetupForm.submit());
|
|
|
|
@ -207,7 +207,7 @@ const getViews = screen => {
|
|
|
|
|
}, { borders: true });
|
|
|
|
|
const selectedHostText = text(undefined, undefined, selectedHostForm);
|
|
|
|
|
const selectedHostActions = flexContainer({ top: 2, width: 75 }, selectedHostForm);
|
|
|
|
|
const cancelButton = button({ content: 'Cancel' }, { color: 'gray' }, selectedHostActions);
|
|
|
|
|
const cancelButton = button({ content: 'Cancel' }, undefined, selectedHostActions);
|
|
|
|
|
cancelButton.on('press', () => {
|
|
|
|
|
selectedHostForm.hide();
|
|
|
|
|
screen.render();
|
|
|
|
@ -259,7 +259,7 @@ const getViews = screen => {
|
|
|
|
|
text({ top: n += 4, content: 'Password :' }, hostForm);
|
|
|
|
|
textbox({ top: n += 2, name: 'password', censor: true, content: password }, hostForm);
|
|
|
|
|
const actions = flexContainer({ top: n += 4, width: 100 }, hostForm);
|
|
|
|
|
button({ content: 'Cancel' }, { color: 'gray' }, actions)
|
|
|
|
|
button({ content: 'Cancel' }, undefined, actions)
|
|
|
|
|
.on('press', () => callback({ action: 'cancel' }));
|
|
|
|
|
const testButton = button({ content: 'Test' }, undefined, actions);
|
|
|
|
|
testButton.on('press', () => {
|
|
|
|
@ -355,7 +355,7 @@ const getViews = screen => {
|
|
|
|
|
textbox({ top: n += 2, name: 'otpCode' }, editUserPassForm);
|
|
|
|
|
}
|
|
|
|
|
const actions = flexContainer({ top: n += 4 }, editUserPassForm);
|
|
|
|
|
button({ content: 'Cancel' }, { color: 'gray' }, actions)
|
|
|
|
|
button({ content: 'Cancel' }, undefined, actions)
|
|
|
|
|
.on('press', () => callback({ isCancelled: true }));
|
|
|
|
|
button({ content: 'Submit' }, undefined, actions)
|
|
|
|
|
.on('press', () => editUserPassForm.submit());
|
|
|
|
@ -394,7 +394,7 @@ const getViews = screen => {
|
|
|
|
|
}
|
|
|
|
|
checkbox({ top: n += 4, name: 'confirm', content: 'I understand this cannot be undone.' }, deleteAccountForm);
|
|
|
|
|
const actions = flexContainer({ top: n += 2 }, deleteAccountForm);
|
|
|
|
|
button({ content: 'Cancel' }, { color: 'gray' }, actions)
|
|
|
|
|
button({ content: 'Cancel' }, undefined, actions)
|
|
|
|
|
.on('press', () => callback({ isCancelled: true }));
|
|
|
|
|
const submitButton = button({ content: 'Submit' }, { color: 'red' }, actions)
|
|
|
|
|
submitButton.on('press', () => deleteAccountForm.submit());
|
|
|
|
|