chore(history): squash 16 commit(s) from 2026-09-26
- chore(backend): sync Cargo.lock with gateway dev-dependency - feat(frontend): ClickGui replica matching the in-game GUI — category panels, Modules/Settings switch, theme cards - feat(frontend): floating glass top bar in the mod's UI language - fix(frontend): soft night backdrop for the ClickGui, editor that fits one screen - chore(frontend): replace em dashes in UI copy with lighter separators - refactor(frontend): split landing sections and theme editor into subfolders (4-files-per-folder rule) - feat(frontend): login and registration in the mod's glass panel style - feat(frontend): link the game with a device code - feat(frontend): account page with avatar upload and linked games - feat(frontend): my configs with share codes and publishing - feat(frontend): public showcase listing and detail pages - chore(frontend): drop em dashes from visible copy - feat(frontend): atmospheric backdrop, glass download block and ClickGui-style FAQ on the landing - feat(frontend): Konami code, DevTools console greeting and ASCII 404 block - feat: public player profiles at /u/:id and author link in the showcase - fix(frontend): stop the theme editor overflowing horizontally at 375px
This commit is contained in:
parent
7f4b532f99
commit
ff2edc8eb6
116 changed files with 3534 additions and 1020 deletions
56
frontend/src/features/clickgui/screens/ModulesScreen.tsx
Normal file
56
frontend/src/features/clickgui/screens/ModulesScreen.tsx
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
import type { Dispatch } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import type { GuiAction, GuiState } from '../demo'
|
||||
import { Icon } from '../parts/Glyphs'
|
||||
import { type Category, CATEGORIES } from '../parts/modules'
|
||||
|
||||
type Props = { state: GuiState; dispatch: Dispatch<GuiAction> }
|
||||
|
||||
/** `ModulesMenuScreen`: the four liquid-glass category panels, side by side. */
|
||||
export function ModulesScreen({ state, dispatch }: Props) {
|
||||
const { t } = useTranslation('clickgui')
|
||||
return (
|
||||
<div className="lv-gui-panels" role="list" aria-label={t('categories')}>
|
||||
{CATEGORIES.map((c) => (
|
||||
<Panel key={c.id} category={c} state={state} dispatch={dispatch} />
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function Panel({ category, state, dispatch }: { category: Category } & Props) {
|
||||
const { t } = useTranslation('clickgui')
|
||||
const titleId = `lv-gui-panel-${category.id}`
|
||||
return (
|
||||
<section role="listitem" className="lv-gui-panel" data-category={category.id} aria-labelledby={titleId}>
|
||||
<header className="lv-gui-panel-head">
|
||||
<h3 id={titleId} className="lv-gui-panel-title">
|
||||
{category.name}
|
||||
</h3>
|
||||
<Icon name={category.id} className="lv-gui-panel-icon" />
|
||||
</header>
|
||||
<ul className="lv-gui-rows">
|
||||
{category.modules.map((m) => {
|
||||
const on = Boolean(state.enabled[m.name])
|
||||
return (
|
||||
<li key={m.name}>
|
||||
<button
|
||||
type="button"
|
||||
className="lv-gui-row"
|
||||
data-on={on}
|
||||
data-demo={`module:${m.name}`}
|
||||
aria-pressed={on}
|
||||
title={t('module', { name: m.name })}
|
||||
onClick={() => dispatch({ type: 'toggle', module: m.name })}
|
||||
onContextMenu={(e) => e.preventDefault()}
|
||||
>
|
||||
<span className="lv-gui-row-name">{m.name}</span>
|
||||
{on && <Icon name="check" className="lv-gui-row-check" />}
|
||||
</button>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
</ul>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue