Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore artifacts:
build
coverage
.gitkeep
14 changes: 14 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxSingleQuote": false,
"printWidth": 120,
"proseWrap": "always",
"quoteProps": "as-needed",
"semi": true,
"singleQuote": false,
"tabWidth": 4,
"trailingComma": "all",
"useTabs": false
}
18 changes: 17 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"lint": "eslint src/",
"lint:fix": "eslint src/ --fix",
"prettier:check": "prettier --check src/**/*",
"prettier:write": "prettier --write src/**/*",
"check:react-compiler": "node tools/check-react-compiler.mjs"
},
"dependencies": {
Expand Down Expand Up @@ -56,6 +59,7 @@
"eslint": "^9.39.2",
"eslint-plugin-react-compiler": "^19.1.0-rc.2",
"playwright": "^1.58.2",
"prettier": "3.8.4",
"storybook": "^10.2.8",
"typescript": "~5.8.3",
"typescript-eslint": "^8.55.0",
Expand Down
78 changes: 47 additions & 31 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,53 @@ function App() {
<Route path="/ipc-permission" element={<IpcPermissionPage />} />

{/* Main launcher window */}
<Route path="/*" element={
<CssVarsProvider defaultMode="dark" modeStorageKey="pudu-color-mode" theme={themeRegistry[themeId]}>
<CssBaseline />
<GlobalStyles styles={themeScrollbarRegistry[themeId]} />
<FeedbackContextProvider>
<UpdateContextProvider>
<IpcContextProvider>
<DiscordJoinContextProvider>
<ServersContextProvider>
<TtsStateContextProvider>
<TtsInstallerContextProvider>
<OnboardingContextProvider>
<Routes>
<Route element={<SideBarLayout />}>
<Route path="/" element={<ServersPage />} />
<Route path="/installations" element={<InstallationsPage />} />
<Route path="/news" element={<NewsPage />} />
<Route path="/preferences" element={<PreferencesPage />} />
<Route path="*" element={<WorkInProgressLayout />} />
</Route>
</Routes>
</OnboardingContextProvider>
</TtsInstallerContextProvider>
</TtsStateContextProvider>
</ServersContextProvider>
</DiscordJoinContextProvider>
</IpcContextProvider>
</UpdateContextProvider>
</FeedbackContextProvider>
</CssVarsProvider>
} />
<Route
path="/*"
element={
<CssVarsProvider
defaultMode="dark"
modeStorageKey="pudu-color-mode"
theme={themeRegistry[themeId]}
>
<CssBaseline />
<GlobalStyles styles={themeScrollbarRegistry[themeId]} />
<FeedbackContextProvider>
<UpdateContextProvider>
<IpcContextProvider>
<DiscordJoinContextProvider>
<ServersContextProvider>
<TtsStateContextProvider>
<TtsInstallerContextProvider>
<OnboardingContextProvider>
<Routes>
<Route element={<SideBarLayout />}>
<Route path="/" element={<ServersPage />} />
<Route
path="/installations"
element={<InstallationsPage />}
/>
<Route path="/news" element={<NewsPage />} />
<Route
path="/preferences"
element={<PreferencesPage />}
/>
<Route
path="*"
element={<WorkInProgressLayout />}
/>
</Route>
</Routes>
</OnboardingContextProvider>
</TtsInstallerContextProvider>
</TtsStateContextProvider>
</ServersContextProvider>
</DiscordJoinContextProvider>
</IpcContextProvider>
</UpdateContextProvider>
</FeedbackContextProvider>
</CssVarsProvider>
}
/>
</Routes>
</BrowserRouter>
);
Expand Down
48 changes: 24 additions & 24 deletions src/components/atoms/news/ChangeEntry.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
import type { Meta, StoryObj } from '@storybook/react-vite';
import type { Meta, StoryObj } from "@storybook/react-vite";

import ChangeEntry from './ChangeEntry';
import ChangeEntry from "./ChangeEntry";

const meta = {
component: ChangeEntry,
component: ChangeEntry,
} satisfies Meta<typeof ChangeEntry>;

export default meta;

type Story = StoryObj<typeof meta>;

export const New: Story = {
"args": {
"description": "Added something super awesome!",
"author": "John Doe",
"type": "NEW"
}
args: {
description: "Added something super awesome!",
author: "John Doe",
type: "NEW",
},
};

export const Fix: Story = {
"args": {
"description": "Fixed a bug where the application would crash on startup.",
"author": "John Doe",
"type": "FIX"
}
args: {
description: "Fixed a bug where the application would crash on startup.",
author: "John Doe",
type: "FIX",
},
};

export const Improvement: Story = {
"args": {
"description": "Improved performance of the application.",
"author": "John Doe",
"type": "IMPROVEMENT"
}
args: {
description: "Improved performance of the application.",
author: "John Doe",
type: "IMPROVEMENT",
},
};
export const Balance: Story = {
"args": {
"description": "Balanced gameplay mechanics.",
"author": "John Doe",
"type": "BALANCE"
}
};
args: {
description: "Balanced gameplay mechanics.",
author: "John Doe",
type: "BALANCE",
},
};
13 changes: 8 additions & 5 deletions src/components/atoms/news/ChangeEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { AutoAwesome, Balance, Build, QuestionMark, RocketLaunch } from "@mui/ic

