mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-09-27 03:53:36 +00:00
Fix floating embedding icon when voice input is hidden
This commit is contained in:
parent
358c161e7a
commit
f429425a81
@ -1,22 +1,32 @@
|
|||||||
@namespace AIStudio.Components
|
@namespace AIStudio.Components
|
||||||
@inherits MSGComponentBase
|
@inherits MSGComponentBase
|
||||||
|
|
||||||
|
@*
|
||||||
|
The toolbar belongs to this component, not to the places which use it: MudToolBar keeps its
|
||||||
|
minimum height even when empty. Left outside, it reserved space in the navigation bar while
|
||||||
|
this component rendered nothing at all, which made the neighboring items float above the
|
||||||
|
bottom edge.
|
||||||
|
*@
|
||||||
@if (this.ShouldRenderVoiceRecording)
|
@if (this.ShouldRenderVoiceRecording)
|
||||||
{
|
{
|
||||||
<MudTooltip Text="@this.Tooltip">
|
<MudStack AlignItems="AlignItems.Center">
|
||||||
@if (this.isTranscribing || this.isPreparing)
|
<MudToolBar WrapContent="true">
|
||||||
{
|
<MudTooltip Text="@this.Tooltip">
|
||||||
<MudProgressCircular Size="Size.Small" Indeterminate="true" Color="Color.Primary"/>
|
@if (this.isTranscribing || this.isPreparing)
|
||||||
}
|
{
|
||||||
else
|
<MudProgressCircular Size="Size.Small" Indeterminate="true" Color="Color.Primary"/>
|
||||||
{
|
}
|
||||||
<MudToggleIconButton Toggled="@this.isRecording"
|
else
|
||||||
ToggledChanged="@this.OnRecordingToggled"
|
{
|
||||||
Icon="@Icons.Material.Filled.Mic"
|
<MudToggleIconButton Toggled="@this.isRecording"
|
||||||
ToggledIcon="@Icons.Material.Filled.Stop"
|
ToggledChanged="@this.OnRecordingToggled"
|
||||||
Disabled="@(!this.IsVoiceRecordingAvailable)"
|
Icon="@Icons.Material.Filled.Mic"
|
||||||
Color="Color.Primary"
|
ToggledIcon="@Icons.Material.Filled.Stop"
|
||||||
ToggledColor="Color.Error"/>
|
Disabled="@(!this.IsVoiceRecordingAvailable)"
|
||||||
}
|
Color="Color.Primary"
|
||||||
</MudTooltip>
|
ToggledColor="Color.Error"/>
|
||||||
|
}
|
||||||
|
</MudTooltip>
|
||||||
|
</MudToolBar>
|
||||||
|
</MudStack>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,20 +25,19 @@
|
|||||||
|
|
||||||
<MudSpacer/>
|
<MudSpacer/>
|
||||||
|
|
||||||
@if (this.showEmbeddingStatusIcon)
|
@* The bottom area carries the gap to the window edge once, for whichever of its items are shown: *@
|
||||||
{
|
<MudStack Spacing="0" Class="pb-2">
|
||||||
<MudNavMenu>
|
@if (this.showEmbeddingStatusIcon)
|
||||||
<MudTooltip Text="@this.EmbeddingNavigationTooltip" Placement="Placement.Right">
|
{
|
||||||
<MudNavLink Href="@this.embeddingItem.Path" Match="@(this.embeddingItem.MatchAll ? NavLinkMatch.All : NavLinkMatch.Prefix)" Icon="@this.embeddingItem.Icon" Style="@this.embeddingItem.SetColorStyle(this.SettingsManager)" Class="custom-icon-color">
|
<MudNavMenu>
|
||||||
@T("Data sync")
|
<MudTooltip Text="@this.EmbeddingNavigationTooltip" Placement="Placement.Right">
|
||||||
</MudNavLink>
|
<MudNavLink Href="@this.embeddingItem.Path" Match="@(this.embeddingItem.MatchAll ? NavLinkMatch.All : NavLinkMatch.Prefix)" Icon="@this.embeddingItem.Icon" Style="@this.embeddingItem.SetColorStyle(this.SettingsManager)" Class="custom-icon-color">
|
||||||
</MudTooltip>
|
@T("Data sync")
|
||||||
</MudNavMenu>
|
</MudNavLink>
|
||||||
}
|
</MudTooltip>
|
||||||
<MudStack AlignItems="AlignItems.Center" Class="pb-2">
|
</MudNavMenu>
|
||||||
<MudToolBar WrapContent="true">
|
}
|
||||||
<VoiceRecorder />
|
<VoiceRecorder />
|
||||||
</MudToolBar>
|
|
||||||
</MudStack>
|
</MudStack>
|
||||||
</MudDrawer>
|
</MudDrawer>
|
||||||
</MudDrawerContainer>
|
</MudDrawerContainer>
|
||||||
@ -64,25 +63,24 @@
|
|||||||
|
|
||||||
<MudSpacer/>
|
<MudSpacer/>
|
||||||
|
|
||||||
@if (this.showEmbeddingStatusIcon)
|
@* The bottom area carries the gap to the window edge once, for whichever of its items are shown: *@
|
||||||
{
|
<MudStack Spacing="0" Class="pb-2">
|
||||||
<MudNavMenu>
|
@if (this.showEmbeddingStatusIcon)
|
||||||
@if (this.SettingsManager.ConfigurationData.App.NavigationBehavior is NavBehavior.NEVER_EXPAND_USE_TOOLTIPS)
|
{
|
||||||
{
|
<MudNavMenu>
|
||||||
<MudTooltip Text="@this.EmbeddingNavigationTooltip" Placement="Placement.Right">
|
@if (this.SettingsManager.ConfigurationData.App.NavigationBehavior is NavBehavior.NEVER_EXPAND_USE_TOOLTIPS)
|
||||||
|
{
|
||||||
|
<MudTooltip Text="@this.EmbeddingNavigationTooltip" Placement="Placement.Right">
|
||||||
|
<MudNavLink Href="@this.embeddingItem.Path" Match="@(this.embeddingItem.MatchAll ? NavLinkMatch.All : NavLinkMatch.Prefix)" Icon="@this.embeddingItem.Icon" Style="@this.embeddingItem.SetColorStyle(this.SettingsManager)" Class="custom-icon-color"/>
|
||||||
|
</MudTooltip>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
<MudNavLink Href="@this.embeddingItem.Path" Match="@(this.embeddingItem.MatchAll ? NavLinkMatch.All : NavLinkMatch.Prefix)" Icon="@this.embeddingItem.Icon" Style="@this.embeddingItem.SetColorStyle(this.SettingsManager)" Class="custom-icon-color"/>
|
<MudNavLink Href="@this.embeddingItem.Path" Match="@(this.embeddingItem.MatchAll ? NavLinkMatch.All : NavLinkMatch.Prefix)" Icon="@this.embeddingItem.Icon" Style="@this.embeddingItem.SetColorStyle(this.SettingsManager)" Class="custom-icon-color"/>
|
||||||
</MudTooltip>
|
}
|
||||||
}
|
</MudNavMenu>
|
||||||
else
|
}
|
||||||
{
|
<VoiceRecorder />
|
||||||
<MudNavLink Href="@this.embeddingItem.Path" Match="@(this.embeddingItem.MatchAll ? NavLinkMatch.All : NavLinkMatch.Prefix)" Icon="@this.embeddingItem.Icon" Style="@this.embeddingItem.SetColorStyle(this.SettingsManager)" Class="custom-icon-color"/>
|
|
||||||
}
|
|
||||||
</MudNavMenu>
|
|
||||||
}
|
|
||||||
<MudStack AlignItems="AlignItems.Center" Class="pb-2">
|
|
||||||
<MudToolBar WrapContent="true">
|
|
||||||
<VoiceRecorder />
|
|
||||||
</MudToolBar>
|
|
||||||
</MudStack>
|
</MudStack>
|
||||||
</MudPaper>
|
</MudPaper>
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user