77 Commits

Author SHA1 Message Date
a60bb5819a
Latest SPT Version Bug
This fixes an issue with the latest SPT version query sorting the version numbers incorrectly.
2025-01-28 22:56:36 -05:00
4b4abceb1f
Model Type Casting 2024-10-12 13:18:04 -06:00
8448e54f7c
Loads relationship when building download link. 2024-10-06 21:56:32 -06:00
1521e50dcb
Eager Load User Relationships in Scout Model Method 2024-10-01 09:25:05 -04:00
293e52726b
Eager Load Mod Relationships in Scout Model Methods 2024-10-01 09:20:17 -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
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
6b7efb87ec Merge remote-tracking branch 'upstream/develop' into impl/download-tracking 2024-09-24 14:13:17 -04:00
4e33dd9ec5
Updates About Field Default
Updates the about column to have a default of an empty string. Curse you, MySQL!
2024-09-24 00:46:44 -04:00
2cd8e9fa86
Global Search Fixes
Fixes an issue with the global search box not functioning correctly with keyboard navigation.
2024-09-24 00:42:26 -04:00
6d6670e246 setup download counting 2024-09-20 10:37:16 -04:00
cf381c9e7d
Method syncWithoutDetaching Expects Array 2024-09-17 17:19:39 -04:00
c3f9fcf19f
Minor User Model Changes
- Added a few docblock comments
- Pint reordered methods (for some reason)
- Added type casts for id, hub_id, created_at, and updated_at
2024-09-17 15:33:42 -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
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
d1b142c2ee
Reworked Mod Listing
Updates the mod listing components to be a little more friendly.
2024-09-13 00:08:00 -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
aaf8ee4249
Chaperone
Add chaperone calls to all of the relationships that support it.
2024-09-11 15:09:38 -04:00
a07e64ff51 Merge remote-tracking branch 'upstream/develop' into user-profile-info 2024-09-10 11:57:59 -04:00
164a649cd4
Removes old SPT versions from search results
The global search results are now limited to mods tagged with the last three minor SPT versions, like the mod listing filters.

I'm not 100% sure about this change. Open to suggestions and revisiting this in the future.

Resolves #26
2024-09-08 22:06:52 -04:00
4ba181900e add test 2024-09-01 23:42:44 -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
97ed77dad7 use livewire for profile
also following is in but needs a little more work (future problems)
2024-08-30 10:32:09 -04:00
239b10ca9d user stack and follows WIP 2024-08-29 21:50:59 -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
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
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
35cd00e39d
Adds Cover Photo Field
Adds the cover photo field to the Jetstream edit profile form.
2024-08-07 16:23:55 -04:00
55273e5a90
Hub Imports of User Avatars and Cover Photos
TODO: Cover photos need to be added to the profile page so users can edit them.
2024-08-03 17:36:33 -04:00
11453db596
Model Comments, Yay! 2024-08-03 17:36:33 -04:00
115f81fe96
Basic structure to load user profile view 2024-08-03 17:34:41 -04:00
c6f252ace7
Mod Version Dependency Updates
- Handles circular mod version dependencies
- Optimizes mod show query to only pull the versions relationship
- Adds a mod dependency factory
- Refactored tests to use mod dependency factory
- Adds mod dependency generation into the default seeder
- Adds unique index on mod dependencies table
- Adds mod dependencies on the mod show view
2024-08-01 17:15:02 -04:00
f94204e978
Mod Publish Dates (#17) 2024-07-31 19:53:09 -04:00
203626d043 run pint? 2024-07-31 15:14:22 -04:00
82a466eb58 update scope and tests
to not include null published at fields
2024-07-31 14:06:56 -04:00
f04fbab5c6 add published scope 2024-07-26 09:35:09 -04:00