Skip to content

Commit 45b8706

Browse files
committed
Fix icons
1 parent 0ad8aa0 commit 45b8706

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/Aspire.Hosting/ApplicationModel/ResourceCommandAnnotation.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public ResourceCommandAnnotation(
2020
string displayName,
2121
Func<UpdateCommandStateContext, ResourceCommandState> updateState,
2222
Func<ExecuteCommandContext, Task> executeCommand,
23-
string? iconContent,
23+
string? iconName,
2424
bool isHighlighted)
2525
{
2626
ArgumentNullException.ThrowIfNull(type);
@@ -30,7 +30,7 @@ public ResourceCommandAnnotation(
3030
DisplayName = displayName;
3131
UpdateState = updateState;
3232
ExecuteCommand = executeCommand;
33-
IconContent = iconContent;
33+
IconName = iconName;
3434
IsHighlighted = isHighlighted;
3535
}
3636

@@ -57,7 +57,7 @@ public ResourceCommandAnnotation(
5757
/// <summary>
5858
///
5959
/// </summary>
60-
public string? IconContent { get; }
60+
public string? IconName { get; }
6161

6262
/// <summary>
6363
///

src/Aspire.Hosting/ApplicationModel/ResourceNotificationService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ from subgroup in gj.DefaultIfEmpty()
271271
{
272272
var state = commandAnnotation.UpdateState(new UpdateCommandStateContext { ResourceSnapshot = previousState });
273273

274-
commandsBuilder.Add(new ResourceCommandSnapshot(commandAnnotation.Type, state, commandAnnotation.DisplayName, commandAnnotation.IconContent, commandAnnotation.IsHighlighted));
274+
commandsBuilder.Add(new ResourceCommandSnapshot(commandAnnotation.Type, state, commandAnnotation.DisplayName, commandAnnotation.IconName, commandAnnotation.IsHighlighted));
275275
}
276276

277277
return commandsBuilder.ToImmutable();

src/Aspire.Hosting/Dashboard/CommandsConfigurationExtensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ internal static IResourceBuilder<T> WithLifeCycleCommands<T>(this IResourceBuild
2121

2222
await executor.StartResourceAsync(context.ResourceName).ConfigureAwait(false);
2323
},
24-
"<path d=\"M17.22 8.69a1.5 1.5 0 0 1 0 2.62l-10 5.5A1.5 1.5 0 0 1 5 15.5v-11A1.5 1.5 0 0 1 7.22 3.2l10 5.5Zm-.48 1.75a.5.5 0 0 0 0-.88l-10-5.5A.5.5 0 0 0 6 4.5v11c0 .38.4.62.74.44l10-5.5Z\"/>",
24+
"Play",
2525
isHighlighted: true);
2626

2727
builder.WithCommand(
@@ -34,7 +34,7 @@ internal static IResourceBuilder<T> WithLifeCycleCommands<T>(this IResourceBuild
3434

3535
await executor.StopResourceAsync(context.ResourceName).ConfigureAwait(false);
3636
},
37-
"<path d=\"M15.5 4c.28 0 .5.22.5.5v11a.5.5 0 0 1-.5.5h-11a.5.5 0 0 1-.5-.5v-11c0-.28.22-.5.5-.5h11Zm-11-1C3.67 3 3 3.67 3 4.5v11c0 .83.67 1.5 1.5 1.5h11c.83 0 1.5-.67 1.5-1.5v-11c0-.83-.67-1.5-1.5-1.5h-11Z\"/>",
37+
"Stop",
3838
isHighlighted: true);
3939

4040
builder.WithCommand(
@@ -48,7 +48,7 @@ internal static IResourceBuilder<T> WithLifeCycleCommands<T>(this IResourceBuild
4848
await executor.StopResourceAsync(context.ResourceName).ConfigureAwait(false);
4949
await executor.StartResourceAsync(context.ResourceName).ConfigureAwait(false);
5050
},
51-
"<path d=\"M16 10A6 6 0 0 0 5.53 6H7.5a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5v-3a.5.5 0 0 1 1 0v1.6a7 7 0 1 1-1.98 4.36.5.5 0 0 1 1 .08L4 10a6 6 0 0 0 12 0Z\"/>",
51+
"ArrowCounterclockwise",
5252
isHighlighted: false);
5353

5454
return builder;

src/Aspire.Hosting/ResourceBuilderExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ public static IResourceBuilder<T> WithCommand<T>(
767767
string displayName,
768768
Func<UpdateCommandStateContext, ResourceCommandState> updateState,
769769
Func<ExecuteCommandContext, Task> executeCommand,
770-
string? iconContent,
770+
string? iconName,
771771
bool isHighlighted) where T : IResource
772772
{
773773
// Replace existing annotation with the same name.
@@ -777,7 +777,7 @@ public static IResourceBuilder<T> WithCommand<T>(
777777
builder.Resource.Annotations.Remove(existingAnnotation);
778778
}
779779

780-
return builder.WithAnnotation(new ResourceCommandAnnotation(type, displayName, updateState, executeCommand, iconContent, isHighlighted));
780+
return builder.WithAnnotation(new ResourceCommandAnnotation(type, displayName, updateState, executeCommand, iconName, isHighlighted));
781781
}
782782
#pragma warning restore RS0016 // Add public types and members to the declared API
783783
#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member

0 commit comments

Comments
 (0)