Skip to content

Commit

Permalink
Small fix-up for status tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
timheuer committed Aug 6, 2023
1 parent 4873918 commit 77ef364
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/Models/BaseWorkflowType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public abstract class BaseWorkflowType
public string Id { get; set; }
public string TriggerEvent { get; set; }
public string TriggerLogin { get; set; }
public string RunDuration { get; set; }

public bool HasActions
{
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/UIStrings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Resources/UIStrings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,11 @@
<comment>Menu for running a workflow</comment>
</data>
<data name="TRIGGERED_BY" xml:space="preserve">
<value> by </value>
<value>by</value>
<comment>Message separating event and actor - requries spaces</comment>
</data>
<data name="TRIGGERED_VIA" xml:space="preserve">
<value>Triggered via </value>
<value>Triggered via</value>
<comment>Message starting the trigger sentence</comment>
</data>
<data name="VIEW_LOG" xml:space="preserve">
Expand Down
6 changes: 5 additions & 1 deletion src/ToolWindows/GHActionsToolWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@
<emoji:TextBlock.ToolTip>
<ToolTip Visibility="{Binding TriggerEvent, Converter={StaticResource NullVisibilityConverter}}">
<StackPanel Orientation="Vertical">
<TextBlock FontWeight="Bold" Text="{Binding Conclusion}"/>
<TextBlock>
<Run FontWeight="Bold" Text="{Binding Conclusion}"/>
<Run Text="in"/>
<Run FontWeight="Bold" Text="{Binding RunDuration}" />
</TextBlock>
<TextBlock>
<Run Text="{x:Static resx:UIStrings.TRIGGERED_VIA}"/>
<Run FontWeight="Bold" Text="{Binding TriggerEvent}"/>
Expand Down
5 changes: 3 additions & 2 deletions src/ToolWindows/GHActionsToolWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,14 @@ private async Task LoadDataAsync()
{
SimpleRun simpleRun = new()
{
Conclusion = run.Conclusion is not null ? run.Conclusion.Value.StringValue : run.Status.StringValue,
Conclusion = run.Conclusion is not null ? run.Conclusion.Value.StringValue.Humanize(LetterCasing.Title) : run.Status.StringValue.Humanize(LetterCasing.Title),
Name = run.Name,
LogDate = run.UpdatedAt,
Id = run.Id.ToString(),
RunNumber = run.RunNumber.ToString(),
TriggerEvent = run.Event,
TriggerLogin = run.TriggeringActor.Login
TriggerLogin = run.TriggeringActor.Login,
RunDuration = (run.UpdatedAt - run.RunStartedAt).Humanize(2)
};

if (refreshPending)
Expand Down

0 comments on commit 77ef364

Please sign in to comment.