Add tray rules and identities editor
PR and Push Build/Test / build-and-test (push) Successful in 7m0s

This commit is contained in:
2026-05-28 01:28:16 +02:00
parent 71f1e6a0b8
commit 693f52afee
31 changed files with 3136 additions and 327 deletions
+14 -3
View File
@@ -5,6 +5,7 @@ namespace MeetingAssistant.Taskbar;
public enum MeetingTaskbarAction
{
EditRules,
StartRecording,
StopRecording,
AbortRecording,
@@ -27,7 +28,10 @@ public static class MeetingTaskbarMenuBuilder
RecordingStatus status,
IReadOnlyList<LaunchProfile> launchProfiles)
{
var items = new List<MeetingTaskbarMenuItem>();
var items = new List<MeetingTaskbarMenuItem>
{
new("Edit rules and identities", MeetingTaskbarAction.EditRules)
};
if (status.IsRecording)
{
@@ -41,7 +45,7 @@ public static class MeetingTaskbarMenuBuilder
foreach (var profile in launchProfiles.Where(profile => !IsActiveProfile(profile, status)))
{
items.Add(new MeetingTaskbarMenuItem(
$"Switch to {profile.Name}",
AppendHotkey($"Switch to {profile.Name}", profile.Options.Hotkey.Toggle),
MeetingTaskbarAction.SwitchProfile,
profile.Name));
}
@@ -51,7 +55,7 @@ public static class MeetingTaskbarMenuBuilder
foreach (var profile in launchProfiles)
{
items.Add(new MeetingTaskbarMenuItem(
$"Start meeting recording ({profile.Name})",
AppendHotkey($"Start meeting recording ({profile.Name})", profile.Options.Hotkey.Toggle),
MeetingTaskbarAction.StartRecording,
profile.Name));
}
@@ -84,4 +88,11 @@ public static class MeetingTaskbarMenuBuilder
status.LaunchProfile,
StringComparison.OrdinalIgnoreCase);
}
private static string AppendHotkey(string text, string hotkey)
{
return string.IsNullOrWhiteSpace(hotkey)
? text
: $"{text}\t{hotkey.Trim()}";
}
}