chore(bump)

This commit is contained in:
cocobo1 2025-10-12 23:12:28 +03:00
parent 9af91ed1a2
commit 677939c333
3 changed files with 50 additions and 37 deletions

View file

@ -74,7 +74,7 @@ const config = {
constModules: {
globals: {
"bunny-build-info": {
version: `"v1.3.3"`
version: `"v1.3.4"`
}
}
},

View file

@ -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);
},
};
}

View file

@ -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 && (
<PluginInfoIconButton
label="Refetch"
variant="secondary"
@ -174,12 +175,15 @@ export default function PluginInfoActionSheet({
onPress={refetchPlugin}
disabled={loading}
/>
)}
{!isCorePlugin && (
<PluginInfoIconButton
label="Copy URL"
variant="secondary"
icon={findAssetId("LinkIcon")}
onPress={copyPluginUrl}
/>
)}
<PluginInfoIconButton
label="Clear Data"
variant="secondary"