From 4524f98ec05423aa728d73a17118e0d2f94baafa Mon Sep 17 00:00:00 2001 From: Toni <2703233+toniengelhardt@users.noreply.github.com> Date: Mon, 13 Feb 2023 20:35:10 +0000 Subject: [PATCH] feat: webapi detail pages --- components/api/Status.vue | 46 +++++++++ components/api/grid/Grid.vue | 5 +- components/api/grid/GridItem.vue | 10 +- components/api/list/List.vue | 5 +- components/api/list/ListItem.vue | 5 +- components/brand/Name.vue | 10 +- composables/webapis.ts | 38 +++++++ pages/apis/[id].vue | 160 +++++++++++++++++++++++++++++ pages/index.vue | 34 +++--- types/ui.d.ts | 1 + types/{index.d.ts => webapis.d.ts} | 11 +- unocss.config.ts | 4 +- utils/{apis.ts => webapis.ts} | 132 ++++++++++++------------ 13 files changed, 355 insertions(+), 106 deletions(-) create mode 100644 components/api/Status.vue create mode 100644 composables/webapis.ts create mode 100644 pages/apis/[id].vue create mode 100644 types/ui.d.ts rename types/{index.d.ts => webapis.d.ts} (78%) rename utils/{apis.ts => webapis.ts} (91%) diff --git a/components/api/Status.vue b/components/api/Status.vue new file mode 100644 index 0000000..c7006f2 --- /dev/null +++ b/components/api/Status.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/components/api/grid/Grid.vue b/components/api/grid/Grid.vue index 2f3d53a..198d62c 100644 --- a/components/api/grid/Grid.vue +++ b/components/api/grid/Grid.vue @@ -2,8 +2,9 @@
@@ -12,4 +13,6 @@ defineProps<{ apis: WebAPI[] }>() + +const webApiStatuses: Ref<{ [key: keyof typeof webApiData]: boolean }> = useState('webApiStatuses') diff --git a/components/api/grid/GridItem.vue b/components/api/grid/GridItem.vue index 3295642..664aad6 100644 --- a/components/api/grid/GridItem.vue +++ b/components/api/grid/GridItem.vue @@ -1,8 +1,7 @@