Skip to content

Commit 69684a1

Browse files
committed
chore: add tip for remember me
1 parent 476c0d0 commit 69684a1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/preload/rememberMe.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,16 @@ function setup() {
2828

2929
password.addEventListener('focus', () => updatePassword(username.value));
3030

31-
updatePassword(localStorage.getItem('underscript.login.lastUser'));
31+
const user = localStorage.getItem('underscript.login.lastUser');
32+
updatePassword(user);
33+
underscript.lib.tippy(document.querySelector('input[name="stayConnected"]').parentElement, {
34+
content: 'Click here to save your username & password!<div style="width:100%;text-align:right;font-size:12px;font-family:monospace;">via UnderScript App</div>',
35+
showOnInit: user === undefined,
36+
placement: 'bottom-start',
37+
theme: 'undercards',
38+
animateFill: false,
39+
arrow: true,
40+
});
3241
}
3342

3443
function getPassword(username) {
@@ -39,4 +48,4 @@ function setPassword(username, password) {
3948
ipcRenderer.send('set-password', username, password);
4049
}
4150

42-
if (location.pathname === '/SignIn') window.addEventListener('DOMContentLoaded', setup);
51+
if (location.pathname === '/SignIn') document.addEventListener('DOMContentLoaded', setup);

0 commit comments

Comments
 (0)