mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 23:49:06 +00:00
50 lines
2.6 KiB
Plaintext
50 lines
2.6 KiB
Plaintext
@page "/settings"
|
|
|
|
<MudText Typo="Typo.h3" Class="mb-12">Settings</MudText>
|
|
|
|
<MudPaper Class="pa-3">
|
|
<MudText Typo="Typo.h4" Class="mb-3">Configured Providers</MudText>
|
|
<MudTable Items="@this.SettingsManager.ConfigurationData.Providers">
|
|
<ColGroup>
|
|
<col style="width: 3em;"/>
|
|
<col style="width: 6em;"/>
|
|
<col/>
|
|
<col style="width: 20em;"/>
|
|
</ColGroup>
|
|
<HeaderContent>
|
|
<MudTh>#</MudTh>
|
|
<MudTh>Provider</MudTh>
|
|
<MudTh>Name</MudTh>
|
|
<MudTh Style="text-align: left;">Actions</MudTh>
|
|
</HeaderContent>
|
|
<RowTemplate>
|
|
<MudTd></MudTd>
|
|
<MudTd>@context.UsedProvider</MudTd>
|
|
<MudTd>@context.InstanceName</MudTd>
|
|
<MudTd Style="text-align: left;">
|
|
<MudButton Variant="Variant.Filled" Color="Color.Info" StartIcon="@Icons.Material.Filled.Edit" Class="mr-2" OnClick="() => this.EditProvider(context)">
|
|
Edit
|
|
</MudButton>
|
|
<MudButton Variant="Variant.Filled" Color="Color.Error" StartIcon="@Icons.Material.Filled.Delete" Class="mr-2" OnClick="() => this.DeleteProvider(context)">
|
|
Delete
|
|
</MudButton>
|
|
</MudTd>
|
|
</RowTemplate>
|
|
</MudTable>
|
|
|
|
@if(this.SettingsManager.ConfigurationData.Providers.Count == 0)
|
|
{
|
|
<MudText Typo="Typo.h6" Class="mt-3">No providers configured yet.</MudText>
|
|
}
|
|
|
|
<MudButton
|
|
Variant="Variant.Filled" Color="@Color.Primary"
|
|
StartIcon="@Icons.Material.Filled.AddRoad"
|
|
Class="mt-3 mb-6" OnClick="@this.AddProvider">
|
|
Add Provider
|
|
</MudButton>
|
|
|
|
<MudText Typo="Typo.h4" Class="mb-3">Options</MudText>
|
|
<ConfigurationOption OptionDescription="Save energy?" LabelOn="Energy saving is enabled" LabelOff="Energy saving is disabled" State="@(() => this.SettingsManager.ConfigurationData.IsSavingEnergy)" StateUpdate="@(updatedState => this.SettingsManager.ConfigurationData.IsSavingEnergy = updatedState)" OptionHelp="When enabled, streamed content from the AI is updated once every third second. When disabled, streamed content will be updated as soon as it is available."/>
|
|
<ConfigurationSelect OptionDescription="Shortcut to send input" SelectedValue="@(() => this.SettingsManager.ConfigurationData.ShortcutSendBehavior)" Data="@ConfigurationSelectDataFactory.GetSendBehaviorData()" SelectionUpdate="@(selectedValue => this.SettingsManager.ConfigurationData.ShortcutSendBehavior = selectedValue)" OptionHelp="Do you want to use any shortcut to send your input?"/>
|
|
</MudPaper> |