Skip to content

Commit

Permalink
feat(ux): 💄 use error icon for all errors (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNZL committed Jul 7, 2023
1 parent f19cba5 commit 4d16b20
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/TogglTrack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ internal List<Result> NotifyMissingToken()
{
Title = "ERROR: Missing API token",
SubTitle = "Configure Toggl Track API token in Flow Launcher settings.",
IcoPath = this._context.CurrentPluginMetadata.IcoPath,
IcoPath = "tip-error.png",
Action = _ =>
{
this._context.API.OpenSettingDialog();
Expand All @@ -513,7 +513,6 @@ internal List<Result> NotifyMissingToken()
};
}

// TODO: use error icon
internal List<Result> NotifyNetworkUnavailable()
{
return new List<Result>
Expand All @@ -522,7 +521,7 @@ internal List<Result> NotifyNetworkUnavailable()
{
Title = "ERROR: No network connection",
SubTitle = "Connect to the internet to use Toggl Track.",
IcoPath = this._context.CurrentPluginMetadata.IcoPath,
IcoPath = "tip-error.png",
Action = _ =>
{
return true;
Expand All @@ -539,7 +538,7 @@ internal List<Result> NotifyInvalidToken()
{
Title = "ERROR: Invalid API token",
SubTitle = $"{this._settings.ApiToken} is not a valid API token.",
IcoPath = this._context.CurrentPluginMetadata.IcoPath,
IcoPath = "tip-error.png",
Action = _ =>
{
this._context.API.OpenSettingDialog();
Expand Down Expand Up @@ -568,7 +567,7 @@ internal List<Result> NotifyUnknownError()
{
Title = "ERROR: Unknown error",
SubTitle = "An unexpected error has occurred.",
IcoPath = this._context.CurrentPluginMetadata.IcoPath,
IcoPath = "tip-error.png",
Action = _ =>
{
return true;
Expand Down

0 comments on commit 4d16b20

Please sign in to comment.