68 Commits

Author SHA1 Message Date
8083f24324
Dep Updates & Type Casting Envs 2025-02-05 17:34:18 -05:00
1c6a749d71
Larastan Level 6 2025-01-30 20:49:56 -05:00
a5dcaed179
Larastan Level 5 2025-01-30 15:44:05 -05:00
7da825659d
Additional Rector Updates 2025-01-30 00:50:28 -05:00
cb5c3caad8
Rector Changes 2025-01-30 00:23:55 -05:00
7559c85276
API Mod Download Links
Adds the tracked download links to the API.
2024-10-12 13:20:40 -06:00
f00c1a136b
Prevents the API From Lazy Loading 2024-10-12 13:19:54 -06:00
80f3da13b9
Optimize User Follow Components
Much better, still not perfect. The mobile and the desktop components are being rendered twice, and each of their methods are running twice as well. Going to see if I can modify the structure to get away with only using one.
2024-10-05 14:09:22 -04:00
30985541e7
Fixes PHPStan Issues 2024-09-30 22:54:15 -04:00
1127f2b9df
Eager Load User Mods 2024-09-30 22:53:32 -04:00
0d043ff880
Username Handling
- When a new user is created using Discord OAuth information, if the username returned from Discord is already taken, append randomness to the end of the username.
- Validates that a new account name is unique.
- Validates that an updated account name is unique.
2024-09-30 16:43:31 -04:00
caefd6dbb2
Discord Avatar Import
Imports the user's avatar from discord when a new user is created through OAuth.
2024-09-30 14:06:37 -04:00
746fed1746
OAuth Management
Adds a edit-user-profile section to allow a user to remove an OAuth connection from their account when they have a local account password set.
2024-09-27 20:41:36 -04:00
88aa9b1ad8
Discord OAuth
Creates the base structure for Discord OAuth.
2024-09-26 16:55:44 -04:00
7e1c66f250
Download Count Review
Reviewed the download count PR work and made some changes:
- Updated the download link route to include the mod's slug for easier identification.
- Moved rate limiter from the route middleware (the entire controller) to just the show method in the controller.
- Created a ModVersionPolicy that the controller can check against.
- Moves download increment logic into the model.
- Defers the call to the download increment logic (now run in the background)
- Updated the route to have a name, and the downloadUrl methods to build the URL dynamically using the route name.
- Wrote some tests to check URL building, download counting, and rate limiting.

# Conflicts:
#	app/Http/Controllers/ModVersionController.php
#	app/Providers/AppServiceProvider.php
2024-09-25 17:04:46 -04:00
Refringe
deca405976 Pint PHP Style Fixes [no ci] 2024-09-25 19:15:41 +00:00
6b7efb87ec Merge remote-tracking branch 'upstream/develop' into impl/download-tracking 2024-09-24 14:13:17 -04:00
691f352d01
User Follow Components
Updates the user follow component to two smaller components. Still needs to be optimized.
2024-09-24 00:40:33 -04:00
8a156d8a43 update controller
to recalculate downloads and return 307 specifically
2024-09-20 10:46:26 -04:00
6d6670e246 setup download counting 2024-09-20 10:37:16 -04:00
db259e2689
Removes PHPStan Errors 2024-09-17 17:19:07 -04:00
be05d2693e
Remove Controller User Model Binding
We're going to being in the user id from the URI instead so we can do a custom lookup on it.
2024-09-17 14:51:32 -04:00
579a26a360 Merge branch 'profile-data' into user-profile-info 2024-09-17 17:32:46 +00:00
2cca45bcea
Removes Array Definition Docblock Information
Part of moving back to PHPStan level 5 means we can remove some of these. They're very busy and don't give enough context to outweigh the ugly.
2024-09-17 13:30:11 -04:00
0f3c7e03d0 Merge remote-tracking branch 'upstream/develop' into user-profile-info 2024-09-17 09:39:43 -04:00
297937a2ea
Scribe API Documentation
Installs Scribe for (mostly) automatic API documentation. Does a pretty good job and it's pretty painless to set-up. I'll have to configure it to work in the CI and to ensure that the static files are being pushed to production as they should be, but this is a good start.
2024-09-17 01:41:00 -04:00
d70a38bf08
API Filters Clean-up
Generalized similar API filter methods and moved them into a FilterMethods trait. Rewrote ModFilter and UserFilter methods to use the general trait methods.
2024-09-17 01:38:28 -04:00
2199e34569
Mod Updated Column
Updating a ModVersion model now updates it's parent Mod's updated_at column.
2024-09-16 15:43:25 -04:00
743ed27bd0 Merge remote-tracking branch 'upstream/develop' into user-profile-info 2024-09-16 09:38:30 -04:00
45a211b66d
Listing Query & Relationship Clean-up
Rebuilt the filtering queries and many of the mod-to-modVersion-to-sptVersion relationships.

