92 Commits

Author SHA1 Message Date
5164255aea
feat(ide): Add Project Default inspection profile
This commit includes a new inspection profile named 'Project Default'. This profile is configured to detect duplicated code in TypeScript with a weak warning level. It is enabled by default.
2024-06-20 15:09:41 +02:00
53be13ef38
feat(components): Add buy-modal component for purchasing crypto
This commit introduces a new component, `buy-modal.tsx`, within the cryptos scope of components. This component allows the option to buy cryptocurrency either from a user or directly from the server. It provides form validation, API integrations, handles states, and displays proper response messages.
2024-06-20 15:09:14 +02:00
49d485c11a
feat(components): Add buy-modal component for purchasing crypto
This commit introduces a new component, `buy-modal.tsx`, within the cryptos scope of components. This component allows the option to buy cryptocurrency either from a user or directly from the server. It provides form validation, API integrations, handles states, and displays proper response messages.
2024-06-20 15:07:15 +02:00
37b7116a69
feat(cryptos): Add ViewModal component
A new ViewModal component was added to the cryptos directory. This React component includes Dialog properties and widgets from ui components such as a Button, Label, and Input. Modifications also include a LineChart from lucide-react library.
2024-06-20 15:05:57 +02:00
2452d8d607
feat: Add new file
This commit introduces a new file to the codebase. No pre-existing files or functionalities have been modified or removed as part of this change.
2024-06-20 15:03:27 +02:00
b188e8573d
feat(component): add DataTable component
This commit introduces a new DataTable component in the UI component library. It includes features like column sorting, pagination, and customizable filtering. This reusable component is designed to handle and display data tables across different parts of the application.
2024-06-20 15:02:44 +02:00
fb4b2bb7c1
feat(components): add CryptosTable and WalletTable data-tables components
Introduce CryptosTable and WalletTable components. CryptosTable is responsible for displaying cryptocurrency information available for purchase, while WalletTable displays the user's current cryptocurrency holdings. Both components utilize react-table for table generation and sorting functionality. Additional "Buy" and "View" modals have been configured for CryptosTable.
2024-06-20 15:00:22 +02:00
f268294b93
feat: Add new dashboard, admin, and wallet pages
Implement new page.tsx files for dashboard, admin, and wallet modules, providing essential UI logic and data-fetching mechanisms. These components handle their respective data retrieval and loading states, and present the information via relevant UI structures such as 'CryptosTable' and 'WalletTable'.
2024-06-20 14:59:28 +02:00
90dd1d0828
feat: add @tanstack/react-table dependency to package
This commit includes the addition of @tanstack/react-table package as a project dependency. Changes were made in both package.json and pnpm-lock.yaml files to reflect this addition. This new package contributes enhanced table functionalities to the project.
2024-06-20 14:58:30 +02:00
2c9fafd802
feat(layout): add Wallet and Dashboard buttons
Imported Link and Button components into layout.tsx, which were used to add Wallet and Dashboard navigational buttons to the header section. The buttons have been set with a 'light' variant and flex features for responsive design.
2024-06-20 14:57:03 +02:00
4e0de3be06
feat(apiRequest): use JSON.parse for accessToken in Authorization header
The Authorization header in the apiRequest now utilizes JSON.parse for the accessToken. This change ensures proper parsing and retrieval of the item from the local storage when the window object is defined.
2024-06-20 14:56:35 +02:00
a2f2996ef9
feat(apiRequest): use JSON.parse for accessToken in Authorization header
The Authorization header in the apiRequest now utilizes JSON.parse for the accessToken. This change ensures proper parsing and retrieval of the item from the local storage when the window object is defined.
2024-06-20 14:55:23 +02:00
0a239f4478
feat(interfaces): Add new interfaces
New interfaces related to referral code and trade request are added to the `api.interface.ts`. Additionally, import statement modified to include `ICryptoInWalletInfo` into the module. This enriches the module with a set of necessary interfaces providing better control over referral codes, trades, and offers operations.
2024-06-20 14:52:07 +02:00
69484cc90f
feat(component): add wallet loading state and user wallet information
The account-info component has been updated to include a loading state for user wallets, a feature that significantly improves the performance of the component by preventing unnecessary re-renders. The IUserWallet type now includes new fields to store wallet data such as cryptocurrencies' details and owned amount. These changes also include display adjustments and improved routing for 'My Wallet' button.
2024-06-20 14:45:12 +02:00
3819a0f338
feat(handler): Update imports and remove excess functions
Updated the import statement within account.handler.ts to feature new, relevant components. Also, this commit includes a significant clean-up of the account.handler service, where a large amount of superfluous function calls were removed to streamline the code.
2024-06-20 14:44:31 +02:00
977b13d46a
feat(button component): Add 'light' style variation to button
This commit introduces a new 'light' style variation for the button component. Now a button can be styled with 'light' variation which changes the button's background and text color on hover state.
2024-06-19 22:26:17 +02:00
aa322d0c8f
test(temp): temporary file from Quentin 2024-06-18 22:49:36 +02:00
87245c702e
feat(service): implement trade and referral code functions in account handler
The commit introduces implementation for functions handling trading and referral codes in account.handler.ts. These includes `createTrade`, `getAllTrade`, `getUserTrade`, `getAllReferralCode`, `createReferralCode` functions. The update improves the overall functionality of trade and promotional related processes. A new interface `IAllReferralCodeRes` is also imported for referral code response.
2024-06-18 22:49:07 +02:00
e7f6de4a29
feat(ide): add discord.xml file
This commit includes the creation of a new discord.xml file under the .idea directory. This config file brings in new settings for the DiscordProject related to its 'show' and 'description' options.
2024-06-18 21:33:43 +02:00
b9d47ba401
style(footer): adjust div spacing in footer component
This commit properly adjusts the spacing in an empty div within the footer section of the React component for adherence to standardized code formatting. Proper spacing contributes to code readability and maintainability.
2024-06-18 21:33:17 +02:00
d54d05403b
feat(auth-form): enhance user registration and login process
This commit introduces some improvements to the user registration and login processes. It standardizes the update interval in the user data upon registration, fixes the missing 'toString' call for 'access_token' and improves code readability by correcting indents and adding extra spaces. Additionally, this commit refactors the redirection logic after successful login or registration, making it more robust and reliable.
2024-06-18 21:32:49 +02:00
1898d554f9
feat(interfaces): add new API interfaces and update existing ones
New interfaces were added to enhance functionality for trade and offer creation requests. Renamed IApiAllTrades interface to IApiAllTradesRes for consistency. Interfaces were also added to manage referral codes and rankings.
2024-06-18 21:22:49 +02:00
50225f1c17
feat(account-info): import and use getWallet from account handler
The 'getWallet' function has been imported from the account handler service and is now used in account-info component. This addition ensures to fetch information when the component renders.
2024-06-18 21:22:34 +02:00
00be94c5a8
feat(account.handler): add new API methods
This commit adds several new async functions to fetch wallet, user trades and all trades in `account.handler.ts`. This provides an interface for interacting with multiple new endpoints. Additionally, several import statements have been updated to reflect the changes.
2024-06-18 21:22:12 +02:00
faba9fa3cb
refactor(layout): rearrange import order
The import statements in layout.tsx have been reordered. React type import is now following Toaster component import to maintain organized import sequence.
2024-06-18 16:36:56 +02:00
397bef5cdf
refactor: move general interface to interfaces directory
This commit relocates the 'general.interface.ts' file from the 'services' directory to the 'interfaces' directory. This structural change is meant to streamline the organization of the code base.
2024-06-18 16:35:46 +02:00
11b4c723fa
chore(dependencies): upgrade packages in pnpm-lock.yaml
Several dependencies have been upgraded across multiple versions including react-hook-form, lightweight-charts, next elements, sonner, lucide-react, embla-carousel-react and others. Reflecting these changes in the pnpm-lock.yaml file is necessary for functional and up-to-date building of the project. This helps maintain compatibility and introduces performance improvements or new features from the updated packages.
2024-06-17 10:02:36 +02:00
1674664980
build: Update package dependencies
Upgrade multiple dependencies to their newer versions in package.json file. This includes libraries like 'embla-carousel-react', 'lightweight-charts', and 'react' among others. It also includes devDependencies like '@types/node', '@types/react', and 'typescript'.
2024-06-17 10:02:09 +02:00
39fc556aca
refactor(app): move Toaster component position in layout
The Toaster component was relocated in the layout file. It's been moved from below the Providers component to a position above the Footer component. This repositioning is aimed at improving the visual hierarchy and flow of the application.
2024-06-17 10:01:32 +02:00
7426f5f642
feat(component): Update footer styling and structure
The footer's class has been updated to improve page layout. Additionally, unnecessary div containing flex properties has been removed for simplicity and improved readability.
2024-06-17 10:01:15 +02:00
01c073e879
feat(account-info): add disconnect handling and improve info display
The commit enhances the account information component with better data handling. It adds disconnect handling to account for cases when user session is terminated. It also improves information display by adding details like crypto availability and user identity, improving the overall user experience.
2024-06-17 09:50:06 +02:00
e6d37ef600
feat(services): add general.interface.ts
This commit introduces a new interface file named 'general.interface.ts' to standardise return types in the services scope. It includes the IStandardisedReturn interface and the EReturnState enum. These additions enhance the consistency of return types across different services.
2024-06-17 09:49:09 +02:00
cc286462f0
feat(components): add authentication forms
This commit introduces authentication forms for both user login and registration. These forms use zod for data validation and context for state management. Login and registration processes have been implemented as asynchronous functions, handling API requests, and error responses.
2024-06-17 09:48:38 +02:00
4c061dc19c
feat(account-dialog): handle case when userContext not present
This commit updates the account-dialog component to properly handle when there's no userContext. Previously, a default user data was set when no userContext was found, this has been replaced with a simple message saying 'No account'. Also, checks for an authentication token in localStorage have been included. These changes aim towards better handling of edge cases and unauthenticated scenarios.
2024-06-17 09:47:57 +02:00
3b1a3e93e0
feat(layout): add Toaster component and update favicon link
This commit introduces the Toaster component to the main layout. In addition, the link to the favicon has been updated to correct its location.
2024-06-17 09:46:21 +02:00
5c81ad917d
feat(auth): Update auth page layout
The width of the authentication page is adjusted to occupy the full width of the viewport to enhance usability. This layout update ensures consistency for different screen sizes.
2024-06-17 09:45:58 +02:00
b5526e5877
"refactor(service): remove register and login functions in account.handler.ts"
This commit involves a significant refactoring in the account.handler.ts file. Specifically, it removed the `doRegister` and `doLogin` functions. Furthermore, replaced `useEncodedLocalStorage` with `useLocalStorage`. The `doDisconnect` function has been refined to redirect to homepage after removing an item from local storage.
2024-06-17 09:45:25 +02:00
41ba50d417
feat(ui): Change input background color to accent
In the 'input.tsx' component of the UI, the background color property of the input field has been updated from 'bg-background' to 'bg-accent' to enhance visibility.
2024-06-17 09:44:47 +02:00
0504692dfb
feat(auto-form): apply full width to form class
The className of the form in the auto-form component has been updated to include "w-full". This change ensures that the form will occupy the full width of its parent container, enhancing layout and visibility.
2024-06-17 09:44:07 +02:00
15eb7addd0
feat(interface): allow message to be string or array
This update to the api.interface now accepts both strings and arrays for the 'message' field inside the IAbstractApiResponse interface. This provides more flexibility for responses returned by the API.
2024-06-17 09:43:26 +02:00
5a905d0608
refactor: moved favicon to app root 2024-06-17 09:35:31 +02:00
72bbe08de0
feat(components): update layout for responsiveness
This commit enhances the layout in header.tsx for better mobile responsiveness. It adjusts flex properties and classes for optimal rendering across various device sizes. It also rearranges elements within the header component for a better mobile appearance.
2024-06-14 12:48:03 +02:00
48adc8be6c
refactor(interface): modify import statement in userdata.interface.ts
This change adjusts the import statement to correctly import the ICryptoInUserWalletInfo. Previously, the incorrect syntax was causing import errors and this revision resolves that issue.
2024-06-14 12:47:41 +02:00
3a8621735e
feat(auth): Add new authentication page
A new authentication page has been added to the application. It includes an AuthForms component and uses a flex display for layout, with specific height and width properties set.
2024-06-14 12:47:17 +02:00
0ead6bd969
refactor(interfaces): add Wallet related properties in User and Crypto interfaces
The change adds Wallet related properties in both User and Crypto interfaces. Specifically, `IUserWallet` interface has been added to `userdata.interface.ts` and 'amount' field has been added to `IUserWalletCryptos` in `crypto.interface.ts`. Also, an extra type `ICryptoInUserWalletInfo` extending `ICryptoInWalletInfo` has been added with `owned_amount` field.
2024-06-14 10:08:44 +02:00
747cc1cdb4
feat(ui-component): add new copy button component
This commit introduces a new CopyButton component in the ui components. It also includes a feature to copy multiple choices. The button changes its icon after copying to clipboard, indicating that the copying has been done.
2024-06-14 10:07:58 +02:00
a873095099
feat(component): Add loading and context handling
The update enhances the account dialog component by introducing loading state management and improved context handling. Instead of displaying "Loading..." while user data is being fetched, a Skeleton component is now rendered. Additionally, detailed user data fields are now provided when setting the user data context. An effect hook supplies the proper loading state management.
2024-06-12 16:54:18 +02:00
600692e3e5
feat(component): Add loading and context handling
The update enhances the account dialog component by introducing loading state management and improved context handling. Instead of displaying "Loading..." while user data is being fetched, a Skeleton component is now rendered. Additionally, detailed user data fields are now provided when setting the user data context. An effect hook supplies the proper loading state management.
2024-06-12 15:13:23 +02:00
efb6eaf274
feat(component): modify CSS classes for improved layout
Updated the classes in the Header component to enhance layout presentation. Particularly, added padding at the bottom and updated the alignment for better responsiveness. This will enhance user interface on multiple device dimensions.
2024-06-12 15:00:33 +02:00
b3907697a0
feat(ui): add DatePicker component
A new DatePicker component has been added to the UI components directory. This component includes a dropdown calendar for a user-friendly date selector. It utilizes a popover triggered by a button for seamless date selection and integration.
2024-06-12 15:00:05 +02:00