We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6b63dba + c4ad276 commit 323d1b9Copy full SHA for 323d1b9
8 files changed
.eslintignore
@@ -4,3 +4,4 @@ public/missing-locales
4
public/images/custom
5
public/images/uicons
6
server/src/configs/
7
+packages/types/**/*.d.ts
packages/config/package.json
@@ -9,12 +9,12 @@
9
"check": "node ./lib/scripts/configCheck.js",
10
"sort": "npx sort-package-json",
11
"depCheck": "npx depcheck",
12
- "eslint:check": "eslint \"**/*.{js,jsx}\"",
13
- "eslint:fix": "eslint \"**/*.{js,jsx}\" --fix",
14
- "prettier:check": "prettier --check \"**/*.{css,html,js,jsx,yml}\"",
+ "lint": "eslint \"**/*.{js,jsx}\"",
+ "lint:fix": "eslint \"**/*.{js,jsx}\" --fix",
+ "prettier": "prettier --check \"**/*.{css,html,js,jsx,yml}\"",
15
"prettier:fix": "prettier --write \"**/*.{css,html,js,jsx,yml}\""
16
},
17
"dependencies": {
18
"config": "^3.3.9"
19
}
20
-}
+}
packages/locales/package.json
@@ -9,9 +9,9 @@
"missing": "node ./lib/missing.js",
@@ -20,4 +20,4 @@
"dotenv": "^16.3.1",
21
"openai": "^4.24.1"
22
23
packages/logger/package.json
@@ -6,14 +6,14 @@
"scripts": {
8
"@rm/config": "*",
"chalk": "^4",
"loglevel": "^1.8.1"
packages/masterfile/package.json
@@ -7,14 +7,14 @@
"generate": "node ./lib",
"@rm/logger": "*",
"@rm/types": "*"
packages/types/lib/config.d.ts
@@ -3,6 +3,7 @@ import config = require('server/src/configs/default.json')
3
import example = require('server/src/configs/local.example.json')
import type { Schema } from './server'
+import type { DialogProps } from '@mui/material'
type BaseConfig = typeof config
type ExampleConfig = typeof example
@@ -74,13 +75,14 @@ export interface Config<Client extends boolean = false>
74
75
messageOfTheDay: {
76
settings: {
77
parentStyle: Record<string, string> // should be CSS properties but performance seems to die
- } & BaseConfig['map']['messageOfTheDay']['settings']
78
+ } & Omit<BaseConfig['map']['messageOfTheDay']['settings'], 'parentStyle'>
79
titles: string[]
80
components: CustomComponent[]
81
footerButtons: CustomComponent[]
82
+ dialogMaxWidth: DialogProps['maxWidth']
83
} & Omit<
84
BaseConfig['map']['messageOfTheDay'],
- 'settings' | 'titles' | 'components' | 'footerButtons'
85
+ 'settings' | 'titles' | 'components' | 'footerButtons' | 'dialogMaxWidth'
86
>
87
donationPage: {
88
@@ -145,6 +147,7 @@ export interface Webhook {
145
147
146
148
149
export interface CustomComponent {
150
+ type?: string
151
components?: CustomComponent[]
152
donorOnly?: boolean
153
freeloaderOnly?: boolean
packages/types/package.json
@@ -6,13 +6,14 @@
"devDependencies": {
"@apollo/client": "^3.7.15",
+ "@mui/material": "^5.14.0",
"@sentry/node": "^7.48.0",
"@types/config": "^3.3.0",
"@types/node": "^20.5.1",
@@ -26,4 +27,4 @@
26
27
"passport-discord": "https://github.com/tonestrike/passport-discord.git",
28
"passport-oauth2": "^1.7.0"
29
30
src/components/layout/dialogs/Motd.jsx
@@ -14,12 +14,14 @@ import DialogWrapper from '../custom/DialogWrapper'
import CustomTile from '../custom/CustomTile'
import { Loading } from '../general/Loading'
-const DEFAULT = {
- settings: {},
- components: [],
- titles: [],
- footerButtons: [],
+const DEFAULT =
+ /** @type {import('@rm/types').Config['map']['messageOfTheDay']} */ ({
+ settings: {},
+ components: [],
+ titles: [],
+ footerButtons: [],
+ index: 0,
24
+ })
25
export default function MessageOfTheDay() {
const clientIndex = useStore((s) => s.motdIndex)
@@ -42,7 +44,7 @@ export default function MessageOfTheDay() {
42
44
43
45
const handleMotdClose = React.useCallback(() => {
46
if (motd.settings.permanent === false) {
- useStore.setState({ motdIndex: motd.settings.index })
47
+ useStore.setState({ motdIndex: motd.index })
48
49
useLayoutStore.setState({ motd: false })
50
}, [motd])
0 commit comments