Commit Graph
17 Commits
Author SHA1 Message Date
whoswhip 57d9a4e3b2 Refactor paste.js to improve readability and maintainability; introduce ELEMENTS utility for DOM manipulation, enhance modal functionality, and streamline password handling for private pastes. Update user.js to correct API endpoint for user information retrieval. Add modal.js for reusable modal components and styles. Update paste.html to include modal.js and adjust edit button visibility. Minor fixes in main.js for consistent formatting. 2025-07-11 17:51:04 -04:00
whoswhip 57f1709032 Enhance paste management and user interface
- Updated `AuthController.cs` to include user `Type` in responses.
- Added `DeletePaste` and `ChangePasteID` endpoints in `PasteController.cs` with authentication and error handling.
- Removed `Logging.cs`, indicating a refactor of the logging mechanism.
- Implemented methods for deleting and updating paste IDs in `DatabaseService.cs`.
- Modified `SharpbinV2.Server.csproj` to exclude `logs` and `pastes` directories from compilation.
- Enhanced `paste.css` with styles for an edit icon.
- Introduced `userTypes` object in `dash.js` for better role management.
- Added delete button functionality in `paste.js` for authorized users.
- Updated `paste.html` to include edit and delete buttons for improved user experience.
2025-07-10 16:07:35 -04:00
whoswhip fddfeb6525 Improve AES encryption with dynamic salt handling
Updated `encryptAES` to use a randomly generated salt and
modified the return value to include the salt, IV, and
encrypted content in a single output. Adjusted `decryptAES`
to extract the salt and IV from the input, ensuring the
decryption key is derived using the same salt used during
encryption. Enhanced decryption process to utilize the
extracted IV for AES-GCM operations.
2025-07-09 01:07:18 -04:00
whoswhip ed98238c40 Improve paste handling and pagination logic
- Updated `PasteController.cs` to enhance visibility parameter handling and added methods for retrieving pastes with pagination and error handling.
- Added `UID` property to the `Paste` class for better identification.
- Refactored `Program.cs` to remove unused namespaces and improve response header handling.
- Enhanced `DatabaseService.cs` with new methods for retrieving pastes and user pastes, including better error handling.
- Adjusted pagination logic in `archive.js` and `dash.js` to start from page 1, improving user interface navigation.
2025-07-08 15:32:17 -04:00
whoswhip 3eb7374a07 Enhance user authentication and paste management
- Updated `AuthController.cs` to include token in `CreateSession` and improved validation for username and email.
- Refactored paste creation logic from `Program.cs` to a new `PasteController.cs`.
- Added email validation method in `HelperService.cs`.
- Introduced `CompressionService.cs` for handling string compression and decompression.
- Improved user experience with autocomplete and spellcheck in HTML forms.
- Enhanced date display in `archive.js` and refactored date formatting in `dash.js`.
- Updated API endpoints in `login.js` and `register.js` to reflect changes.
2025-07-06 22:55:29 -04:00
whoswhip cc0c6a8286 refactor(api): migrate account deletion from minimal API to controller 2025-07-06 19:33:19 -04:00
whoswhip 89e9673a00 Convert more authentication apis to controllers and session management
- Updated `AuthController.cs` to change unauthenticated response to `Unauthorized` and added a new `Logout` method for session handling.
- Removed the old logout endpoint in `Program.cs` and centralized logout logic in `AuthController.cs`.
- Added `GetSession` and `DeleteSession` methods in `DatabaseService.cs` to enhance session management.
- Updated API endpoints in `dash.js` to reflect new routing structure for authorized account info and logout.
2025-07-06 18:59:39 -04:00
whoswhip 73248e723a Refactor authentication and database handling
- Introduced `AuthController` for user registration and login.
- Added `DatabaseService` to manage user-related database operations.
- Created `HelperService` for utility functions like JSON parsing and token generation.
- Updated `Program.cs` to register new services and controllers.
- Modified `login.js` and `register.js` to use new API endpoints.
- Cleaned up project file by removing unused class and ensuring proper compilation.
- Overall improvements enhance application structure, security, and functionality.
2025-07-06 18:17:54 -04:00
whoswhip 73743399f1 Split code into classes to make the codebase look cleaner
Added a new favicon/icon
Add more checks before uploading a paste, changed alert to use the showNotification function
Added password modal for private pastes instead of using alert
Fix a paste page navigation in dashboard
Improve auth css
2025-05-23 18:54:29 -04:00
whoswhip 2126c3a078 Implement user profile and pastes retrieval features: add user.html and user.js for user display, create API endpoints for user data, and enhance UI with new styles and elements.
### Copilot Message
2025-05-19 15:12:51 -04:00
whoswhip 1382fb9f07 Refactor navbar implementation: replace navbar.js with main.js, update HTML references, and enhance button styles. Add author username to paste retrieval response and implement clipboard notification feature.
### Copilot Generated Commit Message
2025-05-19 02:11:24 -04:00
whoswhip 704d7149fc added logout api 2025-05-17 22:44:05 -04:00
whoswhip 2a25ab1ab8 Add user authentication and dashboard features
- Implemented login and registration forms with validation.
- Created dashboard layout to display user account information and pastes.
- Added JavaScript functionality for fetching account data and pastes.
- Styled authentication and dashboard pages with CSS.
- Introduced modals for logout and account deletion confirmation.
- Included error handling for user actions and API responses.

### Copilot generated commit message
2025-05-17 22:20:07 -04:00
whoswhip 94fb936b32 New page, decreased default maxfilesizem, add max title length. 2025-01-20 00:20:41 -05:00
whoswhip e0a2f20546 Change Bcrypt hashing to HMAC256 Hashing for ips only, add navbar, and exclude .env from git changes. 2025-01-18 00:31:55 -05:00
whoswhip 8f42dd55ae Add server side syntax validation, and paste view counter functionality. Improve frontend syntax highlighting, add more syntax highlighting options. Improve code block styling (majority of it is from github dark theme), better addContent function since highlightjs lets you use the code blocks for plain text. 2025-01-17 23:37:30 -05:00
whoswhip 01a637f5dd Add frontend files, improve backend. 2025-01-17 21:17:37 -05:00