-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix autorefresh fallthrough to default settings * improve error handling & display * always show spinner when it is refreshing * remove unused class * tweak metadata margin on default theme * add debug logs back into fetching * add styling on project titles
- Loading branch information
1 parent
10e0ae1
commit d76509c
Showing
8 changed files
with
94 additions
and
49 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
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<script lang="ts"> | ||
export let error: Error; | ||
export let error: string; | ||
</script> | ||
|
||
<div class="todoist-error"> | ||
<p>Oh no, something went wrong!</p> | ||
<code>{error}</code> | ||
<p><b>Encountered error:</b></p> | ||
<p>{error}</p> | ||
</div> |
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,21 @@ | ||
<script lang="ts"> | ||
import { QueryErrorKind } from "../data"; | ||
import ErrorDisplay from "./ErrorDisplay.svelte"; | ||
export let kind: QueryErrorKind; | ||
$: errorMessage = message(kind); | ||
function message(kind: QueryErrorKind): string { | ||
switch (kind) { | ||
case QueryErrorKind.BadRequest: | ||
return "The Todoist API has rejected the request. Please check the filter to ensure it is valid."; | ||
case QueryErrorKind.Unauthorized: | ||
return "The Todoist API request is missing or has the incorreect credentials. Please check the API token in the settings."; | ||
default: | ||
return "Unknown error occurred. Please check the Console in the Developer Tools window for more information"; | ||
} | ||
} | ||
</script> | ||
|
||
<ErrorDisplay error={errorMessage} /> |
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