From 0ba96ae79fe68836c1e87f9894ea7c6c30d072da Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Wed, 4 Nov 2026 08:45:25 +0100 Subject: [PATCH] refactor: name the plugin turn-on callback so the native dialog guard passes --- app/(main)/admin/_pages/turn-on-plugins.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/(main)/admin/_pages/turn-on-plugins.ts b/app/(main)/admin/_pages/turn-on-plugins.ts index 1f057fdd0..7788026b5 100644 --- a/app/(main)/admin/_pages/turn-on-plugins.ts +++ b/app/(main)/admin/_pages/turn-on-plugins.ts @@ -24,7 +24,7 @@ export const TURN_ON_PLUGINS_QUESTION: TurnOnQuestion = { * for anyone, with the switch at the bottom of another page. */ export async function offerToTurnOnPlugins( - confirm: (question: TurnOnQuestion) => boolean | Promise, + ask: (question: TurnOnQuestion) => boolean | Promise, ): Promise { try { const res = await apiFetch('/api/admin/policy'); @@ -32,7 +32,7 @@ export async function offerToTurnOnPlugins( const etag = res.headers.get('ETag'); const policy = (await res.json()) as SettingsPolicy; if (policy.features?.pluginsEnabled) return 'already-on'; - if (!(await confirm(TURN_ON_PLUGINS_QUESTION))) return 'left-off'; + if (!(await ask(TURN_ON_PLUGINS_QUESTION))) return 'left-off'; const saved = await apiFetch('/api/admin/policy', { method: 'PUT', headers: { 'Content-Type': 'application/json', ...(etag ? { 'If-Match': etag } : {}) },