From 193d1cf5c53926cb9c744073be1992e1a4ea0c65 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Mon, 21 Nov 2022 14:55:31 +0800 Subject: [PATCH] feat: cache for publish widget --- components/account/AccountInfo.vue | 2 +- components/account/AccountMe.client.vue | 2 +- components/publish/PublishWidget.client.vue | 68 +++++++++++++++++++++ components/publish/PublishWidget.vue | 33 ---------- composables/content.ts | 2 +- composables/useCacheStorage.ts | 28 +++++++++ pages/@[user]/[post].vue | 16 +++-- plugins/store.client.ts | 33 +++++++++- types/index.ts | 8 ++- 9 files changed, 149 insertions(+), 43 deletions(-) create mode 100644 components/publish/PublishWidget.client.vue delete mode 100644 components/publish/PublishWidget.vue create mode 100644 composables/useCacheStorage.ts diff --git a/components/account/AccountInfo.vue b/components/account/AccountInfo.vue index 46ab87a2..703f42ce 100644 --- a/components/account/AccountInfo.vue +++ b/components/account/AccountInfo.vue @@ -17,7 +17,7 @@ defineProps<{

{{ account.displayName }}

-

+

@{{ account.acct }}

diff --git a/components/account/AccountMe.client.vue b/components/account/AccountMe.client.vue index dafd8733..68cb7640 100644 --- a/components/account/AccountMe.client.vue +++ b/components/account/AccountMe.client.vue @@ -9,7 +9,7 @@ const account = $computed(() => currentUser?.account) Login diff --git a/components/publish/PublishWidget.client.vue b/components/publish/PublishWidget.client.vue new file mode 100644 index 00000000..d3410787 --- /dev/null +++ b/components/publish/PublishWidget.client.vue @@ -0,0 +1,68 @@ + + +