Skip to content
This repository was archived by the owner on Apr 22, 2022. It is now read-only.

Commit 18e1ed0

Browse files
committed
Minor focus fix
1 parent 7cf83a6 commit 18e1ed0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

masterpassword.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
<div style="background-image: url(resources/Icon.png);background-size:200px;width:200px;height:200px;position:relative;left:50%;margin-left:-100px;margin-top:100px;"></div>
1111
<div style="color:#FFF;text-align:center;font-size:20px;font-family:Verdana;margin:30px 0;">Master Password</div>
1212
<div style="text-align:center;margin:30px 0;"><input type="password" autofocus placeholder="Enter your password..." onpaste="handlePaste(event)" onkeyup="doValidate(event, this.value)" style="text-align:center;font-size:20px;font-family:Verdana;padding:10px;border: 0;" /><button onclick="onButtonClick()" style="height:44px;border:0;width:44px;position:relative;top:2px;font-size:30px;background-color:#053767;color:white;">&raquo;</button></div>
13+
<div id='wrong-pass' style="color:crimson;text-align:center;font-size:20px;font-family:Verdana;margin:30px 0;visibility:hidden;">The password is incorrect. Try again...</div>
1314
<div style="text-align:center;margin-top:60px;"><a href="#" onclick="exit()" style="text-decoration:none;color:#4e9dbb;font-family:Arial;">Exit Rambox</a></div>
15+
1416
<script>
1517
function handlePaste(e) {
1618
var clipboardData, pastedData;
@@ -26,11 +28,12 @@
2628
// Do whatever with pasteddata
2729
}
2830
function doValidate(e, value) {
31+
document.getElementById('wrong-pass').style.visibility = 'hidden'
2932
if (e.keyCode == 13) {
3033
const { ipcRenderer } = require('electron');
3134
if ( !ipcRenderer.sendSync('validateMasterPassword', value) ) {
32-
alert('The password is incorrect. Try again...');
3335
document.getElementsByTagName("input")[0].value = "";
36+
document.getElementById('wrong-pass').style.visibility = 'visible'
3437
}
3538
}
3639
}

0 commit comments

Comments
 (0)