Commit graph

47 commits

Author SHA1 Message Date
Pat Hartl
66abc6e59e Implement infinite loading with chat thread
- Chat messages are now loaded based on scroll position
- Read status is now updated and set by last message read
- Reworked script importing by using ScriptProvider
2026-01-11 14:38:24 -06:00
Pat Hartl
ce38a0f252 Fix sync relationships not updating the entity 2025-12-03 19:33:01 -06:00
Pat Hartl
5b444f91e7 Make SyncRelationCollectionAsync only match existing records 2025-12-03 18:56:35 -06:00
Pat Hartl
54400fdb10 Refactor server importers
Refactors server importers to better handle dependencies on other data in the queue.
2025-12-03 02:22:37 -06:00
Pat Hartl
add770b227 Refactor Settings
Settings for the server are now combined with the settings from the SDK. This introduces a large breaking change and a migration should be created. This refactor utilizes .NET Configuration and the Options pattern. This will allow for the overriding of any setting using envionment variables. It also means that Settings.yml can be used to override any .NET configuration. A SettingsProvider implementation was created, and any updating of settings was changed from SettingsService.SaveSettings() to SettingsProvider.Update(s => { ... })
2025-11-16 12:31:25 -06:00
Pat Hartl
086c41dcb8 Set created by based on ID 2025-08-15 02:15:20 -05:00
Pat Hartl
5a50d80326 Revert "Fix lookup of game metadata when adding new game"
This reverts commit 2b711b5017.
2025-08-15 02:08:39 -05:00
Pat Hartl
2b711b5017 Fix lookup of game metadata when adding new game 2025-08-10 18:08:14 -05:00
Pat Hartl
a5dab5c094 Merge branch 'main' into refactor/optional-import-export
# Conflicts:
#	LANCommander.Server.Services/GameService.cs
#	LANCommander.Server.Services/ImportService.cs
#	LANCommander.Server.Services/Importers/GameImporter.cs
#	LANCommander.Server.Services/UserService.cs
#	LANCommander.Server/UI/Components/AvatarUploader.razor
#	LANCommander.Server/UI/Components/ImportUploadDialog.razor
2025-07-25 18:42:39 -05:00
Pat Hartl
47d5b0b58a Working selective export (at least for manifest) 2025-07-25 17:57:33 -05:00
RattleSN4K3
b09752e458 Fix storing several entities (such as Gamesaves) properly
Referenced properties were not properly loaded causing constraint errors on saving.
2025-05-24 18:22:06 +02:00
Pat Hartl
1e7578772f Put addons (mods/expansions) nested under base game in list 2025-05-23 02:17:06 -05:00
RattleSN4K3
028e3bfe0d Option to delete selected Media entries 2025-05-18 01:02:52 +02:00
Pat Hartl
a47f3feeb7 (Mostly) fix launcher download
Fixes #191
2025-03-16 20:13:35 -05:00
Pat Hartl
78da00a83d Change namespace of abstractions 2025-03-16 14:35:53 -05:00
Pat Hartl
51ca1dbe48 Fix CreatedBy / CreatedOn population
Fixes #199
2025-03-09 15:28:46 -05:00
Pat Hartl
6e49a3acbe Fix first time setup for MySQL/MariaDB, fix object unknown error for paths setup
Fixes #187
2025-02-27 20:11:40 -06:00
Pat Hartl
7fdbc62063 Fix potential issues with first time startup path creation 2025-02-26 00:59:50 -06:00
Pat Hartl
a5471aa9c2 Fix adding data with relationships 2025-02-23 08:50:16 -06:00
Pat Hartl
fe998642e1 Fix check for existing entities
Fixed role creation
2025-02-21 22:48:29 -06:00
Pat Hartl
71911fa617 Increase performance of fetching game details 2025-02-16 13:24:23 -06:00
Pat Hartl
16b903d9f8 Fix importing existing games 2025-02-09 19:58:25 -06:00
Pat Hartl
b28e8a51ee Fix auditing
The way updates are being handled means that the auditing interceptor doesn't work as the entities are not showing in the change tracker at that stage as modified. Added the auditing to BaseDatabaseService instead.
2025-02-09 18:53:40 -06:00
Pat Hartl
2909f151df Add tags to cache entries 2025-02-09 01:37:31 -06:00
Pat Hartl
cc5dd25136 Fix script editing 2025-02-04 20:58:08 -06:00
Pat Hartl
981aed208f Fix archive uploading 2025-02-03 01:42:14 -06:00
Pat Hartl
283873330b Fix updating of :1 relationships, only process added/removed entities in :* relationships 2025-02-02 18:50:22 -06:00
Pat Hartl
6081edfb4f Update relationships 2025-02-02 14:58:07 -06:00
Pat Hartl
af08645396 Remove use of DatabaseServiceFactory, update service dependency injection 2025-02-01 02:21:34 -06:00
Pat Hartl
2c5bbed8d5 Increase API performance 2025-01-25 12:46:24 -06:00
Pat Hartl
d0a3f8d334 Fix change tracking for many relationships
Fixes #167
2025-01-24 21:32:05 -06:00
Pat Hartl
5ddb79b00a Fix first time setup 2025-01-22 20:54:41 -06:00
Pat Hartl
7c9d92e0dd Fix server importing 2025-01-16 03:08:43 -06:00
Pat Hartl
a7a3b266ca Fix database service trying to project to the same generic type 2025-01-14 00:09:32 -06:00
Pat Hartl
61d1a10d74 Refactor import dialog, add storage location selector 2025-01-08 17:10:03 -06:00
Pat Hartl
5de9eccce1 Adjust Blazor server-side to pull data with new context 2024-11-25 22:29:56 -06:00
Pat Hartl
1dda11dd0a Switch dependency injection for services that access database 2024-11-22 02:04:04 -06:00
Pat Hartl
00b9ca5953 Rename service and repository methods to async 2024-11-12 18:32:46 -06:00
Pat Hartl
3440345868 Add ability to project to another datatype in repo
This commit adds the ability for database requests to be projected to another datatype using AutoMapper. This is extremely useful for grabbing large amounts of data from the database and mapping it to another datatype without the overhead of mapping it post-query.
2024-11-11 18:18:59 -06:00
Pat Hartl
8996c04c83 Add eager loading to repo. Move semaphore to DbContext. Inject DbContext instead of factory to open less connections 2024-11-07 01:40:05 -06:00
Pat Hartl
25a4766b7d Use semaphores to make DbContext access in a repository safer 2024-10-30 18:15:02 -05:00
Pat Hartl
24acb5e1bd Cache service calls from database for all of entity type for 30 seconds 2024-10-30 17:44:10 -05:00
Pat Hartl
42ca5c323a WIP MySQL concurrency fixes
- Removed the Blazor authentication pages and went back to Razor pages
- Fixed issues with dashboard charts that were pulling data on render and causing the database context to be open longer than it should
- Switched back to UserManager and RoleManager
- Temporarily disabled authentication state in pages that might try to use user claims/roles
- Reverted spacing changes to forms to allow for validation messages
- Moved initialization of database connection to database context
- Updated PostgreSQL provider
- Rescaffolded MySQL migrations
- Added a bunch of logging stuff that should eventually be stripped out
2024-10-21 20:06:52 -05:00
Pat Hartl
2056b06207 Working new login page 2024-10-18 19:15:05 -05:00
Pat Hartl
91829f601d Enable navigation properties for user roles, use service in place of managers 2024-10-16 01:54:51 -05:00
Pat Hartl
2805f34449 WIP fix for MySQL connection concurrency issues
This is a large commit. There are a number of things that this commit does to try to fix various issues that were occurring when the database provider was set to MySQL:
- The DAL `Repository` has been completely refactored to follow best practices. The repository is now being injected into services instead of the database context itself. This allows the DI to handle the repository's lifetime instead of creating a new repository for every transaction and sharing the context across repositories. As part of these changes, there is no more allowed usage of `IQueryable` and all service/repository methods must actually execute database queries before their return. This is to ensure that the context does not stay open longer than it needs to. Abusing `IQueryable`s by tossing them into Blazor components seems to be a big no-no.
- Some deletion behaviors on relationships have been tweaked as MySQL wasn't able to apply migrations with behaviors that were contradictory.
- A `ConnectionInterceptor` was added to try to keep track of `DatabaseContext` lifetimes. This is really only for debugging and should be put into `#if DEBUG` regions. This helped identify some potential issues where some contexts were basically never closing, causing the MySQL connector to not function.
- Docs for generating migrations have been updated to reflect the addition of being able to specify the database provider and connection string when adding a migration, avoiding the need to edit `Settings.yml`
- The application can now be put into a pause state on startup by adding the `--debugger` argument when used from the command line. When a debugger is attached, it resumes execution.
- The application can now log to Seq when using debug build
- Service lifetime on `DatabaseContext` has switched to transient. This may be reverted in the future.
- Lazy loading has been disabled for debugging purposes. It didn't directly help the concurrency issues, but it needs to be tested individually to be re-enabled.
- All usage of `UserManager`, `RoleManager`, and `SignInManager` have been removed from all controllers, pages, and Blazor components. Functionality has been moved to `UserService` and `RoleService`. This might have done the most amount of help, but could probably be improved upon in the future by not relying on them and instead having our own implementation.
- Application startup migrations and server autostarts have been disabled temporarily. There might be an issue of `DatabaseContext` lifetimes that spawn from this.
2024-10-13 20:42:45 -05:00
Pat Hartl
91ee1d47a9 Move data and service layers to separate projects, update packages 2024-10-07 18:04:26 -05:00
Renamed from LANCommander.Server/Services/_BaseDatabaseService.cs (Browse further)