add tui framework but not finish, reconstruct accesscontrol

This commit is contained in:
2025-10-10 13:20:00 +08:00
parent 1fb26cfb71
commit 57e7868c30
11 changed files with 960 additions and 156 deletions

View File

@@ -16,28 +16,32 @@ interface UserGroupConfig {
isAllowed: boolean;
isNotice: boolean;
groupUsers: string[];
toastConfig?: ToastConfig;
}
interface AccessConfig {
detectInterval: number;
warnInterval: number;
watchInterval: number;
noticeTimes: number;
detectRange: number;
isWarn: boolean;
adminGroupConfig: UserGroupConfig;
defaultToastConfig: ToastConfig;
welcomeToastConfig: ToastConfig;
warnToastConfig: ToastConfig;
noticeToastConfig: ToastConfig;
usersGroups: UserGroupConfig[];
}
const defaultConfig: AccessConfig = {
detectRange: 64,
detectInterval: 3,
warnInterval: 7,
detectRange: 256,
detectInterval: 1,
watchInterval: 10,
noticeTimes: 2,
isWarn: false,
adminGroupConfig: {
groupName: "Admin",
groupUsers: ["Selcon"],
isAllowed: true,
isNotice: false,
isNotice: true,
},
usersGroups: [
{
@@ -57,19 +61,22 @@ const defaultConfig: AccessConfig = {
groupUsers: [],
isAllowed: false,
isNotice: false,
toastConfig: {
title: {
text: "Warn",
color: "red",
},
msg: {
text: "Warn %playerName%",
color: "red",
},
},
},
],
defaultToastConfig: {
welcomeToastConfig: {
title: {
text: "Welcome",
color: "green",
},
msg: {
text: "Hello User %playerName%",
color: "green",
},
prefix: "Taohuayuan",
brackets: "[]",
bracketColor: "",
},
noticeToastConfig: {
title: {
text: "Welcome",
color: "green",