Commit Graph
10 Commits
Author SHA1 Message Date
whoswhip 46615aba5b Refactor endpoints and update HTML for new API
Simplified /archive endpoint to return static HTML without dynamic content or database queries. Refactored CreatePaste method to accept a Paste object and conditionally write compressed or uncompressed content based on size. Added new /api/pastes/get endpoint for fetching paginated pastes in JSON format.

Updated archives.html to remove dynamic placeholders, using JavaScript for fetching and displaying pastes, and handling user authentication and pagination. Improved index.html with new font family and font weight for buttons. Updated paste.html to truncate long paste titles for display.

Removed unused using directive in Turnstile.cs. Updated Program.cs to include new API endpoint and refactored CreatePaste method.
2024-10-25 16:40:26 -04:00
whoswhip 2889921f12 Enhance rate limiting and mobile UI improvements for full mobile support!
Added new rate limiter policies "OneRequest" and "OneRequestPerIP" in `Program.cs`. Updated routing middleware and user authentication logic. Enhanced mobile navigation with a hamburger menu in multiple HTML files (`admin.html`, `user.html`, `archives.html`, `banned.html`, `error.html`, `login.html`, `paste.html`, `privatepaste.html`, `recent_pastes.html`). Introduced a notification system in `admin.html` and `login.html`. Updated CSS and JavaScript for better mobile responsiveness and user experience.
2024-09-10 19:29:21 -04:00
whoswhip 878cebacb6 Enhance null safety, UI, and SQL query handling
Improved null safety in `Program.cs` by using the null-conditional operator (`?.`) when accessing cookies. Modified SQL queries to exclude 'Unlisted' pastes and added checks to skip processing 'Private' or 'Unlisted' pastes. Adjusted the command to count total pastes to exclude 'Unlisted' pastes.

Updated `admin/user.html` to support multiple notifications, added functionality to copy the new password to the clipboard, and improved notification display and animation logic.

Removed a hardcoded paste link from `archives.html` which was for testing.

Enhanced `index.html` with a hamburger menu for mobile navigation, improved notification handling, and added CSS styles and media queries for better mobile support. Fixed minor formatting issues and improved code readability.
2024-09-09 21:41:06 -04:00
whoswhip 560ad071ab Add private pastes, user bans, and UI enhancements
Enhanced Program.cs with response caching, compression, CORS policy, and private paste handling.
Refactored user ban logic and added expiration date handling.
Improved admin.html with localization and overflow handling.
Introduced PrivatePaste and Punishment classes.
Enhanced Paste and User classes for private pastes and punishments.
Updated initialization logic for punishedUsers table.
Ensured salts are written back to config.json if generated.
Enhanced user.html with ban/unban functionality and animations.
Improved archives.html, dash.html, and index.html with new UI elements and styles.
Added asynchronous content loading and notifications to paste.html.
Introduced Encryption.cs for AES encryption and decryption.
Created banned.html for displaying error messages.
Added privatepaste.html with dynamic content, password protection, and user interactions.
2024-09-08 16:07:59 -04:00
whoswhip 071434efc9 Enhance security, add admin features, and improve UX
Removed unused cryptography directive and switched to BCrypt for hashing IPs and tokens with a configurable salt. Updated file paths for cross-platform compatibility. Added rate limiting to routes and new admin API endpoints for user management. Improved `config.json` handling and added random password generation.

Enhanced `admin.html` with search debounce, infinite scrolling, and updated CSS. Added password change functionality and notifications to `user.html`. Improved error handling in `archives.html` and refactored `index.html` for better readability. Corrected password character count in `signup.html`.
2024-09-07 18:57:18 -04:00
whoswhip f02e68b1d3 Enhance validation, logging, and UI/UX improvements
## COMMIT MESSAGE GENERATED BY COPILOT

Added JSON validation to multiple endpoints, ensuring valid JSON requests and improved error handling. Updated logging to use `DateTime.Now` and append to `logs.log` for specific actions. Enhanced `/api/accounts/login` with JSON validation and refactored for consistency.  Improved admin and user interfaces with search functionality, better date localization, and CSS adjustments. Enhanced error handling and feedback in `login.html` and `signup.html`, and improved search functionality in `archives.html`.
2024-09-07 13:59:33 -04:00
whoswhip 0e2aa78b5c Change Log 9/5/2024
- Search feature added to archives
2024-09-05 18:07:30 -04:00
whoswhip c3ac47171f Admin panel and punishments 2024-08-26 05:30:39 -04:00
whoswhip 47aed18919 Improvement to pastes archive, added navigator to the top of each page 2024-08-19 03:45:06 -04:00
whoswhip 7221d99b68 archive page has now been created 2024-08-19 00:35:09 -04:00