Skip to content

Commit

Permalink
Fix delete all codes and focus search
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Oct 17, 2022
1 parent 22af5a0 commit b408db2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion interface/layout/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ event.listen("openCodes", (data: any) => {
window.appWindow.onFocusChanged((focused) => {
if (focused.payload === true && state.authenticated === true) {
if (location.pathname === "/codes") {
document.querySelector<HTMLInputElement>(".search").focus()
document.querySelector<HTMLInputElement>(".search").select()
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion interface/windows/codes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ export const loadCodes = async () => {
generateCodeElements(textConverter(decryptedText, settings.settings.sortCodes))
}

document.querySelector<HTMLInputElement>(".search").focus()
document.querySelector<HTMLInputElement>(".search").select()
} else {
if (state.importData !== null) {
// There are no saved codes, but new codes imported
Expand Down
4 changes: 2 additions & 2 deletions interface/windows/edit/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ export const deleteCodes = async () => {
const confirm1 = await dialog.ask("Are you absolutely sure? \n\nThere is no way back!", { type: "warning" })

if (confirm1 === true) {
const filePath = await path.join(await path.configDir(), "Levminer", "Authme 4", "codes", "codes.authme")
await fs.removeFile(filePath)
settings.vault.codes = null
setSettings(settings)

navigate("codes")
}
Expand Down

0 comments on commit b408db2

Please sign in to comment.