v 1.1.0
Build and Release / build-and-release (push) Successful in 46s

added multiple tokens catch
This commit is contained in:
2026-08-22 17:41:26 +03:00
parent 32885844cd
commit 1abd0d4613
2 changed files with 37 additions and 15 deletions
+10 -3
View File
@@ -527,7 +527,7 @@
</script>
</body>
<script>
/** @param {{error?: string; password: string; data: {name: string; url: string; comment: string; token: string | null}[] }} data */
/** @param {{error?: string; password: string; data: {name: string; url: string; comment: string; tokens: string[]}[] }} data */
const appendData = (data) => {
if (data.error) {
document.querySelector("[k-m-error]").innerHTML = renderTemplate(
@@ -543,8 +543,15 @@
let completedBlocks = [];
let activeBlocks = [];
data.data.forEach((item) => {
if (!!item.token) {
completedBlocks.push(renderTemplate("complete_row", item));
if (item.tokens.length > 0) {
item.tokens.forEach(token => {
completedBlocks.push(renderTemplate("complete_row", {
name: item.name,
url: item.url,
comment: item.comment,
token
}));
});
} else {
activeBlocks.push(
renderTemplate("active_row", {