Commit graph

151 commits

Author SHA1 Message Date
Aaron Powell
216f34144b Adding more info to migration history 2025-12-19 16:01:14 +11:00
Aaron Powell
b07ad7d9a9 Adding migration history tracking 2025-12-18 11:12:41 +11:00
Aaron Powell
8600bae9ec Overhauling the migrations to be a bit more explicit in the steps that they go through.
Changed the IMigration interface to have a series of steps, first a method to indicate that the migration should run, next some pre-checks (like is it in a container), and lastly the actual execution.

Next, the settings and folder migrations are broken into individual migrations, which means that it's a lot more obvious which ones run and which ones are skipped.
2025-12-18 10:57:26 +11:00
Pat Hartl
9d8f8cc238 Error handling for migrations 2025-12-16 19:13:14 -06:00
Pat Hartl
f345b49263 Apply SemVer sort ordering 2025-12-16 00:20:48 -06:00
Pat Hartl
1679719ad4 Add application migrations 2025-12-13 00:27:54 -06:00
Pat Hartl
2c7a835efa Move clients out of Services directory 2025-12-13 00:26:43 -06:00
Pat Hartl
369f298aaf Expression bodies 2025-12-11 02:06:18 -06:00
Pat Hartl
17fa802c19 Implementation of script debugger component with RPC via SignalR 2025-12-10 20:55:38 -06:00
Pat Hartl
b93c0f6732
Merge pull request #374 from LANCommander/development
Refactored Importing / Legacy Game Importing
2025-12-05 14:40:12 -06:00
Pat Hartl
414f728181 Inherit IKeyedModel, restrict ManifestHelper.Write to only manifests 2025-12-04 23:43:25 -06:00
Aaron Powell
5e305fc0b0 Endpoint for saves uploading was missing Game from it 2025-12-04 14:38:09 +11:00
Aaron Powell
d0f6782d3e Adding a file name when uploading
The file name is ignored by the server, but if you don't add one, you can't attach a file to the form
2025-12-04 13:35:27 +11:00
Pat Hartl
6dfc0906ac Refactor launcher library importing, manifests
Switched the library importing in the launcher to work based on a queue. As a new game is added to the queue, it should find any related data and also add it to the queue. This should result in an easier to maintain importer while reducing the load on the launcher's DAL. This may result in more RAM usage while importing. Local manifests have also been refactored to match manifests in import/export LCX files, removing the old manifest format. This is a large breaking change that will probably break existing game installations. A migration will probably have to be created.
2025-11-29 18:24:27 -06:00
Pat Hartl
e6c12b4809 Refactor script debugging
Instead of providing delegates to a ScriptClient singleton, script execution now relies on dependency injection for debugging. This can be handled by registering an implementation of IScriptDebugger. Multiple script debuggers are supported. These changes required the creation of a PowerShellScriptFactory to handle DI of the service provider to the script.

