Skip to content

Commit

Permalink
Fix editing codes #300
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Jun 3, 2024
1 parent c5c6026 commit f2ab6a3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions interface/windows/edit/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const generateEditElements = () => {
<div class="flex flex-wrap gap-3">
<div>
<h5>${language.common.name}</h5>
<input id="issuer${i}" class="input mt-1" type="text" value="${issuers[i]}" readonly />
<input id="issuer${uniqIds[i]}" class="input mt-1" type="text" value="${issuers[i]}" readonly />
</div>
<div>
Expand Down Expand Up @@ -109,8 +109,8 @@ export const saveChanges = async () => {
export const editCode = async (uniqId: string) => {
const id = uniqIds.indexOf(uniqId)

const issuer: HTMLInputElement = document.querySelector(`#issuer${id}`)
const name: HTMLInputElement = document.querySelector(`#name${id}`)
const issuer: HTMLInputElement = document.querySelector(`#issuer${uniqId}`)
const name: HTMLInputElement = document.querySelector(`#name${uniqId}`)

issuer.focus()
const length = issuer.value.length
Expand All @@ -129,8 +129,8 @@ export const editCode = async (uniqId: string) => {
issuer.style.color = "white"
name.style.color = "white"

const newIssuer = document.querySelector(`#issuer${id}`).value
const newName = document.querySelector(`#name${id}`).value
const newIssuer = document.querySelector(`#issuer${uniqId}`).value
const newName = document.querySelector(`#name${uniqId}`).value

const res = await dialog.ask(language.edit.dialog.saveChanges, { type: "warning" })

Expand Down

0 comments on commit f2ab6a3

Please sign in to comment.