mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
feat: add beta tag to global search plugin
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
pluginId: string;
|
||||
name: string;
|
||||
description: string;
|
||||
beta?: boolean;
|
||||
settings: Record<string, SettingType>;
|
||||
}
|
||||
|
||||
@@ -194,7 +195,14 @@
|
||||
{#if (plugin as any).disableToggle}
|
||||
<div class="flex justify-between items-center px-4 py-3">
|
||||
<div class="pr-4">
|
||||
<h2 class="text-sm font-bold">Enable {plugin.name}</h2>
|
||||
<h2 class="text-sm font-bold flex items-center gap-2">
|
||||
Enable {plugin.name}
|
||||
{#if plugin.beta}
|
||||
<span class="px-2 py-0.5 text-xs font-medium bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300 rounded-full">
|
||||
Beta
|
||||
</span>
|
||||
{/if}
|
||||
</h2>
|
||||
<p class="text-xs">{plugin.description}</p>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -93,6 +93,7 @@ const globalSearchPlugin: Plugin<typeof settings> = {
|
||||
settings: settingsInstance.settings,
|
||||
disableToggle: true,
|
||||
defaultEnabled: false,
|
||||
beta: true,
|
||||
styles: styles,
|
||||
|
||||
run: async (api) => {
|
||||
|
||||
@@ -31,6 +31,7 @@ const testPlugin: Plugin<typeof settings> = {
|
||||
version: "1.0.0",
|
||||
settings: settingsInstance.settings,
|
||||
disableToggle: true,
|
||||
beta: true,
|
||||
|
||||
run: async (api) => {
|
||||
console.log("Test plugin running");
|
||||
|
||||
@@ -182,6 +182,7 @@ export class PluginManager {
|
||||
pluginId: string;
|
||||
name: string;
|
||||
description: string;
|
||||
beta?: boolean;
|
||||
settings: {
|
||||
[key: string]:
|
||||
| (Omit<BooleanSetting, "type"> & { type: "boolean"; id: string })
|
||||
@@ -235,6 +236,7 @@ export class PluginManager {
|
||||
pluginId: id,
|
||||
name: plugin.name,
|
||||
description: plugin.description,
|
||||
beta: plugin.beta,
|
||||
settings: Object.fromEntries(settingsEntries),
|
||||
disableToggle: plugin.disableToggle,
|
||||
};
|
||||
|
||||
@@ -132,6 +132,7 @@ export interface Plugin<T extends PluginSettings = PluginSettings, S = any> {
|
||||
styles?: string; // Optional CSS styles for the plugin
|
||||
disableToggle?: boolean; // Optional flag to show/hide the plugin's enable/disable toggle in settings
|
||||
defaultEnabled?: boolean; // Optional flag to set the plugin's default enabled state
|
||||
beta?: boolean; // Optional flag to mark the plugin as beta
|
||||
run: (
|
||||
api: PluginAPI<T, S>,
|
||||
) => void | Promise<void> | (() => void) | Promise<() => void>;
|
||||
|
||||
Reference in New Issue
Block a user