diff --git a/src/lib/plugins/loader.ts b/src/lib/plugins/loader.ts index a86de830..c813e986 100644 --- a/src/lib/plugins/loader.ts +++ b/src/lib/plugins/loader.ts @@ -1,8 +1,14 @@ import { pluginRegistry } from "./registry"; import gamesPlugin from "@/plugins/games"; +import radioPlugin from "@/plugins/radio"; +import notificationsPlugin from "@/plugins/notifications"; +import moderationPlugin from "@/plugins/moderation"; pluginRegistry.register(gamesPlugin); +pluginRegistry.register(radioPlugin); +pluginRegistry.register(notificationsPlugin); +pluginRegistry.register(moderationPlugin); export function ensurePluginsLoaded(): void { - // Plugins loaded at import time + // Plugins registered at import time } diff --git a/src/plugins/moderation/index.ts b/src/plugins/moderation/index.ts new file mode 100644 index 00000000..f584b6d9 --- /dev/null +++ b/src/plugins/moderation/index.ts @@ -0,0 +1,32 @@ +import { Gavel } from "lucide-react"; +import type { PluginDefinition } from "@/lib/plugins"; + +const moderationPlugin: PluginDefinition = { + id: "moderation", + name: "Moderation Tools", + description: "CFH management, chat monitoring, word filter and sanction system", + version: "1.0.0", + enabled: true, + configFields: [ + { + key: "auto_assign_tickets", + label: "Auto-assign CFH tickets to online mods", + type: "boolean", + default: true, + }, + { + key: "max_tickets_per_user", + label: "Max open tickets per user", + type: "text", + default: "3", + }, + { + key: "log_chat", + label: "Log all public room chat", + type: "boolean", + default: true, + }, + ], +}; + +export default moderationPlugin; diff --git a/src/plugins/notifications/index.ts b/src/plugins/notifications/index.ts new file mode 100644 index 00000000..7776568b --- /dev/null +++ b/src/plugins/notifications/index.ts @@ -0,0 +1,32 @@ +import { Bell } from "lucide-react"; +import type { PluginDefinition } from "@/lib/plugins"; + +const notificationsPlugin: PluginDefinition = { + id: "notifications", + name: "Notifications", + description: "In-app notifications, push notifications and email alerts", + version: "1.0.0", + enabled: true, + configFields: [ + { + key: "retention_days", + label: "Notification retention (days)", + type: "text", + default: "30", + }, + { + key: "enable_push", + label: "Enable browser push notifications", + type: "boolean", + default: true, + }, + { + key: "enable_email", + label: "Enable email notifications", + type: "boolean", + default: false, + }, + ], +}; + +export default notificationsPlugin; diff --git a/src/plugins/radio/index.ts b/src/plugins/radio/index.ts new file mode 100644 index 00000000..378c648f --- /dev/null +++ b/src/plugins/radio/index.ts @@ -0,0 +1,37 @@ +import { Radio } from "lucide-react"; +import type { PluginDefinition } from "@/lib/plugins"; + +const radioPlugin: PluginDefinition = { + id: "radio", + name: "Radio", + description: "Radio stream, DJ tools, song requests and giveaways", + version: "1.0.0", + enabled: true, + configFields: [ + { + key: "auto_approve_djs", + label: "Auto-approve DJ applications", + type: "boolean", + default: false, + }, + { + key: "max_song_requests_per_user", + label: "Max song requests per user", + type: "text", + default: "3", + }, + { + key: "default_stream_format", + label: "Default stream format", + type: "select", + options: [ + { label: "MP3", value: "mp3" }, + { label: "AAC", value: "aac" }, + { label: "OGG", value: "ogg" }, + ], + default: "mp3", + }, + ], +}; + +export default radioPlugin;