diff --git a/src/admin/games/views/html/games.page.tsx b/src/admin/games/views/html/games.page.tsx index 7925dcf8..ff7e0361 100644 --- a/src/admin/games/views/html/games.page.tsx +++ b/src/admin/games/views/html/games.page.tsx @@ -1,8 +1,8 @@ import type { User } from '../../../../auth/types/user' import { configuration } from '../../../../configuration' -import { IconDeviceFloppy } from '../../../../html/components/icons' import { LogsTfUploadMethod } from '../../../../shared/types/logs-tf-upload-method' import { Admin } from '../../../views/html/admin' +import { SaveButton } from '../../../views/html/save-button' export async function GamesPage(props: { user: User }) { const whitelistId = await configuration.get('games.whitelist_id') @@ -14,7 +14,7 @@ export async function GamesPage(props: { user: User }) { return (
-
+
@@ -45,7 +45,7 @@ export async function GamesPage(props: { user: User }) { /> seconds
- + The time a player has to join the gameserver before they are getting subbed automatically. Use 0 to disable. @@ -67,7 +67,7 @@ export async function GamesPage(props: { user: User }) { /> seconds
- + The time a player has to come back to the gameserver after they go offline during the match. Use 0 to disable. @@ -82,7 +82,7 @@ export async function GamesPage(props: { user: User }) { - + Extra commands to execute on the gameserver before the match starts. One command per line. @@ -113,14 +113,11 @@ export async function GamesPage(props: { user: User }) { - -

- -

+

+ +

+
) diff --git a/src/admin/map-pool/views/html/map-pool.page.tsx b/src/admin/map-pool/views/html/map-pool.page.tsx index 9d2f882d..e34a5b09 100644 --- a/src/admin/map-pool/views/html/map-pool.page.tsx +++ b/src/admin/map-pool/views/html/map-pool.page.tsx @@ -1,7 +1,8 @@ import type { User } from '../../../../auth/types/user' -import { IconDeviceFloppy, IconMinus, IconPlus } from '../../../../html/components/icons' +import { IconMinus, IconPlus } from '../../../../html/components/icons' import { mapPool } from '../../../../queue/map-pool' import { Admin } from '../../../views/html/admin' +import { SaveButton } from '../../../views/html/save-button' export async function MapPoolPage(props: { user: User }) { const maps = await mapPool.get() @@ -35,14 +36,14 @@ export async function MapPoolPage(props: { user: User }) { Add map - -

- -

+

+ Making changes to the map pool will scramble the maps automatically. +

+

+ +

+ ) diff --git a/src/admin/player-restrictions/views/html/player-restrictions.page.tsx b/src/admin/player-restrictions/views/html/player-restrictions.page.tsx index fa26487a..102e0033 100644 --- a/src/admin/player-restrictions/views/html/player-restrictions.page.tsx +++ b/src/admin/player-restrictions/views/html/player-restrictions.page.tsx @@ -2,6 +2,7 @@ import type { User } from '../../../../auth/types/user' import { configuration } from '../../../../configuration' import { Switch } from '../../../../html/components/switch' import { Admin } from '../../../views/html/admin' +import { SaveButton } from '../../../views/html/save-button' export async function PlayerRestrictionsPage(props: { user: User }) { const etf2lAccountRequired = await configuration.get('players.etf2l_account_required') @@ -13,8 +14,8 @@ export async function PlayerRestrictionsPage(props: { user: User }) { return (
-
-
+
+
- Players that do not have an ETF2L profile will not be able to register + + + All players will be able to register +
@@ -47,7 +53,7 @@ export async function PlayerRestrictionsPage(props: { user: User }) { -
+
- Players that have no skill assigned will be able to join the queue and the default - skill will be used for them when launching a game + + + Players that have no skill assigned will be able to join the queue and the default + skill will be used for them when launching a game +
@@ -66,11 +77,11 @@ export async function PlayerRestrictionsPage(props: { user: User }) { name="denyPlayersWithNoSkillAssigned" />
-
- +

+ +

+
) diff --git a/src/admin/view-for-nerds/index.ts b/src/admin/view-for-nerds/index.ts index 950c78de..c1ae1363 100644 --- a/src/admin/view-for-nerds/index.ts +++ b/src/admin/view-for-nerds/index.ts @@ -55,7 +55,7 @@ export default fp( authorize: [PlayerRole.admin], }, schema: { - body: z.object({ + querystring: z.object({ key: z.custom(v => configurationSchema.options.find( option => option._def.shape().key._def.value === v, @@ -65,7 +65,7 @@ export default fp( }, }, async (request, reply) => { - const { key } = request.body + const { key } = request.query const value = await configuration.reset(key) const defaultValue = configuration.getDefault(key) reply.html(await ConfigurationEntryEdit({ _key: key, value, defaultValue })) diff --git a/src/admin/view-for-nerds/views/html/view-for-nerds.page.tsx b/src/admin/view-for-nerds/views/html/view-for-nerds.page.tsx index 8cabf1af..737c5d06 100644 --- a/src/admin/view-for-nerds/views/html/view-for-nerds.page.tsx +++ b/src/admin/view-for-nerds/views/html/view-for-nerds.page.tsx @@ -51,12 +51,13 @@ export function ConfigurationEntryEdit(props: { if (!isDefault) { resetButton = ( + ) +} diff --git a/src/admin/voice-server/views/html/voice-server.page.tsx b/src/admin/voice-server/views/html/voice-server.page.tsx index 70db1cfe..e0c89d18 100644 --- a/src/admin/voice-server/views/html/voice-server.page.tsx +++ b/src/admin/voice-server/views/html/voice-server.page.tsx @@ -1,8 +1,8 @@ import type { User } from '../../../../auth/types/user' import { configuration } from '../../../../configuration' -import { IconDeviceFloppy } from '../../../../html/components/icons' import { VoiceServerType } from '../../../../shared/types/voice-server-type' import { Admin } from '../../../views/html/admin' +import { SaveButton } from '../../../views/html/save-button' export async function VoiceServerPage(props: { user: User }) { const type = await configuration.get('games.voice_server_type') @@ -133,14 +133,11 @@ export async function VoiceServerPage(props: { user: User }) { -
-

- -

+

+ +

+
) diff --git a/src/html/components/admin-panel.tsx b/src/html/components/admin-panel.tsx index 2896021a..1d618bcc 100644 --- a/src/html/components/admin-panel.tsx +++ b/src/html/components/admin-panel.tsx @@ -25,13 +25,13 @@ export function AdminPanelBody(props?: { children?: Children }) { } export function AdminPanelHeader(props?: { children?: Children }) { - return

{props?.children}

+ return

{props?.children}

} export function AdminPanelContent(props?: { children?: Children }) { - return
{props?.children}
+ return
{props?.children}
} export function AdminPanelGroup(props?: { children?: Children }) { - return
{props?.children}
+ return
{props?.children}
} diff --git a/src/html/components/switch.tsx b/src/html/components/switch.tsx index 2a232c0c..f27e8000 100644 --- a/src/html/components/switch.tsx +++ b/src/html/components/switch.tsx @@ -6,7 +6,7 @@ export function Switch(props: JSX.HtmlInputTag) {
- + )