From 677939c333146111991d6ada5559c659772f95d4 Mon Sep 17 00:00:00 2001 From: cocobo1 Date: Sun, 12 Oct 2025 23:12:28 +0300 Subject: [PATCH] chore(bump) --- scripts/build.mjs | 2 +- .../ui/settings/pages/Plugins/models/bunny.ts | 79 +++++++++++-------- .../Plugins/sheets/PluginInfoActionSheet.tsx | 6 +- 3 files changed, 50 insertions(+), 37 deletions(-) diff --git a/scripts/build.mjs b/scripts/build.mjs index 2327899..787124c 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -74,7 +74,7 @@ const config = { constModules: { globals: { "bunny-build-info": { - version: `"v1.3.3"` + version: `"v1.3.4"` } } }, diff --git a/src/core/ui/settings/pages/Plugins/models/bunny.ts b/src/core/ui/settings/pages/Plugins/models/bunny.ts index 106be65..252e6ff 100644 --- a/src/core/ui/settings/pages/Plugins/models/bunny.ts +++ b/src/core/ui/settings/pages/Plugins/models/bunny.ts @@ -1,43 +1,52 @@ import { PupuIcon } from "@core/ui/settings"; -import { disablePlugin, enablePlugin, getPluginSettingsComponent, isPluginEnabled, pluginSettings } from "@lib/addons/plugins"; +import { + disablePlugin, + enablePlugin, + getPluginSettingsComponent, + isPluginEnabled, + pluginSettings, +} from "@lib/addons/plugins"; import { BunnyPluginManifest } from "@lib/addons/plugins/types"; import { useObservable } from "@lib/api/storage"; import { UnifiedPluginModel } from "."; -export default function unifyBunnyPlugin(manifest: BunnyPluginManifest): UnifiedPluginModel { - return { - id: manifest.id, - name: manifest.display.name, - description: manifest.display.description, - authors: manifest.display.authors, +export default function unifyBunnyPlugin( + manifest: BunnyPluginManifest, +): UnifiedPluginModel { + return { + id: manifest.id, + name: manifest.display.name, + description: manifest.display.description, + authors: manifest.display.authors, - getBadges() { - return [ - { source: { uri: PupuIcon } }, - // { source: findAssetId("CheckmarkLargeBoldIcon")! } - ]; - }, - isEnabled: () => isPluginEnabled(manifest.id), - isInstalled: () => manifest.id in pluginSettings, - usePluginState() { - useObservable([pluginSettings]); - }, - toggle(start: boolean) { - try { - start - ? enablePlugin(manifest.id, true) - : disablePlugin(manifest.id); - } catch (e) { - console.error(e); - // showToast("Failed to toggle plugin " + e, findAssetId("Small")); - } - }, - resolveSheetComponent() { - return import("../sheets/PluginInfoActionSheet"); - }, - getPluginSettingsComponent() { - return getPluginSettingsComponent(manifest.id); - }, - }; + getBadges() { + return [ + { source: { uri: PupuIcon } }, + // { source: findAssetId("CheckmarkLargeBoldIcon")! } + ]; + }, + isEnabled: () => isPluginEnabled(manifest.id), + isInstalled: () => manifest.id in pluginSettings, + usePluginState() { + useObservable([pluginSettings]); + }, + toggle(start: boolean) { + try { + start ? enablePlugin(manifest.id, true) : disablePlugin(manifest.id); + } catch (e) { + console.error(e); + // showToast("Failed to toggle plugin " + e, findAssetId("Small")); + } + }, + resolveSheetComponent() { + // Return a Promise resolving to the sheet component for interface consistency + return Promise.resolve({ + default: require("../sheets/PluginInfoActionSheet").default, + }); + }, + getPluginSettingsComponent() { + return getPluginSettingsComponent(manifest.id); + }, + }; } diff --git a/src/core/ui/settings/pages/Plugins/sheets/PluginInfoActionSheet.tsx b/src/core/ui/settings/pages/Plugins/sheets/PluginInfoActionSheet.tsx index e105640..670c0f7 100644 --- a/src/core/ui/settings/pages/Plugins/sheets/PluginInfoActionSheet.tsx +++ b/src/core/ui/settings/pages/Plugins/sheets/PluginInfoActionSheet.tsx @@ -151,7 +151,7 @@ export default function PluginInfoActionSheet({ justifyContent: "center", alignItems: "center", flexWrap: "wrap", - gap: 12, + gap: 22, paddingHorizontal: 4, }} > @@ -167,6 +167,7 @@ export default function PluginInfoActionSheet({ }); }} /> + {!isCorePlugin && ( + )} + {!isCorePlugin && ( + )}