quota-keepalive 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ui/app.js +9 -1
- package/ui/style.css +11 -0
package/package.json
CHANGED
package/ui/app.js
CHANGED
|
@@ -50,6 +50,11 @@
|
|
|
50
50
|
"minimax-code-global": "provider-icons/minimax.svg",
|
|
51
51
|
codearts: "provider-icons/codearts.svg",
|
|
52
52
|
}
|
|
53
|
+
const PROVIDER_MASK_ICON_CLASSES = {
|
|
54
|
+
"provider-icons/qoder.svg": "provider-icon-qoder",
|
|
55
|
+
"provider-icons/opencode.svg": "provider-icon-opencode",
|
|
56
|
+
"provider-icons/trae.svg": "provider-icon-trae",
|
|
57
|
+
}
|
|
53
58
|
|
|
54
59
|
let snapshot = window.DailyKeepaliveSnapshot || null
|
|
55
60
|
let busy = false
|
|
@@ -616,8 +621,11 @@
|
|
|
616
621
|
? provider.icon
|
|
617
622
|
: ""
|
|
618
623
|
const iconFile = PROVIDER_ICON_FILES[idKey] || ""
|
|
624
|
+
const maskClass = nativeIcon ? "" : PROVIDER_MASK_ICON_CLASSES[iconFile] || ""
|
|
619
625
|
const mark = nativeIcon || iconFile
|
|
620
|
-
?
|
|
626
|
+
? maskClass
|
|
627
|
+
? `<span class="provider-icon-mask ${maskClass}" aria-hidden="true"></span>`
|
|
628
|
+
: `<img src="${escapeHtml(nativeIcon || iconFile)}" alt="" loading="lazy">`
|
|
621
629
|
: `<span>${escapeHtml((provider?.name || "?").slice(0, 1).toUpperCase())}</span>`
|
|
622
630
|
return `<details class="provider${enabled ? "" : " is-off"}${failureClass}" data-provider-id="${escapeHtml(id)}" ${open ? "open" : ""}>
|
|
623
631
|
<summary>
|
package/ui/style.css
CHANGED
|
@@ -624,6 +624,17 @@ h2 { margin-bottom: 2px; font-size: 16px; letter-spacing: -.015em; }
|
|
|
624
624
|
height: 100%;
|
|
625
625
|
object-fit: contain;
|
|
626
626
|
}
|
|
627
|
+
.provider-icon-mask {
|
|
628
|
+
display: block;
|
|
629
|
+
width: 100%;
|
|
630
|
+
height: 100%;
|
|
631
|
+
background: var(--ink-2);
|
|
632
|
+
-webkit-mask: var(--provider-icon) center / contain no-repeat;
|
|
633
|
+
mask: var(--provider-icon) center / contain no-repeat;
|
|
634
|
+
}
|
|
635
|
+
.provider-icon-qoder { --provider-icon: url("provider-icons/qoder.svg"); }
|
|
636
|
+
.provider-icon-opencode { --provider-icon: url("provider-icons/opencode.svg"); }
|
|
637
|
+
.provider-icon-trae { --provider-icon: url("provider-icons/trae.svg"); }
|
|
627
638
|
.provider-title { flex: 1; min-width: 0; }
|
|
628
639
|
.provider-title strong { display: block; font-size: 13px; }
|
|
629
640
|
.provider-title small { display: block; margin-top: 2px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|