Skip to content

Commit

Permalink
Merge branch 'develop' into quick-pkmn-filters
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Jan 4, 2024
2 parents a1b1580 + 0f9f0f1 commit 8336ab9
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 30 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ public/missing-locales
public/images/custom
public/images/uicons
server/src/configs/
packages/types/**/*.d.ts
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# [1.28.0-develop.2](https://github.com/WatWowMap/ReactMap/compare/v1.28.0-develop.1...v1.28.0-develop.2) (2024-01-03)


### Bug Fixes

* motd index setter ([f68153a](https://github.com/WatWowMap/ReactMap/commit/f68153a141ec038d48e37945772bb8da85f26a28))
* motd types ([c4ad276](https://github.com/WatWowMap/ReactMap/commit/c4ad276f303357ac2c9b3698b7c6a07314d339c1))

# [1.28.0-develop.1](https://github.com/WatWowMap/ReactMap/compare/v1.27.2...v1.28.0-develop.1) (2024-01-02)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reactmap",
"version": "1.28.0-develop.1",
"version": "1.28.0-develop.2",
"private": true,
"description": "React based frontend map.",
"license": "MIT",
Expand Down
8 changes: 4 additions & 4 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"check": "node ./lib/scripts/configCheck.js",
"sort": "npx sort-package-json",
"depCheck": "npx depcheck",
"eslint:check": "eslint \"**/*.{js,jsx}\"",
"eslint:fix": "eslint \"**/*.{js,jsx}\" --fix",
"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}\"",
"prettier:fix": "prettier --write \"**/*.{css,html,js,jsx,yml}\""
},
"dependencies": {
"config": "^3.3.9"
}
}
}
8 changes: 4 additions & 4 deletions packages/locales/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"missing": "node ./lib/missing.js",
"sort": "npx sort-package-json",
"depCheck": "npx depcheck",
"eslint:check": "eslint \"**/*.{js,jsx}\"",
"eslint:fix": "eslint \"**/*.{js,jsx}\" --fix",
"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}\"",
"prettier:fix": "prettier --write \"**/*.{css,html,js,jsx,yml}\""
},
"dependencies": {
Expand All @@ -20,4 +20,4 @@
"dotenv": "^16.3.1",
"openai": "^4.24.1"
}
}
}
8 changes: 4 additions & 4 deletions packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"scripts": {
"sort": "npx sort-package-json",
"depCheck": "npx depcheck",
"eslint:check": "eslint \"**/*.{js,jsx}\"",
"eslint:fix": "eslint \"**/*.{js,jsx}\" --fix",
"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}\"",
"prettier:fix": "prettier --write \"**/*.{css,html,js,jsx,yml}\""
},
"dependencies": {
"@rm/config": "*",
"chalk": "^4",
"loglevel": "^1.8.1"
}
}
}
8 changes: 4 additions & 4 deletions packages/masterfile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
"generate": "node ./lib",
"sort": "npx sort-package-json",
"depCheck": "npx depcheck",
"eslint:check": "eslint \"**/*.{js,jsx}\"",
"eslint:fix": "eslint \"**/*.{js,jsx}\" --fix",
"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}\"",
"prettier:fix": "prettier --write \"**/*.{css,html,js,jsx,yml}\""
},
"dependencies": {
"@rm/config": "*",
"@rm/logger": "*",
"@rm/types": "*"
}
}
}
7 changes: 5 additions & 2 deletions packages/types/lib/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import config = require('server/src/configs/default.json')
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
Expand Down Expand Up @@ -74,13 +75,14 @@ export interface Config<Client extends boolean = false>
messageOfTheDay: {
settings: {
parentStyle: Record<string, string> // should be CSS properties but performance seems to die
} & BaseConfig['map']['messageOfTheDay']['settings']
} & Omit<BaseConfig['map']['messageOfTheDay']['settings'], 'parentStyle'>
titles: string[]
components: CustomComponent[]
footerButtons: CustomComponent[]
dialogMaxWidth: DialogProps['maxWidth']
} & Omit<
BaseConfig['map']['messageOfTheDay'],
'settings' | 'titles' | 'components' | 'footerButtons'
'settings' | 'titles' | 'components' | 'footerButtons' | 'dialogMaxWidth'
>
donationPage: {
settings: {
Expand Down Expand Up @@ -145,6 +147,7 @@ export interface Webhook {
}

export interface CustomComponent {
type?: string
components?: CustomComponent[]
donorOnly?: boolean
freeloaderOnly?: boolean
Expand Down
9 changes: 5 additions & 4 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
"scripts": {
"sort": "npx sort-package-json",
"depCheck": "npx depcheck",
"eslint:check": "eslint \"**/*.{js,jsx}\"",
"eslint:fix": "eslint \"**/*.{js,jsx}\" --fix",
"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}\"",
"prettier:fix": "prettier --write \"**/*.{css,html,js,jsx,yml}\""
},
"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",
Expand All @@ -26,4 +27,4 @@
"passport-discord": "https://github.com/tonestrike/passport-discord.git",
"passport-oauth2": "^1.7.0"
}
}
}
16 changes: 9 additions & 7 deletions src/components/layout/dialogs/Motd.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})

export default function MessageOfTheDay() {
const clientIndex = useStore((s) => s.motdIndex)
Expand All @@ -42,7 +44,7 @@ export default function MessageOfTheDay() {

const handleMotdClose = React.useCallback(() => {
if (motd.settings.permanent === false) {
useStore.setState({ motdIndex: motd.settings.index })
useStore.setState({ motdIndex: motd.index })
}
useLayoutStore.setState({ motd: false })
}, [motd])
Expand Down

0 comments on commit 8336ab9

Please sign in to comment.