Commit Graph

222 Commits

Author SHA1 Message Date
akastijn 2b96957876 Add debug logging for JWT claims extraction in auth.service.ts. 2025-08-02 21:49:41 +02:00
akastijn b16fab26e7 Refactor hasAccess method in auth.service.ts to improve readability and optimize authorization checking logic. 2025-07-31 23:30:48 +02:00
akastijn 28fd05a656 Update HeaderComponent HTML: adjust access check condition to use SCOPE_head_mod instead of HEAD_MOD. 2025-07-31 23:08:02 +02:00
akastijn 871615702b Update Node.js to v20.19.0 and npm to v10.2.3; refactor npmBuild task to use plugin-provided npmCommand and add nodeVersionCheck task for environment validation. 2025-07-30 00:08:00 +02:00
akastijn 291c9df5c6 Upgrade Angular dependencies and ngx-cookie-service in package.json to latest versions. 2025-07-29 23:53:54 +02:00
akastijn 1ce2088cae Update HeaderComponent HTML: change "Login" label to "Logout" for logout button. 2025-07-15 23:42:03 +02:00
akastijn 0b952e07f7 Refactor HeaderComponent to organize inputs, inject dependencies, and improve HTML formatting. Add logout method for authentication management. 2025-07-15 21:51:03 +02:00
akastijn c2b9a8a574 Replace deprecated Angular directives (*ngFor, *ngIf) with modern Angular template syntax. Remove unused CommonModule imports across components for optimization. Clean up excess spacing and formatting in HTML files. 2025-07-15 21:48:23 +02:00
akastijn d3ef296784 Upgrade TypeScript to version ^5.8.3 in package.json. 2025-07-15 21:39:40 +02:00
Peter 5a792463cc Update responsive styles and class names for consistency
Refactored multiple components to improve responsive design, ensuring better usability on smaller screens. Standardized class names for clarity and consistency, and adjusted layouts and styles to enhance overall alignment and accessibility.
2025-07-14 22:49:22 +02:00
Peter 62f837914c Add new routes and improve theme and header responsiveness
Added routes for 'community', 'nicknames', and 'nickgenerator'. Enhanced theme switch positioning and responsive design for smaller screens. Moved header login button to a more consistent position and upgraded Angular Material to version 19.2.19 for better compatibility.
2025-07-06 21:33:14 +02:00
akastijn 42f0961f13 Directly initialize JwtHelperService in auth service 2025-07-06 19:14:06 +02:00
akastijn 04310e1cce Switch to localStorage for JWT handling and simplify case transformation logic in LoginComponent. Update app.config.ts and related services to align with the new token management method. Mark JwtClaims interface as exported. 2025-07-06 19:10:17 +02:00
Peter 54e747118c Merge branch 'bans' 2025-07-06 18:15:09 +02:00
Peter 43430cfbef Merge remote-tracking branch 'origin/bans' into bans
# Conflicts:
#	frontend/src/app/app.routes.ts
2025-07-06 11:13:59 +02:00
akastijn cce83a08de Replace fakeLogin() with actual login() method in AuthService and remove redundant fakeLogin() implementation. 2025-07-04 23:32:08 +02:00
akastijn f0faa63ca7 Add JWT support for authentication handling
Integrate `@auth0/angular-jwt` for Token management. Update `app.config.ts` with `JwtModule` setup and token getter from cookies. Enhance `AuthService` to include token handling, fake login, and JWT validation using `JwtHelperService`. Introduce `JwtClaims` interface for structured token claims.
2025-07-04 22:31:41 +02:00
akastijn 73916f0aae Add login button to header 2025-07-04 21:14:45 +02:00
akastijn ebe66c87c0 Rework folder structure in frontend
Pages are now grouped per group they appear in on in the header (where possible)
Utilities used by multiple pages in the project are grouped in folders such as services/pipes/etc
2025-07-04 19:50:21 +02:00
akastijn 213f9987d9 Remove particle component and its associated routes and security controls. 2025-07-03 20:08:56 +02:00
akastijn 48cac607de Add route for lazy-loaded Login component. 2025-07-03 20:02:07 +02:00
akastijn 7fc25f46f3 Add endpoints, services, and security controls for particle file management, including save and download APIs. 2025-06-29 03:15:39 +02:00
Teriuihi e837a9216d Fix slider sticking out of page 2025-06-23 00:25:31 +02:00
Teriuihi d4363b3a8a Add particle type selection, size control, and enhance particle property handling 2025-06-23 00:23:03 +02:00
Teriuihi 1e5862bae6 Add new particle types and enhance particle attributes handling 2025-06-23 00:04:30 +02:00
Teriuihi daf88ea437 Add opacity control for intersection plane 2025-06-22 23:24:06 +02:00
Teriuihi 9abd570b87 Add support for darkmode 2025-06-22 23:15:06 +02:00
Teriuihi 5284d498f3 Add a reset camera button and implement default camera reset functionality 2025-06-22 20:53:11 +02:00
Teriuihi c3a7be82e9 Add an option to highlight particles 2025-06-22 20:46:08 +02:00
Teriuihi fdb57289f8 Fix weird interactions between plane and player model 2025-06-22 20:20:40 +02:00
Teriuihi 60c1329163 Switch to steve 2025-06-22 20:17:02 +02:00
Teriuihi 0e71c0f581 Fix textures overlapping and glitching for legs 2025-06-22 20:15:35 +02:00
Teriuihi eb67a33331 Change default camera position 2025-06-22 20:12:25 +02:00
Teriuihi 39f20796ce Simplify UV mapping logic and remove unnecessary face rotation handling 2025-06-22 20:08:42 +02:00
Teriuihi e00165c56f Fix uv rotation 2025-06-22 20:04:26 +02:00
Teriuihi 02c6497700 Fix mapping 2025-06-22 20:01:11 +02:00
Teriuihi 0efd476676 Initial attempt at textures 2025-06-22 19:53:27 +02:00
Teriuihi 237518638c Increase particles-list height in FramesComponent to 550px for improved visibility. 2025-06-22 19:34:20 +02:00
Teriuihi fea1a98cea Adjust RendererService to use dynamic container height and update OrbitControls limits 2025-06-22 19:27:55 +02:00
Teriuihi ecd9b3d824 Modularize renderer and plane control functionality into RenderContainerComponent 2025-06-22 19:23:54 +02:00
Teriuihi 9808b5d63d Add manual plane orientation controls with lock/unlock functionality
Implemented a UI overlay in `ParticlesComponent` for manual plane orientation selection with buttons for different orientations. Added lock/unlock toggle to control automatic orientation adjustment. Refactored `IntersectionPlaneService` to support locked state and manual orientation updates. Updated styles and layout to integrate the new controls seamlessly.
2025-06-22 19:16:32 +02:00
Teriuihi c13b7077a7 Remove unused OnInit lifecycle hook from ParticlesComponent and cleanup redundant comments. 2025-06-22 19:08:28 +02:00
Teriuihi 023ae809ef Modularize ParticlesComponent by separating particle, frame, and property functionalities into dedicated components
Refactored `ParticlesComponent` to use `ParticleComponent`, `FramesComponent`, and `PropertiesComponent` for better organization and reusability. Updated layout, improved UI structure, and centralized particle management logic. Enhanced clipboard functionality with a new JSON copy feature.
2025-06-22 19:06:52 +02:00
Teriuihi 3a6f137c9a Update ParticlesComponent to allow dynamic plane position limits and improve slider configuration
Modified plane position logic to use dynamic min/max offsets based on orientation. Enhanced slider component with binding to these offsets and updated display text for clarity. Refactored `IntersectionPlaneService` to expose new methods (`getMaxOffset`, `getMinOffset`) and adjusted position defaults.
2025-06-22 17:59:29 +02:00
Teriuihi cb8447a096 Correct default plane locations 2025-06-22 17:38:28 +02:00
Teriuihi 3e98e1a498 add plane orientation for looking from above/below 2025-06-22 17:32:32 +02:00
Teriuihi 4c31a91bb4 Add modular services for Three.js integration in ParticlesComponent
Implemented dedicated Angular services (e.g., RendererService, InputHandlerService, PlayerModelService) to modularize and simplify Three.js integration within the `ParticlesComponent`. Refactored component logic to delegate rendering, input handling, and model creation to respective services. Updated particle data models and removed redundant logic from the component.
2025-06-22 17:26:10 +02:00
Teriuihi 56175e62d6 Remove RemoveTrailingPeriodPipe import from AboutComponent 2025-06-22 01:10:53 +02:00
Teriuihi 283838f444 Enhance ParticlesComponent to adjust plane position dynamically based on rotation angle. 2025-06-22 01:10:21 +02:00
Teriuihi 49fe335c73 Refactor ParticlesComponent: simplify plane creation, remove legacy handler, and enhance quadrant logic with material updates. 2025-06-22 01:03:17 +02:00
Teriuihi 1875f050c6 Add orbit controls and mouse interaction to ParticlesComponent
Integrated Three.js `OrbitControls` for smoother camera navigation and implemented new mouse interaction methods (`onMouseDown`, `onMouseUp`, `onMouseMove`) for enhanced usability. Adjusted scene, camera, and renderer setup for better responsiveness.
2025-06-22 00:55:38 +02:00
Teriuihi 52d8658be3 Add particle creator component with Three.js integration CREDITS: Junie
Introduced the `ParticlesComponent` for creating and visualizing particles using Three.js. Added associated routes, HTML, SCSS, and tests. Updated `package.json` to include `three` and `@types/three` as dependencies. Adjusted app navigation to include the particles page.
2025-06-22 00:40:16 +02:00
Teriuihi 32a454c034 Refactor permission handling and authentication services
Replaced `PermissionClaim` enum with an OpenAPI-defined schema `PermissionClaimDto` for consistency across frontend and backend. Refactored authentication flow to utilize `AuthService` on the frontend, consolidating JWT handling logic. Removed redundant methods like `saveJwt` and integrated robust permission management throughout the application.
2025-06-21 23:15:46 +02:00
Teriuihi 07646e8c42 Implement enhanced login functionality with JWT, role-based permissions, and frontend integration
Added JWT-based login dialog with form validation and secure token handling on the frontend. Updated backend with role-based access control, privilege management, and refined security configurations. Extended database schema for user privileges and permissions.
2025-05-30 23:41:13 +02:00
Peter 174ed834ca Added pages and fitting content for community, nickgenerator annd nicknames 2025-05-30 23:07:42 +02:00
Peter 20dcebbab9 Added new pages with fitting content: skyblock, custom features, guide book, ranks, commandlist, reducing lag, staff powers 2025-05-30 22:19:36 +02:00
Teriuihi cf758bfe60 Add endpoints and schema for history retrieval by UUID
Introduced a new API endpoint to fetch all punishment history for a specified UUID. Updated existing schemas, controllers, and mappers to support this functionality. Adjusted login endpoints to improve request handling and streamlined frontend form setup for appeals.
2025-05-03 04:37:47 +02:00
Teriuihi 80462218a7 Update role label for head mod 2025-05-02 01:32:15 +02:00
Teriuihi 643545a18a Add appeal and login functionality structure
Introduces initial structure for appeal and login forms in both the frontend and backend. New controllers, APIs, and components were created, but functionality has not been fully implemented yet. This serves as a foundation for future development of these features.
2025-04-26 20:58:47 +02:00
Teriuihi b922487d76 Fix punishment tag colors and avatar image size 2025-04-20 17:29:51 +02:00
Teriuihi 54eb1ea735 Fixes #15 2025-04-20 17:19:50 +02:00
Peter 9043c774f7 Refactor ban details layout and enhanced formatting.
Updated the HTML structure and styling for a clearer, responsive layout and better user experience.
2025-04-20 17:00:31 +02:00
Teriuihi 43b75b8e74 Fixed punishment removed message closes #12 2025-04-19 22:19:08 +02:00
Teriuihi 07c77f5485 Update ban history formatting to include clearer unban details
Modified the history format service to display 'Unbanned by [user]' instead of just the user's name. This provides more explicit context for removed punishments in the UI.
2025-04-19 22:13:19 +02:00
Peter d54a7e51ee Add MyPet and Warps components with HTML, SCSS
Implemented the MyPet and Warps components, including their HTML structure, styles, and unit tests. These components provide detailed information and features for MyPet and Player Warps systems for a Minecraft-inspired application.
2025-04-19 16:37:27 +02:00
Teriuihi 3babde5513 Add punishment details and history retrieval functionality
This commit introduces a new `DetailsComponent` for displaying detailed punishment data and establishes a route to view punishment history by ID and type. It also updates the API to support fetching individual punishment records and refines database mappings for improved data handling.
2025-04-19 04:02:51 +02:00
Teriuihi a1912b96d8 Update favicon 2025-04-19 01:40:14 +02:00
Teriuihi e9880f8864 Remove redundant 'logging' property from angular.json
The 'logging' property was removed from the build configurations as it is not used or required. This simplifies the configuration and avoids potential confusion.
2025-04-19 01:34:31 +02:00
Teriuihi 3449cf24b1 Remove extractCss configuration from angular.json
The extractCss option is deprecated and no longer required. This change cleans up the configuration by removing obsolete settings, ensuring compatibility with newer Angular versions.
2025-04-19 01:33:41 +02:00
Teriuihi 43edd49273 Set up environment-based configurations for API and builds.
Replaced hardcoded API URLs with environment-specific configurations. Added new environments (development, beta, production) with respective settings. Updated build scripts and Angular file replacements to support environment-based builds.
2025-04-19 01:28:29 +02:00
Teriuihi 6f2a48338b Fix npm executable path resolution in build script 2025-04-19 00:09:33 +02:00
Teriuihi e6df93ff5c Fix npm executable path resolution in build script 2025-04-19 00:08:13 +02:00
Peter 680506997e Add Claiming and Economy pages with routing and styles
Created new Claiming and Economy components, templates, styles, and tests. Integrated both pages into the app's routing, enabling navigation and functionality. Updated home page layout and added necessary utility styles.
2025-04-18 22:52:05 +02:00
Teriuihi 235f4fb60f Refactor database queries and handle non-429 errors in history
Updated database query code to use consistent parameter naming and revised query structure for clarity. Added logic in the history component to return existing data when encountering non-429 HTTP errors.
2025-04-18 22:41:04 +02:00
Teriuihi 25e8dc8e8e Update build scripts to integrate frontend with backend. 2025-04-18 22:24:55 +02:00
Peter 5759d6c0dc Merge remote-tracking branch 'origin/master' 2025-04-18 21:54:56 +02:00
Peter 96cc4610dd Add pagination display and update button styling
Introduce a page number display to the pagination controls for better navigation transparency. Update button styles to use CSS variables for improved theme consistency and maintainability.
2025-04-18 21:54:36 +02:00
Teriuihi f53fc9746e Update avatar URL logic for console entries
Replaced the hardcoded console image path with a specific UUID. This ensures a consistent format when constructing avatar URLs and improves maintainability.
2025-04-18 20:47:23 +02:00
Teriuihi ecee377f01 Add API endpoints for search result counts by name and UUID
Introduced new API paths and backend logic to retrieve total punishment counts based on user search queries using names or UUIDs. Updated the frontend to utilize these endpoints and display the total search results dynamically.
2025-04-18 20:43:17 +02:00
Peter ee66bdda83 Add pagination display and update button styling
Introduce a page number display to the pagination controls for better navigation transparency. Update button styles to use CSS variables for improved theme consistency and maintainability.
2025-04-18 19:33:54 +02:00
Teriuihi 21f2b3e4a5 Refactor pagination logic and add error handling in history
Introduced `updatePageSize` for better page size management and added checks to prevent rapid page changes. Enhanced error handling in `history.component` with retry logic on failure. Implemented `RemoveTrailingPeriodPipe` for cleaner UI formatting.
2025-04-18 19:32:23 +02:00
Teriuihi 53f67a5075 Fix handling of non-positive expiry times in punishment history 2025-04-18 18:46:14 +02:00
Peter 87a0b9ad1b Refactor pagination buttons and adjust rate limit interval.
Updated pagination buttons with new styles and class name (`historyPageButton`) for consistency and improved UX. Modified backend rate limit interval from 1 minute to 1 second for faster request handling.
2025-04-18 18:45:40 +02:00
Peter a3570b6833 Fix improperly formatted (input) binding in bans component
Removed excessive whitespace in the (input) binding of the search field to ensure proper functionality and readability. This change improves code cleanliness without altering behavior.
2025-04-12 23:02:28 +02:00
Teriuihi 48fd133b6d Fix pageChange emission to use history length
Modified the `ngOnChanges` method to emit the length of the history instead of the current page. This ensures accurate data is provided to parent components during changes.
2025-04-12 23:01:35 +02:00
Teriuihi 3a2a54050f Add custom avatar for console entries in ban history
Updated the `getAvatarUrl` method to return a specific avatar image for console entries. This ensures better visual distinction for console-generated actions in the ban history.
2025-04-12 22:20:45 +02:00
Teriuihi a5adb031bd Add pagination handling with pageSize and pageChange EventEmitter
Introduced `pageSize` in `bans.component.ts` to manage pagination logic and updated `buttonActive` to account for page size constraints. Added `pageChange` EventEmitter in `history.component.ts` to notify the parent component of page changes. Updated the template to bind `pageChange` for dynamic page size updates.
2025-04-12 22:11:40 +02:00
Teriuihi d535dd1ba9 Reset page number on search and filter changes
Ensure the page is reset to 0 when performing a search or changing filters. This prevents issues with incorrect page states and improves navigation consistency.
2025-04-12 21:55:51 +02:00
Peter 13122559db Refactor table and pagination UI components.
Replaced inline styles with reusable classes for better maintainability. Improved pagination button styling and added transitions to the history table header for a polished user experience. Updated SCSS variables for consistent naming conventions.
2025-04-12 21:55:25 +02:00
Peter a4d8fc07e9 Updated styles and structure for history table and navigation
Refactored the history buttons to include click handlers in the outer div for better clarity and functionality. Improved the table styling in the history component by adding consistent padding, fixing column widths, and ensuring text overflow handling. Added new CSS variables for table header colors to enhance theming consistency.
2025-04-12 19:42:06 +02:00
Teriuihi 3ed5fcfc0f Add pagination controls with proper state handling in BansComponent
Introduced "First", "Previous", "Next", and "Last page" buttons with state-dependent activations for improved navigation. Refactored pagination logic to utilize a constant PAGE_SIZE and adjusted calculations for max page determination. Ensured page transitions and state updates are accurate and consistent.
2025-04-12 17:41:44 +02:00
Peter 81807b107c Enhance user and punisher avatar display in history table
Refactored the layout for player and punisher avatars by adding a container around usernames and aligning elements vertically. Updated the `getAvatarUrl` method to accept only UUID strings, streamlining its usage. Improved styling for better alignment and presentation.
2025-04-12 17:41:29 +02:00
Peter 5e75c82994 Fix inconsistency in image width and height attributes
Updated the width and height attributes of the avatar image in the history component to use consistent integer values (25) instead of "25px". This ensures proper rendering and prevents potential styling issues.
2025-04-12 17:21:50 +02:00
Peter 2383c291c8 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	frontend/src/app/bans/history/history.component.html
2025-04-12 17:21:10 +02:00
Teriuihi a70159e88d Refactor avatar URL generation into reusable method
Centralized avatar URL generation with `getAvatarUrl()` method to reduce redundancy and improve code maintainability. Updated relevant components to utilize the new method for cleaner and more consistent implementation.
2025-04-12 17:20:47 +02:00
Peter fd1115086a Update header styling and improve avatar image attributes
Adjusted the header height and title text for clarity and consistency in the bans page. Also streamlined avatar image attributes by removing unnecessary units for better HTML standards compliance.
2025-04-12 17:16:10 +02:00
Peter 6a70428c75 Updated styling and components for punishment history 2025-04-12 17:05:08 +02:00
Teriuihi 1264003a44 Adjust scroll activation threshold and reset inverseYPos.
Increased the scroll threshold for activating the header to 5 for better usability. Added a reset for `inverseYPos` to 0 when the scroll position is at the top, ensuring consistent behavior.
2025-04-12 16:51:08 +02:00
Teriuihi a1b42060b0 Revise scroll position calculation in header component
Updated the formula for calculating `inverseYPos` to use a 20% reduction approach instead of dividing by 4 and inverting. This ensures a smoother and more proportional adjustment during scrolling.
2025-04-12 16:47:17 +02:00
Teriuihi 2b27fb6955 Add dynamic pagination and state management for history
Introduced dynamic pagination based on punishment types and counts, retrieved via a new API call. Refactored state management with a centralized `pushState` method and updated button logic in the template to reflect the changes. This improves navigation consistency and user experience.
2025-04-12 01:45:59 +02:00