mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 20:06:33 +00:00
Web API - Added end points API
Web API - Return unhandled exceptions in JSON Plugin end points - Made built-in end points async
This commit is contained in:
1 parent
fe847ad8f4
commit
46958338b9
11 files changed
+346
-178
No files matched your search
@@ -171,7 +171,7 @@
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Separator Style="{StaticResource MaterialDesignSeparator}" Margin="-15 5" />
|
||||
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
@@ -195,6 +195,33 @@
|
||||
</StackPanel>
|
||||
</materialDesign:Card>
|
||||
|
||||
<!-- Web server settings -->
|
||||
<TextBlock Style="{StaticResource MaterialDesignHeadline5TextBlock}" Margin="0 15">Web server</TextBlock>
|
||||
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" VerticalAlignment="Stretch" Margin="0,0,5,0">
|
||||
<StackPanel Margin="15">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0">
|
||||
<TextBlock Style="{StaticResource MaterialDesignTextBlock}">Web server port</TextBlock>
|
||||
<TextBlock Style="{StaticResource MaterialDesignTextBlock}" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}" TextWrapping="Wrap">
|
||||
Artemis runs a local web server that can be used to externally interact with the application. <LineBreak />
|
||||
This web server can only be accessed by applications running on your own computer, e.g. supported games.
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
|
||||
<TextBox Text="{Binding WebServerPortSetting.Value}" Width="80" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</materialDesign:Card>
|
||||
|
||||
<!-- Update settings -->
|
||||
<TextBlock Style="{StaticResource MaterialDesignHeadline5TextBlock}" Margin="0 15">Updating</TextBlock>
|
||||
<materialDesign:Card materialDesign:ShadowAssist.ShadowDepth="Depth1" VerticalAlignment="Stretch" Margin="0,0,5,0">
|
||||
|
||||
@@ -79,6 +79,9 @@ namespace Artemis.UI.Screens.Settings.Tabs.General
|
||||
LayerBrushProviderId = "Artemis.Plugins.LayerBrushes.Color.ColorBrushProvider-92a9d6ba",
|
||||
BrushType = "ColorBrush"
|
||||
});
|
||||
|
||||
WebServerPortSetting = _settingsService.GetSetting("WebServer.Port", 9696);
|
||||
WebServerPortSetting.AutoSave = true;
|
||||
}
|
||||
|
||||
public BindableCollection<LayerBrushDescriptor> LayerBrushDescriptors { get; }
|
||||
@@ -234,6 +237,8 @@ namespace Artemis.UI.Screens.Settings.Tabs.General
|
||||
}
|
||||
}
|
||||
|
||||
public PluginSetting<int> WebServerPortSetting { get; }
|
||||
|
||||
public bool CanOfferUpdatesIfFound
|
||||
{
|
||||
get => _canOfferUpdatesIfFound;
|
||||
|
||||
Reference in new issue
Block a user