diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-15 10:46:12 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-15 10:46:12 -0600 |
commit | fb3a43c216a884f7185c53cba6e210d6659448d1 (patch) | |
tree | 171877b22ccd90087b894df8003ed42ebf689601 /src/view/lib | |
parent | 6e93301542ce9593f614ab89883e3c87e38c5769 (diff) | |
download | voidsky-fb3a43c216a884f7185c53cba6e210d6659448d1.tar.zst |
Improve error messages
Diffstat (limited to 'src/view/lib')
-rw-r--r-- | src/view/lib/strings.ts | 7 | ||||
-rw-r--r-- | src/view/lib/styles.ts | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/view/lib/strings.ts b/src/view/lib/strings.ts index 19bd5c473..e47863d50 100644 --- a/src/view/lib/strings.ts +++ b/src/view/lib/strings.ts @@ -96,3 +96,10 @@ export function enforceLen(str: string, len: number): string { } return str } + +export function cleanError(str: string): string { + if (str.startsWith('Error: ')) { + return str.slice('Error: '.length) + } + return str +} diff --git a/src/view/lib/styles.ts b/src/view/lib/styles.ts index dfcaeef92..4bea6443c 100644 --- a/src/view/lib/styles.ts +++ b/src/view/lib/styles.ts @@ -45,6 +45,7 @@ export const colors = { export const gradients = { primary: {start: '#db00ff', end: '#ff007a'}, + error: {start: '#ff007a', end: '#ed0d78'}, purple: {start: colors.pink3, end: colors.purple3}, blue: {start: colors.purple3, end: colors.blue3}, green: {start: colors.blue3, end: colors.green3}, |