Adds a dynamicFormat macro/method on the Carbon facade to handle the logic of conditionally formatting the dates based on the difference to the current time.
Logic pulled from #48 (Thanks Waffle!)
Issue #45
- 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.
- 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. :(
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.
- 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. :|
- Updates the import script to import the full mod teaser text, up to 255 characters.
- Updates mod detail page to show teaser in the main detail card.
- Updates mod listing component to show the first 100 characters of the teaser.
- Adjusts padding on the mod listing component.
Resolves#22
Adds a `Number:downloads()` macro to format the number of downloads depending on how many there are. Example: 1259000 is converted into 1.25M, 125900 is converted into 125.9K.
Updated the views to use this macro. Also included a title tag with the exact number so they can be viewed on hover.
This change removes the `latestSptVersion()` relationship, which fetched the latest mod version for the latest SPT version, with a more simple `latestVersion()` relationship that simply fetches the latest mod version based on the mod version, version number field.
This is less complicated and much less confusing.
The global search results now include the SPT version number the latest version of the mod is compatible with. Additionally, mod thumbnails and the SPT version numbers
Homepage queries have been further optimized and are now cached for 5 minutes.
The mod-to-user relationship has been modified to be a many-to-many relationship. Mods can now have multiple authors, and an author can have multiple mods.
Mostly finished with the profile and navigation work. Buttons elsewhere on the site still need to be restyled. Search needs to be redone with the recent navigation bar changes.
- Updates dependancies
- Added time to mod component
- Implement naturalSort function into homepage queries
Short todo:
- Migrate top navigation from old-build
- Mod detail page
Worked on:
- Mod component templating
- Added dark mode styles for homepage
- Added benchmarking to the wolt import command
- Added MySQL natural sort function
Short todo:
- Add updated time to mod component
- Implement naturalsort function into homepage queries and measure performance difference
- Migrate top navigation from old-build