Commit Graph

88 Commits

Author SHA1 Message Date
85805531c2 Add current members list display in NewGameModal
Introduced a UI element in NewGameModal to display the list of current members when available. Also used React Portal to render the bottom snack for joins directly in the document body. These updates enhance UI clarity and user feedback during game interactions.
2026-02-06 14:46:36 +01:00
7b7b23f52d Add join notifications with bottom snack and vibration feedback
Added functionality to detect new members joining games, displaying a snack message and providing optional vibration feedback. Managed state with refs to track members and reset baselines when switching games. Styled a bottom toast notification for better user feedback.
2026-02-06 14:37:36 +01:00
3cbb4ce89a Enhance new game modal with running game state handling
Introduced functionality to detect and handle ongoing games in the new game modal. The modal now switches between "running" and "choice" modes based on game state, improving clarity for users. Added a dedicated section to display the game code when a game is active.
2026-02-06 14:17:39 +01:00
6b9d4d1295 Add live refresh for game members and metadata
Implemented a useEffect to periodically refresh game member and winner metadata every 2.5 seconds. This ensures new joiners are visible without requiring a page reload, balancing performance and usability.
2026-02-06 14:07:26 +01:00
730b9ed552 Adjust transparency levels for "rowMaybeBg" and "rowEmptyBg".
Reduced the opacity in "rowMaybeBg" and "rowEmptyBg" styles across all themes to improve visual clarity and match the design requirements. These changes ensure a more subtle background appearance in various UI states.
2026-02-06 14:00:32 +01:00
0c983f7e44 Add winner display name support in game metadata
Updated backend to include winner's display name in the game metadata API and frontend to display it alongside the email. This enhances clarity by showing a more user-friendly identifier.
2026-02-06 13:52:19 +01:00
b4b5c7903a Remove redundant email display logic in WinnerBadge component.
Simplified the WinnerBadge component by removing the conditional logic for optionally displaying the email when the display name is available. Updated WinnerCard to use display name as the primary label fallback for members, ensuring cleaner and consistent rendering.
2026-02-06 13:46:02 +01:00
45722e057f Refactor modal overlay styles for consistency and responsiveness
Replaced top/left/right/bottom with a single "inset" property for cleaner and more concise code. Updated padding to account for safe areas dynamically and ensured box-sizing includes padding. Improved responsiveness by using percentages instead of viewport units for width and height.
2026-02-06 13:40:10 +01:00
dc98eeb41c Fix email display in WinnerBadge component
Replaced the incorrect `me.display_name` with `winner.email` to ensure the correct email is shown when `showEmail` is true. This resolves the display issue for winner information.
2026-02-06 13:36:51 +01:00
bdc6824e18 Remove unused displayName variable from WinnerBadge.jsx
The `displayName` variable was declared but not used effectively in the component. This cleanup improves code readability and eliminates unnecessary declarations. Updated the code to directly use `me.display_name`.
2026-02-06 13:35:31 +01:00
745b661709 Fix email display logic in WinnerBadge component
Replaced the conditional display of the winner's email with a more robust logic to show either the trimmed display name or the email. This ensures better handling of cases where the display name is unavailable or matches the email.
2026-02-06 13:24:38 +01:00
fa89987f39 Update components to display email instead of display_name
Replaced `display_name` with `email` in `WinnerBadge` and `WinnerCard` components. This ensures email addresses are shown consistently when rendering winner-related information.
2026-02-06 13:22:23 +01:00
59e224b4ca Add user stats feature with API and modal integration
Introduced an endpoint to fetch user stats and integrated it with a new StatsModal component in the frontend. Users can now view game statistics, including played games, wins, losses, and win rates, accessible from the user menu.
2026-02-06 13:14:27 +01:00
bfb1df8e59 Enhance styling consistency and alignment in Admin Panel
Centered elements in the Admin Panel using `justifyItems: "center"`. Adjusted input padding, font size, and primary button styling for improved layout and usability.
2026-02-06 12:56:59 +01:00
b830428251 Refactor AdminPanel: Move function definition above useEffect.
This change reorders the `AdminPanel` function definition to appear before the `useEffect` hook, enhancing readability and maintaining consistent organization. No functionality is altered.
2026-02-06 12:51:20 +01:00
52ace41ac4 Refactor modal logic and implement ModalPortal component
Moved modal rendering logic to a new `ModalPortal` component to improve reusability and separation of concerns. Adjusted styles for better UI consistency, including improved backdrop and modal behavior. Enhanced accessibility by handling escape key events and blocking background scrolling when the modal is open.
2026-02-06 12:43:24 +01:00
556a7a5d81 Update WinnerBadge to display displayName instead of email
Replaced `winner.email` with `winner.displayName` in the WinnerBadge component. This ensures a more user-friendly representation by showing the display name instead of the email.
2026-02-06 12:29:07 +01:00
2cdd4ae17e Adjust AdminPanel spacing and enhance modal UI effects
Reduced grid gap in AdminPanel for better spacing consistency. Improved modal overlay and card design with stronger darkening, added blur, and responsive adjustments to prevent layout issues in smaller viewports.
2026-02-06 12:28:41 +01:00
8a73dd86cf Refactor TopBar displayName initialization logic.
Moved the `displayName` variable initialization inside the `TopBar` component and handled null checks consistently. This improves readability and ensures a safer default value handling for `me`.
2026-02-06 12:22:20 +01:00
9aa3532dd6 Enable immediate PWA updates and cache cleanup.
Added functionality to immediately activate new Service Worker versions and reload the page upon updates. Enhanced caching configuration in Vite to clean outdated caches and ensure clients use the latest version.
2026-02-06 12:20:52 +01:00
3a66c0cf74 Add display_name support for users in backend and frontend
This commit introduces the `display_name` field to the user model. It updates database migrations, API endpoints, and the admin panel to handle this field. Additionally, the `display_name` is now shown in the TopBar and WinnerBadge components, improving user experience.
2026-02-06 12:09:21 +01:00
4a012b7345 Improve database column check and update frontend z-index styling
Enhanced the `_has_column` function to handle database dialects cleanly, reducing unnecessary PostgreSQL logs. Adjusted frontend z-index values to ensure proper element stacking in the UI.
2026-02-06 12:00:14 +01:00
4669d1f8c4 Refactor and enhance game management, user roles, and state handling
This commit introduces significant changes across the backend and frontend to improve game creation, joining, and member management. Key updates include adding a host role, structured handling of winners, and a New Game modal in the frontend. The refactor also simplifies join codes, improves persistence for user themes, and enhances overall user interaction with better UI feedback and logic.
2026-02-06 11:21:43 +01:00
d0f65b856e Integrate join codes, player management, and themes
This update introduces "join codes" for games to simplify game joining. Enhancements include player role and winner management for better organization. Additionally, theme preferences are now user-configurable and persisted server-side.
2026-02-06 11:08:41 +01:00
6732208792 Refactor WinnerBadge component to simplify implementation
Moved logic for displaying the winner badge directly into the `WinnerBadge` component, removing unused local storage helper functions. Updated styling and streamlined the component for better clarity and maintainability.
2026-02-06 10:05:21 +01:00
74de7bf4dd Enhance winner management with localStorage updates
Refactored winner storage logic by introducing `clearWinnerLS` and replacing outdated functions with `getWinnerLS` and `setWinnerLS`. Added a `WinnerBadge` component to display the winner's status and updated game lifecycle handling to ensure proper winner reset and management.
2026-02-06 10:02:11 +01:00
7024a681da Add themed background images for Hogwarts houses
This commit introduces specific background images for Gryffindor, Slytherin, Ravenclaw, and Hufflepuff houses. Updated the theme configuration to dynamically set these images per house and adjusted the styles to utilize the new theme token for background images.
2026-02-06 09:52:54 +01:00
4295b139b2 Refactor header and row styles to use theme tokens.
Replaced hardcoded header colors with theme-based tokens for better maintainability and consistency across themes. Simplified the structure by consolidating row and header-specific design tokens and removing unused badge tokens.
2026-02-06 09:39:21 +01:00
6e460b69b4 Refactor and expand style tokens for rows and badges.
This commit separates badge and row styles into distinct tokens, improving modularity and theme customization. It also introduces new tokens for section headers and replaces hardcoded values with more consistent styling logic. These changes enhance maintainability and visual consistency across the application.
2026-02-06 09:33:09 +01:00
a9021fb4f1 Refactor status-based styles to use theme tokens.
This change replaces hardcoded status-based styles with theme tokens, improving consistency and maintainability. The update also enables easier customization of styles across different themes by centralizing row and badge colors in theme configurations.
2026-02-06 09:25:43 +01:00
a08b74ff7a Add theme customization and winner management features
Introduced a theme selection feature, allowing users to customize the application's appearance, with themes stored per user. Added functionality to manage and store the game's winner locally. These changes improve user experience and personalization.
2026-02-06 09:15:51 +01:00
22e3001a31 Update HelpModal content and structure for clarity
Added new sections for game selection, user menu, and revised existing instructions for better clarity. Included detailed descriptions and clear formatting to improve the help guide’s usability.
2026-02-05 10:08:53 +01:00
198175c0fe Rename "Neues Spiel" button text to "New Game"
Updated the button label in the TopBar component to display "New Game" instead of "Neues Spiel." This change aligns the interface language with English for consistency.
2026-02-05 09:15:19 +01:00
1f326c2b46 Update label from "Account" to "User" in TopBar
The label on the user menu button was changed to improve readability and consistency with the UI language. This ensures better comprehension for users interacting with the application.
2026-02-05 09:10:11 +01:00
c6a56b14ff Update TopBar labels for clarity and relevance
Replaced "Zauber-Notizbogen" with "Notizbogen" to simplify terminology. Displayed user email instead of role for a more meaningful and personalized experience.
2026-02-05 09:08:15 +01:00
a3216950c8 Update TopBar UI for improved structure and clarity
Refactored the TopBar component to enhance readability and organization. Added labeled sections for user account, role display, and the "Neues Spiel" button. Adjusted styles and improved spacing for better UI consistency.
2026-02-04 09:06:17 +01:00
e4c1a57f0f Update button text in TopBar component
Revised the button label from "Neues Spiel" to "✦ Neues Spiel" to enhance visual appeal and draw user attention. This minor UI tweak improves the user experience.
2026-02-04 09:02:50 +01:00
3b628b6c57 Refactor App structure and add modular components
Split GamePickerCard, HelpModal, and SheetSection into separate components for better modularity and clarity. Refactored App.jsx to utilize these new components, restructured state variables, and organized functions for improved readability. Enhanced code comments for easier maintenance.
2026-02-04 08:58:00 +01:00
1afb060bbc Refactor app by modularizing components and extracting utilities.
The changes split large features into smaller, reusable components like `AdminPanel`, `LoginPage`, `TopBar`, `PasswordModal`, and `ChipModal`. Utility functions such as `cycleTag` and `chipStorage` were extracted for better organization. This improves the code's readability, maintainability, and scalability.
2026-02-04 08:49:34 +01:00
62eb7e6e58 Update user menu display for cleaner interface
Replaced the email with a generic "Account" label in the user menu for better design consistency and to avoid truncation issues. Adjusted the dropdown max width to 180px for improved alignment with the new layout.
2026-02-03 20:27:21 +01:00
7036f29481 Add password change functionality to user settings
Implemented a secure password change endpoint in the backend with validation. Enhanced the frontend to include a modal for updating the user's password, ensuring real-time input validation and user feedback.
2026-02-03 20:24:20 +01:00
bf37850e79 Improve chip selection and modal closing behavior
Updated the chip handling logic to ensure a smoother user experience by immediately closing modals in the frontend before performing asynchronous operations. Enhanced error handling and streamlined tag display logic for clarity and consistency.
2026-02-03 20:15:46 +01:00
a9dbbd65a4 Update status logic to include "m" in note_tag checks
Previously, only "i" and "s" were considered in the note_tag check for determining effectiveStatus. This update adds "m" to the condition, ensuring accurate status handling for entries with note_tag "m".
2026-02-03 20:09:45 +01:00
ca15266fb9 Add local storage handling for chip selection in frontend
Introduced functions to manage chip data in local storage, ensuring smoother handling of chip selections without backend dependency. Adjusted UI logic to display chip tags dynamically and modified "s" state handling to integrate local storage data seamlessly.
2026-02-03 18:46:33 +01:00
e2b97b69e9 Refactor tag handling and remove unused functions
Consolidated tag cycling logic into a single function, simplifying and clarifying its purpose. Removed redundant functions related to tag parsing and storage. Updated UI elements for better readability and consistency.
2026-02-03 16:10:32 +01:00
59f477c343 Rename CHIP_LIST to CHIP_OPTIONS for clarity
The constant name was updated to better reflect its purpose as a list of selectable options. This improves code readability and maintainability.
2026-02-03 15:53:40 +01:00
7be21969e7 Add cycleTag function for tag value transitions
Implemented the cycleTag function to handle transitions between tag states ("i", "m", "s") and reset for special cases starting with "s.". This prepares the application to support dynamic tag cycling functionality.
2026-02-03 15:49:09 +01:00
db35a7b0c9 Refactor chip state variable names for consistency
Renamed state variables `chipPickOpen` and `chipPickEntry` to `chipOpen` and `chipEntry`. This change improves naming consistency across the component, simplifying readability and maintenance.
2026-02-03 15:39:10 +01:00
d2e2286627 Refactor chip selection logic and UI improvements
Unified chip modal functionality by consolidating state variables and methods. Enhanced UI consistency for effective statuses and streamlined code for readability and maintainability. Updated styles for better visual appeal and clarity.
2026-02-03 15:35:55 +01:00
b8fc47e881 Update text style for additional conditions
Adjusted text decoration and opacity to apply when certain tags ("i" or "s") are set. This ensures better visual feedback for the specified conditions in the application interface.
2026-02-03 15:22:18 +01:00