-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
76 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
namespace RepoM.App.ViewModels; | ||
|
||
using System; | ||
using System.Reflection; | ||
using JetBrains.Annotations; | ||
using RepoM.Api.Common; | ||
using RepoM.Api.Git; | ||
|
||
public class HelpViewModel | ||
{ | ||
public HelpViewModel(ITranslationService translationService) | ||
{ | ||
ArgumentNullException.ThrowIfNull(translationService); | ||
Header = GetHeader(); | ||
Description = GetHelp(translationService); | ||
} | ||
|
||
public string Header { [UsedImplicitly] get; } | ||
|
||
public string Description { [UsedImplicitly] get; } | ||
|
||
private static string GetHeader() | ||
{ | ||
AssemblyName? appName = Assembly.GetEntryAssembly()?.GetName(); | ||
return appName?.Name + ' ' + appName?.Version?.ToString(2).Trim(); | ||
} | ||
|
||
private static string GetHelp(ITranslationService translationService) | ||
{ | ||
return translationService.Translate( | ||
"Help Detail", | ||
StatusCharacterMap.IDENTICAL_SIGN, | ||
StatusCharacterMap.STASH_SIGN, | ||
StatusCharacterMap.IDENTICAL_SIGN, | ||
StatusCharacterMap.ARROW_UP_SIGN, | ||
StatusCharacterMap.ARROW_DOWN_SIGN, | ||
StatusCharacterMap.NO_UPSTREAM_SIGN, | ||
StatusCharacterMap.STASH_SIGN | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters