Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

Commit

Permalink
Update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Aug 9, 2022
1 parent 579a37d commit f95258e
Show file tree
Hide file tree
Showing 3 changed files with 1,108 additions and 991 deletions.
28 changes: 28 additions & 0 deletions interface/windows/confirm/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { navigate } from "../../libraries/navigate"
import { getSettings } from "../../stores/settings"
import { dialog, invoke } from "@tauri-apps/api"

export const confirmPassword = async () => {
const settings = getSettings()
const input = document.querySelector(".passwordInput").value

const result = await invoke("verify_password", { password: input, hash: settings.security.password })

console.log(result)
}

export const showPassword = () => {
const inputState = document.querySelector(".passwordInput").getAttribute("type")

if (inputState === "password") {
document.querySelector(".showPassword").style.display = "none"
document.querySelector(".hidePassword").style.display = "block"

document.querySelector(".passwordInput").setAttribute("type", "text")
} else {
document.querySelector(".showPassword").style.display = "block"
document.querySelector(".hidePassword").style.display = "none"

document.querySelector(".passwordInput").setAttribute("type", "password")
}
}
Loading

0 comments on commit f95258e

Please sign in to comment.