Resolves #38
2024-09-15 23:05:38 -04:00
58e8adb730
Adds TODO for query. 2024-09-13 00:17:13 -04:00
d9b7d6fcc8
Resolves Remaining Larastan Issues 2024-09-12 13:19:52 -04:00
cdaddbb44f Merge remote-tracking branch 'upstream/develop' into user-profile-info 2024-09-12 09:12:41 -04:00
bbb8fab1a1
Resolves Some Larastan Issues 2024-09-11 23:08:58 -04:00
73cb9a9ccf Merge remote-tracking branch 'upstream/develop' into user-profile-info 2024-08-31 15:17:26 -04:00
16e3a67efd
Query Optimization
- Download counts were taking too long to calculate dynamically, so we're keeping track of a total count with observers and queued job.
- Optimized the SQL used to order a mod listing by mod version update times.
2024-08-31 01:19:22 -04:00
09771d233a
Mod Filter Page - SPT Versions
Updated the mod filter page to only show SPT versions that have been tagged by mod versions.
2024-08-30 23:13:46 -04:00
6c86d6b370 Merge remote-tracking branch 'upstream/develop' into user-profile-info 2024-08-30 10:36:41 -04:00
1783a683ed
Semvar & Automatic Resolution - Remix
- Updated the SptVersion and ModVersion dependancies to resolve *all* compatible versions and introduced new relationships to pull just the latest compatible version. Had to rewrite a *bunch*, but it should be much more capable now. It can be expensive to resolve these properties when iterated over, so *make sure they're eager loaded using the `with` method when you're building the queries*.
- Updated the mod listing Livewire component to save the filter options within the PHP session instead of in browser local storage. *Much* cleaner.
- Removed caching from homepage queries to see how they preform on production. Will add back later.
- Updated ModVersion factory to create SptVersions if there are none specified.
- Probably lots of other changes too... I need to make smaller commits. :(
2024-08-29 15:46:10 -04:00
a7cd60a164 add user follows 2024-08-28 16:59:28 -04:00
db578071e4
SPT Semvar & Automatic Resolution
This update gives mod versions a supported SPT version field that accepts a semantic version. The latest supported SPT version will be automatically resolved based on the semvar.

Next up: I need to update the ModVersion to SptVersion relationship to be a many-to-many and expand the resolution to resolve multiple versions.
2024-08-22 17:04:07 -04:00
7fe1fad01b
Mod Listing Page Changes
- Updated visual look of the listing to include all filters at the top of the page
- Updated SPT version filter to be able to filter more than one version at a time (defaults to current minor version)
- Moved location of Livewire components into subfolder
- Moved query building methods for the listing into a `ModFilter` class
- Adds a `isLatestMinor` method on the SptVersion model that checks if the current version number is of the latest minor version release
- Livewire filter properties are now saved to the URL when changed
- Updated the top navigation link to include a "Mods" menu item.

TODO:
- Search codebase for "TODO". I've left notes. :|
2024-08-15 17:57:35 -04:00
651979ccea Merge remote-tracking branch 'upstream/develop' into impl/mod-listing-page 2024-08-10 14:15:11 -04:00
593b44150c
Resolves Mod Detail Page Version Issue
The latest version on the mod detail page was being selected by created date instead of highest version number. This has been resolved. Also adds a test for this issue.
2024-08-09 12:35:46 -04:00
c1e73dc73b Merge remote-tracking branch 'upstream/develop' into impl/mod-listing-page 2024-08-09 11:31:00 -04:00
7acdee1b6c switch to using livewire 2024-08-09 10:15:05 -04:00
23a9cabf99
Implements API Sorting
You can now sort mod and user data by whitelisted attributes.
2024-08-08 18:18:05 -04:00
3a334033fe
API Updates
Brings the API in close sync to the rest of the site.
- Adds resources for License, UserRole, and ModVersion models
- Adds filtering on attribute data
- The `includes` data is now disabled by default and available conditionally
2024-08-08 16:11:50 -04:00
0ed25fec03
User API Updates
Adds user profile links to the user API resource.
Fixes structure of relationship data and link sections.
Adds parameter to include related user data when requesting mod data.
2024-08-07 23:30:09 -04:00
b868b5a75c setup mod index pagination 2024-08-07 14:33:11 -04:00