From cb9ffc38c8fdc0aeb5313a5ab96372d3e64bb30a Mon Sep 17 00:00:00 2001 From: cuixiaorui Date: Sun, 11 Aug 2024 17:44:32 +0800 Subject: [PATCH] refactor: integration nuxt-ui and refactor modal component --- apps/client/app.config.ts | 8 + apps/client/app.vue | 1 + apps/client/components/Navbar.vue | 20 +- apps/client/components/common/Dialog.vue | 78 +++ .../components/courses/CoursePackCard.vue | 2 +- apps/client/components/main/Game.vue | 2 + .../client/components/main/GamePauseModal.vue | 89 +++ apps/client/components/main/MessageBox.vue | 65 --- apps/client/components/main/Tool.vue | 73 +-- apps/client/composables/main/useGamePause.ts | 2 - apps/client/nuxt.config.ts | 5 +- apps/client/package.json | 5 +- pnpm-lock.yaml | 507 +++++++++++++----- 13 files changed, 586 insertions(+), 271 deletions(-) create mode 100644 apps/client/app.config.ts create mode 100644 apps/client/components/common/Dialog.vue create mode 100644 apps/client/components/main/GamePauseModal.vue delete mode 100644 apps/client/components/main/MessageBox.vue diff --git a/apps/client/app.config.ts b/apps/client/app.config.ts new file mode 100644 index 000000000..ee48e9525 --- /dev/null +++ b/apps/client/app.config.ts @@ -0,0 +1,8 @@ +import { defineAppConfig } from "#imports"; + +export default defineAppConfig({ + ui: { + primary: "purple", + gray: "cool", + }, +}); diff --git a/apps/client/app.vue b/apps/client/app.vue index e451bf714..9d40401d4 100644 --- a/apps/client/app.vue +++ b/apps/client/app.vue @@ -11,6 +11,7 @@ + diff --git a/apps/client/components/Navbar.vue b/apps/client/components/Navbar.vue index 70e9465d5..a173ebee2 100644 --- a/apps/client/components/Navbar.vue +++ b/apps/client/components/Navbar.vue @@ -82,20 +82,16 @@ v-model:open="isOpenUserMenu" @logout="handleLogout" /> - + + diff --git a/apps/client/components/courses/CoursePackCard.vue b/apps/client/components/courses/CoursePackCard.vue index 0036af654..af4260033 100644 --- a/apps/client/components/courses/CoursePackCard.vue +++ b/apps/client/components/courses/CoursePackCard.vue @@ -9,7 +9,7 @@ :placeholder="[288, 180]" width="288" height="180" - class="absolute inset-0 h-full w-full object-cover" + class="inset-0 h-full w-full object-cover" />
diff --git a/apps/client/components/main/Game.vue b/apps/client/components/main/Game.vue index c8b5944be..621cb25c6 100644 --- a/apps/client/components/main/Game.vue +++ b/apps/client/components/main/Game.vue @@ -11,11 +11,13 @@ + diff --git a/apps/client/components/main/MessageBox.vue b/apps/client/components/main/MessageBox.vue deleted file mode 100644 index 6d5af7be3..000000000 --- a/apps/client/components/main/MessageBox.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - diff --git a/apps/client/components/main/Tool.vue b/apps/client/components/main/Tool.vue index b39880caa..d2f6ca303 100644 --- a/apps/client/components/main/Tool.vue +++ b/apps/client/components/main/Tool.vue @@ -60,26 +60,13 @@ :percentage="currentPercentage" /> - - -