Webserver - Add option to enable remote access

This commit is contained in:
Robert committed 2025-02-16 12:05:26 +01:00
1 parent 3367280576
commit 37b8c2c3e9
5 files changed
+27 -17

No files matched your search

@@ -145,6 +145,22 @@
</StackPanel>
</Grid>
<Border Classes="card-separator" />
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0">
<TextBlock>Enable remote access</TextBlock>
<TextBlock Classes="subtitle" TextWrapping="Wrap">
By default the web server can only be accessed by applications running on your own computer, e.g. supported games.
</TextBlock>
<TextBlock Classes="subtitle warning" TextWrapping="Wrap">
Enabling remote access allows you to access Artemis from other devices on your network, depending on your router even the outside world.
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<ToggleSwitch IsChecked="{CompiledBinding WebServerRemoteAccess.Value}" OnContent="Yes" OffContent="No" MinWidth="0" Margin="0 -10" />
</StackPanel>
</Grid>
<Border Classes="card-separator" />
<Grid RowDefinitions="*,*" ColumnDefinitions="*,Auto">
<StackPanel Grid.Column="0">
@@ -167,6 +167,7 @@ public class GeneralTabViewModel : RoutableScreen
public PluginSetting<double> CoreRenderScale => _settingsService.GetSetting("Core.RenderScale", 0.5);
public PluginSetting<int> CoreTargetFrameRate => _settingsService.GetSetting("Core.TargetFrameRate", 30);
public PluginSetting<bool> WebServerEnabled => _settingsService.GetSetting("WebServer.Enabled", true);
public PluginSetting<bool> WebServerRemoteAccess => _settingsService.GetSetting("WebServer.RemoteAccess", false);
public PluginSetting<int> WebServerPort => _settingsService.GetSetting("WebServer.Port", 9696);
private void ExecuteShowLogs()