mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-25 23:13:49 +00:00
Fixed different widths of the tiles on the assistants page (#1234)
This commit is contained in:
1 parent
deb75c8dd1
commit
fae3ceb840
7 files changed
+20
-5
No files matched your search
@@ -96,7 +96,7 @@ public partial class AssistantBlock<TSettings> : MSGComponentBase, IAssistantCat
|
||||
false => this.ColorTheme.GetCurrentPalette(this.SettingsManager).GrayDefault,
|
||||
};
|
||||
|
||||
private string BlockStyle => $"border-width: 3px; border-color: {this.BorderColor}; border-radius: 12px; border-style: solid; max-width: 20em;";
|
||||
private string BlockStyle => $"border-width: 3px; border-color: {this.BorderColor}; border-radius: 12px; border-style: solid; width: 20em;";
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsVisible => this.SettingsManager.IsAssistantVisible(this.Component, assistantName: this.Name, requiredPreviewFeature: this.RequiredPreviewFeature);
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
Link="@this.LaunchLink"
|
||||
OnClick="@this.StartAsync">
|
||||
<AdditionalActions>
|
||||
<DirectChatLauncherSettingsAction Plugin="@this.Plugin" />
|
||||
<DirectChatLauncherSettingsAction Plugin="@this.Plugin" Compact="@true" />
|
||||
@if (this.AvailablePlugin is not null)
|
||||
{
|
||||
<PluginDeleteAction Plugin="@this.AvailablePlugin" />
|
||||
<PluginDeleteAction Plugin="@this.AvailablePlugin" Compact="@true" />
|
||||
}
|
||||
</AdditionalActions>
|
||||
<SecurityBadge>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<MudIconButton Icon="@AppIcons.LAUNCHER_SETTINGS"
|
||||
Color="Color.Default"
|
||||
Variant="Variant.Text"
|
||||
Size="Size.Medium"
|
||||
Size="@(this.Compact ? Size.Small : Size.Medium)"
|
||||
Disabled="@this.isEditing"
|
||||
OnClick="@this.OpenSettingsDialogAsync"/>
|
||||
</MudTooltip>
|
||||
|
||||
@@ -20,6 +20,13 @@ public partial class DirectChatLauncherSettingsAction : MSGComponentBase
|
||||
[Parameter, EditorRequired]
|
||||
public PluginAssistants Plugin { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Shows the action as a small button. A tile of the assistants page needs it: next to a button
|
||||
/// of the usual size, its start button would sit higher than on the other tiles.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public bool Compact { get; set; }
|
||||
|
||||
[Inject]
|
||||
private IDialogService DialogService { get; init; } = null!;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<MudIconButton Icon="@AppIcons.DELETE"
|
||||
Color="Color.Error"
|
||||
Variant="Variant.Text"
|
||||
Size="Size.Medium"
|
||||
Size="@(this.Compact ? Size.Small : Size.Medium)"
|
||||
Disabled="@(this.isDeleting || this.IsBlockedByActiveWork)"
|
||||
OnClick="@this.DeletePluginAsync" />
|
||||
</MudTooltip>
|
||||
|
||||
@@ -23,6 +23,13 @@ public partial class PluginDeleteAction : MSGComponentBase
|
||||
[Parameter, EditorRequired]
|
||||
public IAvailablePlugin Plugin { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Shows the action as a small button. A tile of the assistants page needs it: next to a button
|
||||
/// of the usual size, its start button would sit higher than on the other tiles.
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public bool Compact { get; set; }
|
||||
|
||||
[Inject]
|
||||
private IDialogService DialogService { get; init; } = null!;
|
||||
|
||||
|
||||
Reference in new issue
Block a user