mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-10 10:27:26 +08:00
improve LinkCard.svelte when click button clean input
This commit is contained in:
@@ -125,12 +125,12 @@
|
|||||||
// If there are no longer conflicts, we can link the card
|
// If there are no longer conflicts, we can link the card
|
||||||
if (!isConflict) {
|
if (!isConflict) {
|
||||||
await doLink(conflictCardID, conflictToMigrate.join(","))
|
await doLink(conflictCardID, conflictToMigrate.join(","))
|
||||||
|
|
||||||
// Reset the conflict state
|
// Reset the conflict state
|
||||||
linkConflictCancel()
|
linkConflictCancel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function linkConflictCancel() {
|
function linkConflictCancel() {
|
||||||
state = "ready"
|
state = "ready"
|
||||||
conflictSummary = null
|
conflictSummary = null
|
||||||
@@ -249,7 +249,7 @@
|
|||||||
on:input={inputACChange}
|
on:input={inputACChange}
|
||||||
class:error={inputAC && (!inputACRegex.test(inputAC) || errorAC)}>
|
class:error={inputAC && (!inputACRegex.test(inputAC) || errorAC)}>
|
||||||
{#if inputAC.length > 0}
|
{#if inputAC.length > 0}
|
||||||
<button transition:slide={{axis: 'x'}} on:click={() => link('AC')}>Link</button>
|
<button transition:slide={{axis: 'x'}} on:click={() => {link('AC');inputAC=''}}>Link</button>
|
||||||
{/if}
|
{/if}
|
||||||
</label>
|
</label>
|
||||||
{#if errorAC}
|
{#if errorAC}
|
||||||
@@ -276,7 +276,7 @@
|
|||||||
on:input={inputSNChange}
|
on:input={inputSNChange}
|
||||||
class:error={inputSN && (!inputSNRegex.test(inputSN) || errorSN)}>
|
class:error={inputSN && (!inputSNRegex.test(inputSN) || errorSN)}>
|
||||||
{#if inputSN.length > 0}
|
{#if inputSN.length > 0}
|
||||||
<button transition:slide={{axis: 'x'}} on:click={() => link('SN')}>Link</button>
|
<button transition:slide={{axis: 'x'}} on:click={() => {link('SN'); inputSN = ''}}>Link</button>
|
||||||
{/if}
|
{/if}
|
||||||
</label>
|
</label>
|
||||||
{#if errorSN}
|
{#if errorSN}
|
||||||
@@ -373,4 +373,4 @@
|
|||||||
.id
|
.id
|
||||||
opacity: 0.7
|
opacity: 0.7
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user