From 89d2e1b9b32914c80e7a25ef406c6fbe24e20edd Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Mon, 8 May 2023 18:04:30 +0200 Subject: [PATCH] feat: display API errors --- content/.vuepress/client.ts | 2 ++ content/.vuepress/components/ApiLoader.vue | 15 +++++------ content/.vuepress/components/Error.vue | 26 +++++++++++++++++++ .../components/GitHub/GithubRepository.vue | 5 ++-- content/.vuepress/styles/classes.less | 4 +++ 5 files changed, 42 insertions(+), 10 deletions(-) create mode 100644 content/.vuepress/components/Error.vue diff --git a/content/.vuepress/client.ts b/content/.vuepress/client.ts index 30a1905..1f5afc8 100644 --- a/content/.vuepress/client.ts +++ b/content/.vuepress/client.ts @@ -6,6 +6,7 @@ import GithubRepository from './components/GitHub/GithubRepository.vue'; import ApiLoader from './components/ApiLoader.vue'; import Loader from './components/Loader.vue'; import Cache from './components/Cache.vue'; +import Error from './components/Error.vue'; import Icon from './components/Icon.vue'; export default defineClientConfig({ @@ -17,6 +18,7 @@ export default defineClientConfig({ app.component('ApiLoader', ApiLoader); app.component('Loader', Loader); app.component('Cache', Cache); + app.component('Error', Error); app.component('Icon', Icon); }, setup() {}, diff --git a/content/.vuepress/components/ApiLoader.vue b/content/.vuepress/components/ApiLoader.vue index 4e12527..38dddf5 100644 --- a/content/.vuepress/components/ApiLoader.vue +++ b/content/.vuepress/components/ApiLoader.vue @@ -8,15 +8,16 @@ - - - {{ error }} + + + - - diff --git a/content/.vuepress/components/Error.vue b/content/.vuepress/components/Error.vue new file mode 100644 index 0000000..37e5e42 --- /dev/null +++ b/content/.vuepress/components/Error.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/content/.vuepress/components/GitHub/GithubRepository.vue b/content/.vuepress/components/GitHub/GithubRepository.vue index 05f4be3..eb0c460 100644 --- a/content/.vuepress/components/GitHub/GithubRepository.vue +++ b/content/.vuepress/components/GitHub/GithubRepository.vue @@ -1,5 +1,7 @@