From 6a6f7712c1f0fa1b381a1813bc49d8f41ddd1ab1 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Tue, 15 Sep 2026 20:57:58 +0800 Subject: [PATCH] feat(plugins): report install beacon after successful installs --- .../plugins/PluginContributionsPanel.vue | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/apps/desktop/src/components/plugins/PluginContributionsPanel.vue b/apps/desktop/src/components/plugins/PluginContributionsPanel.vue index df403fe9c1..8011b14909 100644 --- a/apps/desktop/src/components/plugins/PluginContributionsPanel.vue +++ b/apps/desktop/src/components/plugins/PluginContributionsPanel.vue @@ -349,7 +349,24 @@ async function handleWebPackage(event: Event) { if (file) await installPlugin(file); } +// Fire-and-forget install beacon for the marketplace stats worker +// (deploy/plugin-stats-worker, POST dbxio.com/api/plugins/install). +// Decorative counters only: no auth, no PII, failures are never surfaced. +function reportInstallBeacon(result: PluginInstallResult) { + try { + void fetch("https://dbxio.com/api/plugins/install", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ id: result.plugin.manifest.id, version: result.plugin.manifest.version }), + keepalive: true, + }).catch(() => {}); + } catch { + // stats only — ignore beacon failures + } +} + async function finishInstall(result: PluginInstallResult) { + reportInstallBeacon(result); toast(t("pluginPlatform.installSuccess", { name: result.plugin.manifest.name, version: result.plugin.manifest.version })); clearPluginIconCache(); installedPlugins.value = await api.listPlugins();