@@ -42,14 +41,9 @@
private FileSelectModal FileSelectModal;
private LazyLoader LazyLoader;
- protected override void OnInitialized()
+ protected override async Task OnInitializedAsync()
{
- Access = new WingsFileAccess(WingsApiHelper,
- null!,
- CurrentServer,
- null!,
- null!
- );
+ Access = await ServerService.CreateFileAccess(CurrentServer, null!);
}
private async Task Load(LazyLoader lazyLoader)
diff --git a/Moonlight/Shared/Components/ServerControl/Settings/PythonFileSetting.razor b/Moonlight/Shared/Components/ServerControl/Settings/PythonFileSetting.razor
index 80e8ea9..7cc041f 100644
--- a/Moonlight/Shared/Components/ServerControl/Settings/PythonFileSetting.razor
+++ b/Moonlight/Shared/Components/ServerControl/Settings/PythonFileSetting.razor
@@ -7,7 +7,7 @@
@using Moonlight.App.Services
@inject ServerRepository ServerRepository
-@inject WingsApiHelper WingsApiHelper
+@inject ServerService ServerService
@inject SmartTranslateService SmartTranslateService
@@ -42,14 +42,9 @@
private FileSelectModal FileSelectModal;
private LazyLoader LazyLoader;
- protected override void OnInitialized()
+ protected override async Task OnInitializedAsync()
{
- Access = new WingsFileAccess(WingsApiHelper,
- null!,
- CurrentServer,
- null!,
- null!
- );
+ Access = await ServerService.CreateFileAccess(CurrentServer, null!);
}
private async Task Load(LazyLoader lazyLoader)
diff --git a/Moonlight/Shared/Components/ServerControl/Settings/ServerResetSetting.razor b/Moonlight/Shared/Components/ServerControl/Settings/ServerResetSetting.razor
index 0af9551..6179546 100644
--- a/Moonlight/Shared/Components/ServerControl/Settings/ServerResetSetting.razor
+++ b/Moonlight/Shared/Components/ServerControl/Settings/ServerResetSetting.razor
@@ -7,8 +7,6 @@
@inject SmartTranslateService SmartTranslateService
@inject AlertService AlertService
@inject ToastService ToastService
-@inject WingsApiHelper WingsApiHelper
-@inject ConfigService ConfigService
@inject ServerService ServerService