type ChangeTypeContrained = "FIX" | "NEW" | "IMPROVEMENT" | "BALANCE";


export default function ChangeEntry(props: Change) {
const { description, author, type } = props;
const changeType = type as ChangeTypeContrained;
Expand All @@ -31,10 +30,14 @@ export default function ChangeEntry(props: Change) {
{getIconByType()}
</Tooltip>
<Stack>
<Typography level="body-md" sx={{ color: "primary.plainColor" }}>{description}</Typography>
<Typography level="body-xs" sx={{ color: "text.primary" }}>By {author}</Typography>
<Typography level="body-md" sx={{ color: "primary.plainColor" }}>
{description}
</Typography>
<Typography level="body-xs" sx={{ color: "text.primary" }}>
By {author}
</Typography>
</Stack>
</Stack>
</Card >
</Card>
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ export const WithoutTooltip: Story = {
label: "Installation path",
},
};

11 changes: 2 additions & 9 deletions src/components/atoms/servers/ServerFact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,8 @@ export default function ServerFact(props: ServerFactProps) {
const { icon, value } = props;

return (
<Stack
direction="row"
spacing={0.5}
alignItems="center"
sx={{ "--Icon-fontSize": "var(--joy-fontSize-lg)" }}
>
<Box sx={{ display: "flex", alignItems: "center", color: "text.tertiary" }}>
{icon}
</Box>
<Stack direction="row" spacing={0.5} alignItems="center" sx={{ "--Icon-fontSize": "var(--joy-fontSize-lg)" }}>
<Box sx={{ display: "flex", alignItems: "center", color: "text.tertiary" }}>{icon}</Box>
<Typography level="body-sm" sx={{ color: "text.secondary" }} noWrap title={value}>
{value}
</Typography>
Expand Down
8 changes: 3 additions & 5 deletions src/components/atoms/update/VersionBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ export default function VersionBadge(props: VersionBadgeProps) {
Version
</Typography>
<Stack direction="row" alignItems="center" spacing={1.5}>
<Typography
level="body-sm"
sx={{ color: "text.secondary", fontFamily: "monospace" }}
>
<Typography level="body-sm" sx={{ color: "text.secondary", fontFamily: "monospace" }}>
{currentVersion}
</Typography>
<Box
Expand All @@ -30,7 +27,8 @@ export default function VersionBadge(props: VersionBadgeProps) {
width: 28,
height: 2,
borderRadius: 1,
background: "linear-gradient(90deg, var(--joy-palette-neutral-600), var(--joy-palette-primary-400))",
background:
"linear-gradient(90deg, var(--joy-palette-neutral-600), var(--joy-palette-primary-400))",
}}
/>
<Typography
Expand Down
8 changes: 4 additions & 4 deletions src/components/demo/ThemeDemoLayout.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { Meta, StoryObj } from '@storybook/react-vite';
import type { Meta, StoryObj } from "@storybook/react-vite";

import ThemeDemoLayout from './ThemeDemoLayout';
import ThemeDemoLayout from "./ThemeDemoLayout";

const meta = {
component: ThemeDemoLayout,
component: ThemeDemoLayout,
} satisfies Meta<typeof ThemeDemoLayout>;

export default meta;

type Story = StoryObj<typeof meta>;

export const Default: Story = {};
export const Default: Story = {};
Loading
Loading