💄 Add green color to submit buttons

dev
KaKi87 2 years ago
parent 2689b32b69
commit 972b047c06

@ -59,7 +59,7 @@ const getViews = screen => {
const actions = flexContainer({ top: 6 }, disclaimerForm);
const cancelButton = button({ content: 'Cancel' }, undefined, actions);
cancelButton.on('press', reject);
button({ content: 'Proceed' }, undefined, actions)
button({ content: 'Proceed' }, { color: 'green' }, actions)
.on('press', () => disclaimerForm.submit());
disclaimerForm.on('submit', () => resolve());
screen.render();
@ -123,7 +123,7 @@ const getViews = screen => {
let n = 2;
const repeatPasswordInput = textbox({ top: n, name: 'repeatPassword', censor: true }, registrationForm);
checkbox({ top: n += 4, name: 'enableOtp', content: 'Enable OTP (next step)' }, registrationForm);
const submitButton = button({ top: n += 2, content: 'Submit' }, undefined, registrationForm);
const submitButton = button({ top: n += 2, content: 'Submit' }, { color: 'green' }, registrationForm);
const passwordMismatchError = text(
{ top: n + 4, content: 'This password does not match the one you entered via SSH.', hidden: true },
{ color: 'red' },
@ -154,7 +154,7 @@ const getViews = screen => {
const actions = flexContainer({ top: n += 4 }, otpSetupForm);
button({ content: 'Cancel' }, undefined, actions)
.on('press', () => callback({ isCancelled: true }));
button({ content: 'Submit' }, undefined, actions)
button({ content: 'Submit' }, { color: 'green' }, actions)
.on('press', () => otpSetupForm.submit());
const successText = text({ top: n += 4, content: 'OTP successfully enabled', hidden: true }, { color: 'green' }, otpSetupForm);
const errorText = text({ top: n, content: 'Wrong OTP code', hidden: true }, { color: 'red' }, otpSetupForm);
@ -221,7 +221,7 @@ const getViews = screen => {
screen.render();
cancelButton.focus();
});
const connectButton = button({ content: 'Connect' }, undefined, selectedHostActions)
const connectButton = button({ content: 'Connect' }, { color: 'green' }, selectedHostActions)
connectButton.on('press', () => {
connectButton.setContent('Connecting');
screen.render();
@ -267,7 +267,7 @@ const getViews = screen => {
action = 'test';
hostForm.submit();
});
button({ content: 'Submit' }, undefined, actions).on('press', () => {
button({ content: 'Submit' }, { color: 'green' }, actions).on('press', () => {
action = 'submit';
hostForm.submit();
});
@ -358,7 +358,7 @@ const getViews = screen => {
const actions = flexContainer({ top: n += 4 }, editUserPassForm);
button({ content: 'Cancel' }, undefined, actions)
.on('press', () => callback({ isCancelled: true }));
button({ content: 'Submit' }, undefined, actions)
button({ content: 'Submit' }, { color: 'green' }, actions)
.on('press', () => editUserPassForm.submit());
const errorText = text(
{ top: n + 4 },

Loading…
Cancel
Save