From aae77715eab14a6683a49b6ee757ac5fafb2e6c7 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 17 Sep 2020 09:14:24 +0200 Subject: [PATCH 1/3] fadeing the bg for modals --- apps/remix-ide/src/app/ui/styles/modaldialog-styles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/ui/styles/modaldialog-styles.js b/apps/remix-ide/src/app/ui/styles/modaldialog-styles.js index da028aafb9..8ba81a6184 100644 --- a/apps/remix-ide/src/app/ui/styles/modaldialog-styles.js +++ b/apps/remix-ide/src/app/ui/styles/modaldialog-styles.js @@ -5,7 +5,7 @@ var css = csjs` .modalFooter { } .modalContent { - box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19); + box-shadow: 0 4px 8px 1000px rgba(0,0,0,0.4),0 6px 20px 0 rgba(0,0,0,0.19); -webkit-animation-name: animatetop; -webkit-animation-duration: 0.4s; animation-name: animatetop; From 41fba4f998832c8c8efaea5e717a3a2741aae9a1 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 17 Sep 2020 11:28:51 +0200 Subject: [PATCH 2/3] some style changes in modal --- .../src/app/ui/modal-dialog-custom.js | 20 ++++++++++++++++++- apps/remix-ide/src/app/ui/modaldialog.js | 2 +- .../src/app/ui/styles/modaldialog-styles.js | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide/src/app/ui/modal-dialog-custom.js b/apps/remix-ide/src/app/ui/modal-dialog-custom.js index ec4535ecc6..a0cf78bdbb 100644 --- a/apps/remix-ide/src/app/ui/modal-dialog-custom.js +++ b/apps/remix-ide/src/app/ui/modal-dialog-custom.js @@ -67,7 +67,25 @@ module.exports = { function prompt (title, text, hidden, inputValue, ok, cancel, focus) { if (!inputValue) inputValue = '' var type = hidden ? 'password' : 'text' - var input = yo`` + var input = yo` + + ` + const validateInput = (e) => { + if (e.target.value === '') { + document.getElementById('modal-footer-ok').classList.add('disabled') + } else { + document.getElementById('modal-footer-ok').classList.remove('disabled') + } + } + modal(title, yo`
${text}
${input}
`, { fn: () => { if (typeof ok === 'function') ok(document.getElementById('prompt_text').value) } diff --git a/apps/remix-ide/src/app/ui/modaldialog.js b/apps/remix-ide/src/app/ui/modaldialog.js index a72b4a0941..90d938323a 100644 --- a/apps/remix-ide/src/app/ui/modaldialog.js +++ b/apps/remix-ide/src/app/ui/modaldialog.js @@ -130,7 +130,7 @@ module.exports = (title, content, ok, cancel, focusSelector, opts) => { function html (opts) { return yo` -