In the case of LANCommander, "debugging" scripts really just gives an opportunity for the application to break after a script's execution and provide a poor-man's pty. This could be expanded upon in the future to hook directly into PowerShell's debugging functionality, but would require a substantial refactor to script execution.
2025-11-26 01:09:52 -06:00
Pat Hartl
a549f06a85 Fix service registration in CLI. Create abstraction for external script runners. 2025-11-23 20:54:56 -06:00
Pat Hartl
edc3e706d1 Check if the game archive can stream before trying to download 2025-11-20 22:05:02 -06:00
Pat Hartl
256b46e823 Fix storage of authentication token 2025-11-19 00:36:03 -06:00
Pat Hartl
9ad5021d9e Implement RPC keepalive method as Task 2025-11-13 21:04:13 -06:00
Pat Hartl
4535d9891a Add chat read status, badges to avatars, avatars for groups 2025-11-12 18:26:25 -06:00
Pat Hartl
ad058e87d7 Add method for getting users 2025-11-11 01:10:29 -06:00
Pat Hartl
37eebfde9c Add hub method to get stripped list of users 2025-11-10 18:06:55 -06:00
Pat Hartl
acb91f8484 Fix login/logout UX
- Moves authentication back to a /Authenticate page route
- Flatten the namespaces of page components
- Implement top-level layouts as windows
- Move handling of redirecting to /Authenticate with component inside of an AuthenticatedLayout
- Use individiual injected services instead of SDK.Client
- Wipe out tokens on logout
- Process logout even if server can't be reached
2025-11-07 20:19:13 -06:00
Pat Hartl
8f89f6f816 Avoid null address throwing exception 2025-11-07 00:25:53 -06:00
Pat Hartl
5a9606bf71 Fix redistributable not installing if no archives exist 2025-11-05 18:59:02 -06:00
Pat Hartl
a92c7be6ec Enhance chat list
- Added SafeAvatar component for retrieving user avatars with fallback to initials
- Added a title/name for chat threads
- Moved chat input to a separate component
2025-11-03 23:27:05 -06:00
Pat Hartl
7a562cdb10 Fix authentication limbo in launcher 2025-11-03 23:24:47 -06:00
Pat Hartl
e98d4d449a Auth with RPC, simplify chat delegates, load threads and implement sending messages 2025-10-28 22:21:16 -05:00
Pat Hartl
ede0e814a5 Change how windows are created. Refactor SignalR client to be named subscriber. Call ChatClient static methods on response from SignalR chat client. Fix dependency loop with chat. 2025-10-25 22:00:50 -05:00
Pat Hartl
d85e716bbb Add cancel install to launcher
Fixes #293
2025-10-15 21:26:40 -05:00
Pat Hartl
c4217d7b41 Refactor HTTP streaming
Greatly reduces the amount of memory usage when streaming from the server by:
1. Shedding use of an internal MemoryStream
2. Using HttpCompletionOption.ResponseHeadersRead to start reading the stream without loading all of the HttpContent into memory
2025-10-09 02:16:20 -05:00
Pat Hartl
41f9191745 Register server configuration source refresher 2025-10-08 19:53:05 -05:00
Pat Hartl
cf73dca217 Increase debug logging 2025-10-08 19:51:44 -05:00
Pat Hartl
694b8b9842 Use SettingsProvider when getting any settings
SettingsProvider uses IOptionsMonitor to maintain the current value of settings. This gets updates on YML file changes and since it's a single instance (instead of injecting IOptions<Settings>), consumers always have the latest values.
2025-10-06 20:29:34 -05:00
Pat Hartl
2b30158764 Implement debounce to avoid thrashing disk on settings update 2025-10-06 19:25:24 -05:00
Pat Hartl
c6bcb7e920 Refactor KeepAliveService to rely on IConnectionClient 2025-10-05 19:30:59 -05:00
Pat Hartl
f5cdea1afc Handle connection state based on SignalR connection state 2025-10-05 17:52:37 -05:00
Pat Hartl
382a270b03 Simplify connection state management 2025-10-05 17:13:47 -05:00
Pat Hartl
0466fd38bd Use SettingsProvider 2025-10-02 20:07:44 -05:00
Pat Hartl
ab73e9c4e0 Rework SettingsProvider 2025-10-02 19:41:47 -05:00
Pat Hartl
4cbf672bb1 Fix auth, API response deserialization 2025-10-01 18:45:30 -05:00
Pat Hartl
5cab1f3618 Remove old SettingsService, replace with Options pattern 2025-09-29 19:49:09 -05:00
Pat Hartl
aaf65fcf09 Runnable launcher using new client 2025-09-27 16:39:54 -05:00
Pat Hartl
7f99fb481c Use Options pattern, 2025-09-26 00:51:02 -05:00
Pat Hartl
d875377f15 Rename SDK services -> clients, implement new configuration, use dependency injection for clients 2025-09-24 20:58:23 -05:00
Pat Hartl
9f17f92b78 Fix auth implementation 2025-09-23 00:57:48 -05:00
Pat Hartl
a648852292 Implement SDK using dependency injection
- API requests are now made through the ApiRequestBuilder with DI supplied via the ApiRequestFactory singleton
- Reliance on RestSharp and WebClient has been removed in favor of HttpClient
- Auth token is now being tracked by the ITokenProvider
- Network information (MAC address, broadcast addresses, IP address) is now supplied with the INetworkInformationProvider singleton
- Connection state is now being maintained by the ConnectionService, with a reliance on RPC (SignalR websocket) reporting actual connection state without relying on pings
- All download streams are now provided as a TrackableStream
- Singleton Client class has been removed. All usage of the SDK should happen via Dependency Injection

This is just a base, non-functional refactor of the SDK to use DI. The following changes to the rest of the codebase need to be made:
- Usage of the SDK client in the launcher needs to be replaced in favor of injecting SDK services
- PowerShell cmdlets need to be able to have services injected. Most likely a separate scope will have to be opened up per PS runtime?
- Usage of the SDK client in the server needs to be replaced in favor of injecting SDK services. This should be minimal and should actually provide benefit when it comes to executing client-like features (scripts mostly) without needing a fully configured client that maintains connection state.
- Configuration of the client needs to be implemented using ILANCommanderConfiguration
2025-09-22 00:29:51 -05:00
Pat Hartl
11da187920 Add debug handler 2025-09-09 18:39:56 -05:00
Pat Hartl
0eb233ac30 Move file manager component to UI project 2025-09-06 12:57:15 -05:00
Pat Hartl
aa6096b9e2 Merge branch 'feature/chat' 2025-08-29 00:57:38 -05:00