Modules page: places held for Auction House Bot, NPC Enchanter and Playerbots with a Soon badge; module GitHub links from the catalog are allowed to open

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ДмитрийandClaude Sonnet 5.5 committed 2026-10-02 15:07:25 +05:00
1 parent 3b4cea7530
commit 31c08934ad
11 files changed
+76 -11

No files matched your search

+1 -1
View File
@@ -55,7 +55,7 @@ export {};
if(cmd==="realmlist_save"){const w=window as any;const rl=w.__rl;if(args.profileId){const p=rl.profiles.find((x: any)=>x.id===args.profileId);p.name=args.name;p.data=args.data;return p;}if(rl.profiles.some((x: any)=>x.name.toLowerCase()===String(args.name).toLowerCase()))throw {human:{code:"unknown",title:"",message:"",actions:[]},technical:"A realmlist with that name already exists."};const p={id:String(args.name).toLowerCase().replace(/[^a-z0-9]+/g,"-"),name:args.name,data:(/\s/.test(args.data.trim())?args.data.trim():"set realmlist "+args.data.trim())+"\r\n"};rl.profiles.push(p);return p;}
if(cmd==="realmlist_delete"){const rl=(window as any).__rl;rl.profiles=rl.profiles.filter((x: any)=>x.id!==args.profileId);return null;}
if(cmd==="account_delete") return null;
if(cmd==="modules_list") return [{id:"companions",name:"CoA Companions",description:{en:"Companion bots for groups, dungeons and your guild.",ru:"Боты-компаньоны для групп, подземелий и гильдии."},repo:"https://github.com/Corfirean/mod-coa-playerbots",installed:true,enabled:modState["companions"],switchable:true,status:"beta",icon:"bot",page:"bots"},{id:"content-scaling",name:"Content Scaling",description:{en:"Scales dungeons and raids to your group, with solo modes.",ru:"Подстраивает подземелья и рейды под вашу группу, есть соло-режимы."},repo:"https://github.com/Corfirean/mod-coa-content-scaling",installed:true,enabled:modState["content-scaling"],switchable:true,status:"early",icon:"scaling",page:null},{id:"tbc-content",name:"TBC Content",description:{en:"Outland dungeons and raids, scaled to your level range.",ru:"Подземелья и рейды Запределья, подогнанные под ваши уровни."},repo:"https://github.com/Corfirean/mod-coa-content-scaling/tree/main/content-packs/mod-coa-tbc-content",installed:true,enabled:modState["tbc-content"],switchable:true,status:"early",icon:"tbc",page:null},{id:"wotlk-content",name:"WotLK Content",description:{en:"Northrend dungeons and raids, scaled to your level range.",ru:"Подземелья и рейды Нордскола, подогнанные под ваши уровни."},repo:"https://github.com/Corfirean/mod-coa-content-scaling/tree/main/content-packs/mod-coa-wotlk-content",installed:true,enabled:modState["wotlk-content"],switchable:true,status:"early",icon:"wotlk",page:null},{id:"client-compat",name:"Client compatibility",description:{en:"Client-server link and appearance unlocks.",ru:"Связь клиента с сервером и разблокировка внешних видов."},repo:"https://github.com/Corfirean/azerothcore-wotlk-coa",installed:true,enabled:modState["client-compat"],switchable:false,status:"release",icon:"plug",page:null,hidden:true}];
if(cmd==="modules_list") return [{id:"companions",name:"CoA Companions",description:{en:"Companion bots for groups, dungeons and your guild.",ru:"Боты-компаньоны для групп, подземелий и гильдии."},repo:"https://github.com/Corfirean/mod-coa-playerbots",installed:true,enabled:modState["companions"],switchable:true,status:"beta",icon:"bot",page:"bots"},{id:"content-scaling",name:"Content Scaling",description:{en:"Scales dungeons and raids to your group, with solo modes.",ru:"Подстраивает подземелья и рейды под вашу группу, есть соло-режимы."},repo:"https://github.com/Corfirean/mod-coa-content-scaling",installed:true,enabled:modState["content-scaling"],switchable:true,status:"early",icon:"scaling",page:null},{id:"tbc-content",name:"TBC Content",description:{en:"Outland dungeons and raids, scaled to your level range.",ru:"Подземелья и рейды Запределья, подогнанные под ваши уровни."},repo:"https://github.com/Corfirean/mod-coa-content-scaling/tree/main/content-packs/mod-coa-tbc-content",installed:true,enabled:modState["tbc-content"],switchable:true,status:"early",icon:"tbc",page:null},{id:"wotlk-content",name:"WotLK Content",description:{en:"Northrend dungeons and raids, scaled to your level range.",ru:"Подземелья и рейды Нордскола, подогнанные под ваши уровни."},repo:"https://github.com/Corfirean/mod-coa-content-scaling/tree/main/content-packs/mod-coa-wotlk-content",installed:true,enabled:modState["wotlk-content"],switchable:true,status:"early",icon:"wotlk",page:null},{id:"ah-bot",name:"Auction House Bot",description:{en:"Fills the auction house with realistic, adjustable listings.",ru:"Наполняет аукцион реалистичными настраиваемыми лотами."},repo:"https://github.com/NathanHandley/mod-ah-bot-plus",installed:false,enabled:false,switchable:false,status:"soon",icon:"gavel",page:null,hidden:false},{id:"npc-enchanter",name:"NPC Enchanter",description:{en:"An NPC that enchants your gear for you.",ru:"НПС, который зачаровывает ваше снаряжение."},repo:"https://github.com/azerothcore/mod-npc-enchanter",installed:false,enabled:false,switchable:false,status:"soon",icon:"sparkles",page:null,hidden:false},{id:"playerbots",name:"Playerbots",description:{en:"An alternative bot system with random bots and full AI.",ru:"Альтернативная система ботов со случайными ботами и полным ИИ."},repo:"https://github.com/Zyth45/mod-playerbots",installed:false,enabled:false,switchable:false,status:"soon",icon:"swords",page:null,hidden:false},{id:"client-compat",name:"Client compatibility",description:{en:"Client-server link and appearance unlocks.",ru:"Связь клиента с сервером и разблокировка внешних видов."},repo:"https://github.com/Corfirean/azerothcore-wotlk-coa",installed:true,enabled:modState["client-compat"],switchable:false,status:"release",icon:"plug",page:null,hidden:true}];
if(cmd==="module_set_enabled"){ modState[args.module]=args.enabled; return null; }
if(cmd==="all_settings") return [{key:"Rate.Drop.Item.Epic",value:"3",default:"1",doc:"Description: Drop rates for money and items based on quality. Default: 1",changed:true},{key:"Instance.ResetTimeHour",value:"4",default:"4",doc:"Description: Hour of the day when the global instance reset occurs. Range: 0-23 Default: 4 - (04:00 AM)",changed:false},{key:"PlayerLimit",value:"1000",default:"1000",doc:"Description: Maximum number of players in the world.",changed:false}];
if(cmd==="all_settings_save") return Object.keys(args&&args.changes||{});
+2
View File
@@ -766,6 +766,8 @@ const de: Partial<Record<keyof typeof en, string>> = {
"col.companions.text": "Deine Reittiere und Begleiter werden dauerhaft gelernt.",
"col.riding": "Maximales Reiten ab dem ersten Login",
"col.riding.text": "Alle Reitstufen und Kaltwetterflug, schon auf Stufe 1.",
"mod.status.soon": "Bald",
"mod.hint.soon": "Geplant: noch nicht verfügbar.",
};
export default de;
+2
View File
@@ -766,6 +766,8 @@ const en = {
"col.companions.text": "Mounts and companions you own are learned for good.",
"col.riding": "Maximum riding from the first login",
"col.riding.text": "All riding ranks and Cold Weather Flying, even at level 1.",
"mod.status.soon": "Soon",
"mod.hint.soon": "Planned: not available yet.",
} as const;
export default en;
+2
View File
@@ -766,6 +766,8 @@ const es: Partial<Record<keyof typeof en, string>> = {
"col.companions.text": "Tus monturas y mascotas se aprenden para siempre.",
"col.riding": "Equitación máxima desde el primer inicio",
"col.riding.text": "Todos los rangos de equitación y vuelo en clima frío, desde el nivel 1.",
"mod.status.soon": "Pronto",
"mod.hint.soon": "Previsto: aún no disponible.",
};
export default es;
+2
View File
@@ -766,6 +766,8 @@ const fr: Partial<Record<keyof typeof en, string>> = {
"col.companions.text": "Vos montures et compagnons sont appris définitivement.",
"col.riding": "Monte maximale dès la première connexion",
"col.riding.text": "Tous les rangs de monte et le vol par temps froid, dès le niveau 1.",
"mod.status.soon": "Bientôt",
"mod.hint.soon": "Prévu : pas encore disponible.",
};
export default fr;
+2
View File
@@ -766,6 +766,8 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"col.companions.text": "Ваши скакуны и спутники изучаются навсегда.",
"col.riding": "Максимальная верховая езда с первого входа",
"col.riding.text": "Все ранги верховой езды и полёт в холодных краях даже на 1 уровне.",
"mod.status.soon": "Скоро",
"mod.hint.soon": "В планах: пока недоступен.",
};
export default ru;
+2 -2
View File
@@ -186,8 +186,8 @@ export interface ModuleView {
enabled: boolean;
/** can be turned on and off (a part the game client needs is only configured) */
switchable: boolean;
/** early (experimental), beta (still being tested) or release (stable) */
status: "early" | "beta" | "release";
/** soon (planned, not available yet), early (experimental), beta (still being tested) or release (stable) */
status: "soon" | "early" | "beta" | "release";
icon: string;
/** a page of the Manager that is hidden while the module is off */
page: string | null;
+8 -4
View File
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useState, type ComponentType } from "react";
import { Bot, Flame, Loader2, Plug, Puzzle, Scaling, Settings2, Snowflake, type LucideProps } from "lucide-react";
import { Bot, Flame, Gavel, Loader2, Plug, Puzzle, Scaling, Settings2, Snowflake, Sparkles, Swords, type LucideProps } from "lucide-react";
import { api, asUiError, type ModuleSetting, type ModuleView, type UiError } from "@/lib/api";
import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
@@ -22,10 +22,14 @@ const TILES: Record<string, { icon: ComponentType<LucideProps>; from: string; to
plug: { icon: Plug, from: "from-amber-500", to: "to-orange-700" },
tbc: { icon: Flame, from: "from-lime-500", to: "to-emerald-800" },
wotlk: { icon: Snowflake, from: "from-sky-400", to: "to-blue-700" },
gavel: { icon: Gavel, from: "from-yellow-500", to: "to-amber-700" },
sparkles: { icon: Sparkles, from: "from-fuchsia-500", to: "to-purple-700" },
swords: { icon: Swords, from: "from-rose-500", to: "to-red-800" },
};
const DEFAULT_TILE = { icon: Puzzle, from: "from-slate-500", to: "to-slate-700" };
const STATUS: Record<string, { label: Key; hint: Key; tone: string }> = {
soon: { label: "mod.status.soon", hint: "mod.hint.soon", tone: "border-violet-400/50 bg-violet-400/10 text-violet-300" },
early: { label: "mod.status.early", hint: "mod.hint.early", tone: "border-warn/50 bg-warn/10 text-warn" },
beta: { label: "mod.status.beta", hint: "mod.hint.beta", tone: "border-sky-400/50 bg-sky-400/10 text-sky-300" },
release: { label: "mod.status.release", hint: "mod.hint.release", tone: "border-ok/50 bg-ok/10 text-ok" },
@@ -101,7 +105,7 @@ export function ModulesPage({ serverId, onChanged }: { serverId: string; onChang
<p className="mt-3 text-sm text-muted">{t("mod.intro")}</p>
<div className="mt-3 flex flex-wrap items-center gap-x-4 gap-y-2 text-xs text-muted" aria-label={t("mod.legend")}>
{(["early", "beta", "release"] as const).map((s) => (
{(["soon", "early", "beta", "release"] as const).map((s) => (
<span key={s} className="flex items-center gap-2">
<StatusBadge status={s} />
{t(STATUS[s].hint)}
@@ -116,7 +120,7 @@ export function ModulesPage({ serverId, onChanged }: { serverId: string; onChang
{modules === null && !error && <p className="text-muted">{t("overview.checking")}</p>}
{modules?.length === 0 && <Card className="p-6 text-center text-muted sm:col-span-2">{t("mod.empty")}</Card>}
{modules?.map((m) => (
<Card key={m.id} className={cn("flex flex-col gap-4 p-5 transition-colors", !m.installed && "opacity-60", open === m.id && "border-gold/50")}>
<Card key={m.id} className={cn("flex flex-col gap-4 p-5 transition-colors", !m.installed && "opacity-60", open === m.id && "border-gold/50")} aria-label={m.status === "soon" ? `${m.name}: ${t("mod.status.soon")}` : undefined}>
<div className="flex items-start gap-4">
<Tile icon={m.icon} off={!m.enabled || !m.installed} />
<div className="min-w-0 flex-1">
@@ -138,7 +142,7 @@ export function ModulesPage({ serverId, onChanged }: { serverId: string; onChang
</button>
)}
{m.installed && !m.switchable && <span className="mt-1.5 shrink-0 text-xs text-muted">{t("mod.alwaysOn")}</span>}
{!m.installed && <span className="mt-1.5 shrink-0 text-xs text-muted">{t("mod.notHere")}</span>}
{!m.installed && m.status !== "soon" && <span className="mt-1.5 shrink-0 text-xs text-muted">{t("mod.notHere")}</span>}
</div>
<div className="mt-auto flex items-center gap-2">
<button