add button to disable ISync

This commit is contained in:
Mystikfluu
2023-04-04 15:26:09 +02:00
parent c09e478ffd
commit 0085866268
2 changed files with 13 additions and 2 deletions
+5 -1
View File
@@ -13,7 +13,7 @@
<h2>ISync</h2>
<h4>Keep your passwords up-to-date on multiple devices</h4>
<span>Current status: <b id="ISyncStatus">Checking</b></span>
<a href="/enableISync.html" class="nostyle" id="enableISync">Enable ISync</a>
<button id="enableISyncButton"><a href="/enableISync.html" class="nostyle" id="enableISync">Enable ISync</a></button>
</div>
<script>
const { invoke } = window.__TAURI__.tauri;
@@ -21,7 +21,11 @@
let status = await invoke("get_isync_status")
document.getElementById("ISyncStatus").innerText=status?"Enabled":"Disabled"
if(status){
document.getElementById("enableISyncButton").innerText="Disable ISync"
document.getElementById("enableISync").remove()
document.getElementById("enableISyncButton").addEventListener("onclick",(_e)=>{
invoke("remove_token")
})
}
}
start()