UI stuffs
This commit is contained in:
@@ -30,7 +30,14 @@
|
||||
<x-version class="fixed left-2 bottom-1" />
|
||||
<script>
|
||||
function changePasswordFieldType(event) {
|
||||
const element = event.target.parentElement.parentElement.children[0];
|
||||
let element = event.target
|
||||
for (let i = 0; i < 10; i++) {
|
||||
if (element.className === "relative") {
|
||||
break;
|
||||
}
|
||||
element = element.parentElement;
|
||||
}
|
||||
element = element.children[1];
|
||||
if (element.nodeName === 'INPUT') {
|
||||
if (element.type === 'password') {
|
||||
element.type = 'text';
|
||||
@@ -38,20 +45,6 @@
|
||||
element.type = 'password';
|
||||
}
|
||||
}
|
||||
if (element.nodeName === 'DIV') {
|
||||
if (element.children[0].type === 'password') {
|
||||
element.children[0].type = 'text';
|
||||
} else {
|
||||
element.children[0].type = 'password';
|
||||
}
|
||||
}
|
||||
if (element.nodeName === 'svg') {
|
||||
if (element.parentElement.parentElement.children[0].type === 'password') {
|
||||
element.parentElement.parentElement.children[0].type = 'text';
|
||||
} else {
|
||||
element.parentElement.parentElement.children[0].type = 'password';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user