Commit graph

15 commits

Author SHA1 Message Date
Kumi
035da04bf8
chore: optimize CSS imports and PurgeCSS config
Switched to non-minified Bootstrap CSS for improved readability during development. Updated Webpack MiniCssExtractPlugin filename pattern to handle multiple CSS outputs more gracefully. Enhanced PurgeCSSPlugin configuration by incorporating JS paths and limiting removal to specific Bootstrap classes to avoid issues with dynamic class usage.
2024-09-04 08:03:45 +02:00
Kumi
aa9cdf8a8a
feat(ui): add custom behavior to fiat buttons
Enhanced the fiat currency buttons to include event listeners. When a button is clicked, it now updates the select box value and triggers the appropriate conversion function (XMR to Fiat or Fiat to XMR). The browser's address bar is also updated to reflect the selected currency. This improves the user experience by making currency selection more intuitive and dynamic.
2024-08-30 09:38:34 +02:00
Kumi
d981649d2d
Merge remote-tracking branch 'upstream/main' 2024-08-28 09:18:16 +02:00
Kumi
fdebb16a85
fix: remove inline script and improve noscript message
Refactored inline exchangeRates script to main.js for better practice and maintainability. Enhanced the noscript warning message's readability by replacing paragraph tags with line breaks, ensuring clearer instructions for users without JavaScript.
2024-08-10 16:49:33 +02:00
Kumi
227d56a2bd
feat: enhance accessibility and UI feedback
Added a noscript alert message for users with JavaScript disabled, informing them about the limitations and manual controls available. Improved UI spacing with an additional margin in the conversion button section. Adjusted CSS padding for better visual alignment. Expanded Webpack safelist to include alert classes for proper styling.
2024-08-10 16:43:57 +02:00
Kumi
77c41c08c2
fix(js): hide conversion buttons if JavaScript enabled
Removed event listeners on conversion buttons and instead
hide them when JavaScript is enabled. This aims to improve
the user experience by preventing redundant UI interactions
that are handled dynamically.
2024-08-10 16:34:42 +02:00
Kumi
e97805d379
feat: add bidirectional XMR to fiat conversion
Introduced bidirectional conversion functionality for XMR to fiat calculations. Added form elements and event listeners to handle user inputs and conversion direction. Enhanced URL and metadata processing to be dynamic based on protocol. Updated UI with conversion buttons for a better user experience. Safelisted new CSS classes in webpack configuration.
2024-08-10 16:23:52 +02:00
Kumi
04cadac205
fix: increase precision of fiat conversion result
Extended the decimal precision of the converted XMR value from 8 to 12 places. This ensures more accurate representation of conversion rates, especially critical for high-precision financial calculations.
2024-08-09 08:33:06 +02:00
Kumi
acb18fd17e
fix: standardize decimal places for cryptocurrency conversion
Unified the decimal places to 8 for all cryptocurrency conversions in
fiatConvert function. This simplifies the logic and ensures consistent
precision across all supported cryptocurrencies.
2024-08-09 08:31:15 +02:00
Kumi
a1ccf0b43b
feat: fetch exchange rates immediately on startup
Start fetching exchange rates immediately upon initialization, ensuring the most current data is available from the outset. This prevents potential inaccuracies during initial use if rates are only fetched after the interval delay.
2024-08-09 08:12:58 +02:00
Kumi
fae1336444
feat: refactor input handling and copy button functionality
Refactored event listeners for XMR and fiat input fields, consolidating common logic and improving maintainability. Introduced explicit copy button IDs and enhanced their functionality by moving inline click handlers to addEventListener. These changes streamline form control interactions and ensure consistent behavior across different user inputs.

Additionally, removed redundant onchange handlers from the PHP file to simplify code and mitigate potential conflicts.
2024-08-08 16:34:03 +02:00
Kumi
061892fa04
feat: improve API error handling & add exchange rate updates
- Switched to using cURL for fetching data from CoinGecko API, with added error handling for failed requests. This reduces the chances of runtime errors and ensures fallback to previous data.
- Implemented periodic updates to exchange rates every 5 seconds in `main.js` to keep the rates current.
- Added OpenGraph meta tags on `index.php` for better social media integration.
- Minor CSS adjustments for better table rendering.
- Moved `import` statements for Bootstrap CSS and JS to the top in `main.js`.
2024-08-08 14:55:47 +02:00
Kumi
437dfbd57e
feat: add clipboard and conversion functionality to main.js 2024-08-08 08:44:06 +02:00
Kumi
4e368015e1
chore: Remove unused CSS files 2024-08-08 08:39:11 +02:00
thecashewtrader
eb0cf80b42 add webpack for lean bootstrap js 2024-05-24 20:18:12 +05:30