Made dialog parameter usage explicit with generic types (#543)
Build and Release / Read metadata (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Has been cancelled
Build and Release / Prepare & create release (push) Has been cancelled
Build and Release / Publish release (push) Has been cancelled

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2025-08-28 18:51:44 +02:00
1 parent e03289b680
commit f1c2a65450
13 files changed
+47 -46

No files matched your search

@@ -315,9 +315,9 @@ public partial class Workspaces : MSGComponentBase
// Check if the chat has unsaved changes:
if (switchToChat && await MessageBus.INSTANCE.SendMessageUseFirstResult<bool, bool>(this, Event.HAS_CHAT_UNSAVED_CHANGES))
{
var dialogParameters = new DialogParameters
var dialogParameters = new DialogParameters<ConfirmDialog>
{
{ "Message", T("Are you sure you want to load another chat? All unsaved changes will be lost.") },
{ x => x.Message, T("Are you sure you want to load another chat? All unsaved changes will be lost.") },
};
var dialogReference = await this.DialogService.ShowAsync<ConfirmDialog>(T("Load Chat"), dialogParameters, DialogOptions.FULLSCREEN);
@@ -356,10 +356,10 @@ public partial class Workspaces : MSGComponentBase
if (askForConfirmation)
{
var workspaceName = await WorkspaceBehaviour.LoadWorkspaceName(chat.WorkspaceId);
var dialogParameters = new DialogParameters
var dialogParameters = new DialogParameters<ConfirmDialog>
{
{
"Message", (chat.WorkspaceId == Guid.Empty) switch
x => x.Message, (chat.WorkspaceId == Guid.Empty) switch
{
true => string.Format(T("Are you sure you want to delete the temporary chat '{0}'?"), chat.Name),
false => string.Format(T("Are you sure you want to delete the chat '{0}' in the workspace '{1}'?"), chat.Name, workspaceName),
@@ -492,9 +492,9 @@ public partial class Workspaces : MSGComponentBase
// Determine how many chats are in the workspace:
var chatCount = Directory.EnumerateDirectories(workspacePath).Count();
var dialogParameters = new DialogParameters
var dialogParameters = new DialogParameters<ConfirmDialog>
{
{ "Message", string.Format(T("Are you sure you want to delete the workspace '{0}'? This will also delete {1} chat(s) in this workspace."), workspaceName, chatCount) },
{ x => x.Message, string.Format(T("Are you sure you want to delete the workspace '{0}'? This will also delete {1} chat(s) in this workspace."), workspaceName, chatCount) },
};
var dialogReference = await this.DialogService.ShowAsync<ConfirmDialog>(T("Delete Workspace"), dialogParameters, DialogOptions.FULLSCREEN);
@@ -512,11 +512,11 @@ public partial class Workspaces : MSGComponentBase
if (chat is null)
return;
var dialogParameters = new DialogParameters
var dialogParameters = new DialogParameters<WorkspaceSelectionDialog>
{
{ "Message", T("Please select the workspace where you want to move the chat to.") },
{ "SelectedWorkspace", chat.WorkspaceId },
{ "ConfirmText", T("Move chat") },
{ x => x.Message, T("Please select the workspace where you want to move the chat to.") },
{ x => x.SelectedWorkspace, chat.WorkspaceId },
{ x => x.ConfirmText, T("Move chat") },
};
var dialogReference = await this.DialogService.ShowAsync<WorkspaceSelectionDialog>(T("Move Chat to Workspace"), dialogParameters, DialogOptions.FULLSCREEN);
@@ -559,9 +559,9 @@ public partial class Workspaces : MSGComponentBase
// Check if the chat has unsaved changes:
if (await MessageBus.INSTANCE.SendMessageUseFirstResult<bool, bool>(this, Event.HAS_CHAT_UNSAVED_CHANGES))
{
var dialogParameters = new DialogParameters
var dialogParameters = new DialogParameters<ConfirmDialog>
{
{ "Message", T("Are you sure you want to create a another chat? All unsaved changes will be lost.") },
{ x => x.Message, T("Are you sure you want to create a another chat? All unsaved changes will be lost.") },
};
var dialogReference = await this.DialogService.ShowAsync<ConfirmDialog>(T("Create Chat"), dialogParameters, DialogOptions.FULLSCREEN);