fix: resolve NPM access list name on page load instead of showing ID

This commit is contained in:
2026-04-05 12:56:47 +03:00
parent 7550fe9e32
commit feec97fe9e
+10 -1
View File
@@ -168,6 +168,15 @@
} catch { sslCertName = `Certificate #${sslCertificateId}`; }
}
async function resolveAccessListName() {
if (accessListId <= 0) return;
try {
const lists = await listNpmAccessLists();
const match = lists.find((al) => al.id === accessListId);
accessListName = match ? match.name : `Access List #${accessListId}`;
} catch { accessListName = `Access List #${accessListId}`; }
}
async function handleNpmRemoteChange() {
try {
await updateSettings({ npm_remote: npmRemote } as any);
@@ -179,7 +188,7 @@
async function init() {
await loadData();
await resolveCertName();
await Promise.all([resolveCertName(), resolveAccessListName()]);
}
$effect(() => { init(); });
</script>