diff --git a/plugins/plugin-admin/ui/app.js b/plugins/plugin-admin/ui/app.js index 030e8a1..089a0e6 100644 --- a/plugins/plugin-admin/ui/app.js +++ b/plugins/plugin-admin/ui/app.js @@ -42,6 +42,7 @@ const logout = async () => { try { await api('/logout', { method: 'POST' }) } catch (_) {} csrf = ''; setLoggedIn(null); $('#login-form').hidden = false; $('#twofa-form').hidden = true } const badge = (state) => `${escapeHtml(state || 'unknown')}` const escapeHtml = (value) => String(value == null ? '' : value).replace(/[&<>"']/g, (char) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[char])) + const normalizedVersion = (value) => String(value || '').trim().replace(/^v/, '') const marketplaceInstalled = (item) => { const installed = installedPlugins.get(String(item.plugin_id || '')) return !!(item.installed || installed) @@ -55,7 +56,7 @@ if (!items.length) { root.innerHTML = '
${escapeHtml(pluginId)} · v${escapeHtml(version)}
${escapeHtml(item.description || '由受控插件目录提供的 Business Plugin')}
` root.appendChild(card)