mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 02:27:21 +00:00
Upgraded to MudBlazor 9 (#1137)
This commit is contained in:
1 parent
e0337a99bc
commit
aeba1fbccc
625 files changed
+408
-882
No files matched your search
@@ -8,7 +8,7 @@
|
||||
<MudJustifiedText Typo="Typo.body1" Class="mb-2">
|
||||
@T("You can enter text, use one or more documents or images, or use both. At least one of these options is required.")
|
||||
</MudJustifiedText>
|
||||
<MudTextField T="string" @bind-Text="@this.inputContent" Validation="@this.ValidatingContext" Adornment="Adornment.Start" Lines="6" MaxLines="12" AutoGrow="@false" Label="@T("Text content")" Variant="Variant.Outlined" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||
<MudTextField T="string" @bind-Text="@this.inputContent" Validation="@this.ValidatingContext" Adornment="Adornment.Start" Lines="6" MaxLines="12" Sizing="InputSizing.Fixed" Label="@T("Text content")" Variant="Variant.Outlined" Class="mb-3" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||
|
||||
@* Side by side where the window is wide enough; each column ends with its zone, so both zones line up below explanations of different length: *@
|
||||
<MudGrid Class="mt-1">
|
||||
@@ -60,7 +60,7 @@
|
||||
<MudJustifiedText Typo="Typo.body1" Class="mb-2">
|
||||
@T("You might want to specify important aspects that the LLM should consider when creating the slides. For example, the use of emojis or specific topics that should be highlighted.")
|
||||
</MudJustifiedText>
|
||||
<MudTextField T="string" AutoGrow="true" Lines="3" @bind-Text="@this.importantAspects" class="mb-1" Label="@T("(Optional) Important Aspects")" ShrinkLabel="true" Variant="Variant.Outlined" AdornmentIcon="@Icons.Material.Filled.List" Adornment="Adornment.Start" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||
<MudTextField T="string" Sizing="InputSizing.Auto" Lines="3" @bind-Text="@this.importantAspects" class="mb-1" Label="@T("(Optional) Important Aspects")" ShrinkLabel="true" Variant="Variant.Outlined" AdornmentIcon="@Icons.Material.Filled.List" Adornment="Adornment.Start" UserAttributes="@USER_INPUT_ATTRIBUTES"/>
|
||||
|
||||
<MudText Typo="Typo.h6" Class="mb-1 mt-3"> @T("Extent of the planned presentation")</MudText>
|
||||
<MudJustifiedText Typo="Typo.body1" Class="mb-2">
|
||||
|
||||
@@ -69,7 +69,7 @@ public partial class SlideAssistant
|
||||
this.pictureLibraryPath = path;
|
||||
await this.ReadPictureLibraryOverviewAsync();
|
||||
if (this.Form is not null)
|
||||
await this.Form.Validate();
|
||||
await this.Form.ValidateAsync();
|
||||
}
|
||||
|
||||
private async Task UseNoPictureLibrary() => await this.OnPictureLibraryChanged(string.Empty);
|
||||
|
||||
@@ -245,7 +245,7 @@ public partial class SlideAssistant
|
||||
this.LoadTemplate();
|
||||
this.ApplyPreselectedTemplateSlideUses();
|
||||
if (this.Form is not null)
|
||||
await this.Form.Validate();
|
||||
await this.Form.ValidateAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -299,9 +299,9 @@ public partial class SlideAssistant
|
||||
/// <returns>The name, or empty when the LLM decides, which it also does when the template has no layout of this name.</returns>
|
||||
private string LayoutNameOf(LayoutPurpose purpose) => this.template is not null && this.layoutNames.TryGetValue(purpose, out var name) && this.template.FindFamilyByName(name) is not null ? name : string.Empty;
|
||||
|
||||
private void SetLayoutName(LayoutPurpose purpose, string name)
|
||||
private void SetLayoutName(LayoutPurpose purpose, string? name)
|
||||
{
|
||||
if (name.Length == 0)
|
||||
if (string.IsNullOrEmpty(name))
|
||||
this.layoutNames.Remove(purpose);
|
||||
else
|
||||
this.layoutNames[purpose] = name;
|
||||
|
||||
@@ -427,14 +427,14 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
|
||||
{
|
||||
await this.KeepSlidePicturesOutOfDocumentsAsync();
|
||||
if(this.Form is not null)
|
||||
await this.Form.Validate();
|
||||
await this.Form.ValidateAsync();
|
||||
}
|
||||
|
||||
private async Task OnSlidePicturesChanged(HashSet<FileAttachment> _)
|
||||
{
|
||||
await this.KeepSlidePicturesOutOfDocumentsAsync();
|
||||
if(this.Form is not null)
|
||||
await this.Form.Validate();
|
||||
await this.Form.ValidateAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -622,7 +622,7 @@ public partial class SlideAssistant : AssistantBaseCore<SettingsDialogSlideBuild
|
||||
|
||||
private async Task CreateSlideBuilder()
|
||||
{
|
||||
await this.Form!.Validate();
|
||||
await this.Form!.ValidateAsync();
|
||||
if (!this.InputIsValid)
|
||||
return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user