Add Radio, Notifications, Moderation plugins with config UI
Local Build and Deploy / deploy (push) Successful in 1m15s
Local Build and Deploy / deploy (push) Successful in 1m15s
Plugins page now shows 4 toggleable plugins with config forms: - Games: in-game mini-game management - Radio: stream, DJ, song requests with auto-approve/song-limit config - Notifications: in-app/push/email with retention config - Moderation Tools: CFH, chat log, ticket config
This commit is contained in:
1 parent
83f4585167
commit
90cebad68d
4 files changed
+108
-1
No files matched your search
@@ -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
|
||||
}
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
Reference in new issue
Block a user