Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite1ef774

Browse files
chore: change stale agent colour to yellow (#34)
On the Mac app, we use Yellow when an agent's last handshake was longerthan 5 minutes ago. We should reserve red for a more fatal error, ratherthan something that will show on every connection.
1 parentacc89ee commite1ef774

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

‎App/Converters/AgentStatusToColorConverter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace Coder.Desktop.App.Converters;
99
publicclassAgentStatusToColorConverter:IValueConverter
1010
{
1111
privatestaticreadonlySolidColorBrushGreen=new(Color.FromArgb(255,52,199,89));
12+
privatestaticreadonlySolidColorBrushYellow=new(Color.FromArgb(255,204,1,0));
1213
privatestaticreadonlySolidColorBrushRed=new(Color.FromArgb(255,255,59,48));
1314
privatestaticreadonlySolidColorBrushGray=new(Color.FromArgb(255,142,142,147));
1415

@@ -19,6 +20,7 @@ public object Convert(object value, Type targetType, object parameter, string la
1920
returnstatusswitch
2021
{
2122
AgentConnectionStatus.Green=>Green,
23+
AgentConnectionStatus.Yellow=>Yellow,
2224
AgentConnectionStatus.Red=>Red,
2325
_=>Gray,
2426
};

‎App/ViewModels/AgentViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace Coder.Desktop.App.ViewModels;
99
publicenumAgentConnectionStatus
1010
{
1111
Green,
12+
Yellow,
1213
Red,
1314
Gray,
1415
}

‎App/ViewModels/TrayWindowViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private void UpdateFromRpcModel(RpcModel rpcModel)
137137
HostnameSuffix=fqdnSuffix,
138138
ConnectionStatus=lastHandshakeAgo<TimeSpan.FromMinutes(5)
139139
?AgentConnectionStatus.Green
140-
:AgentConnectionStatus.Red,
140+
:AgentConnectionStatus.Yellow,
141141
DashboardUrl=WorkspaceUri(coderUri,workspace?.Name),
142142
});
143143
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp