From 7c66f9e29a91a5a1e63bcce822fc07939945ca91 Mon Sep 17 00:00:00 2001 From: Germey Tsui Date: Sun, 7 Jan 2024 17:51:30 +0800 Subject: [PATCH] update styles --- src/components/common/AuthPanel.vue | 10 +- src/components/common/Chevron.vue | 38 ++++++ src/components/common/Navigator.vue | 146 ++++++++++++++++++----- src/components/console/SidePanel.vue | 16 ++- src/config.ts | 62 ++++++++++ src/env.d.ts | 3 + src/i18n/zh/common/nav.ts | 2 +- src/layouts/Chat.vue | 2 +- src/layouts/Console.vue | 9 +- src/layouts/Main.vue | 1 - src/layouts/Midjourney.vue | 2 +- src/main.ts | 6 + src/pages/console/distribution/Index.vue | 3 + src/plugins/config.ts | 14 +++ src/plugins/font-awesome.ts | 4 +- src/store/common/models.ts | 4 +- src/store/common/state.ts | 4 + tsconfig.json | 2 +- 18 files changed, 278 insertions(+), 50 deletions(-) create mode 100644 src/components/common/Chevron.vue create mode 100644 src/config.ts create mode 100644 src/plugins/config.ts diff --git a/src/components/common/AuthPanel.vue b/src/components/common/AuthPanel.vue index 06db452..3fa5e0d 100644 --- a/src/components/common/AuthPanel.vue +++ b/src/components/common/AuthPanel.vue @@ -27,7 +27,15 @@ export default defineComponent({ return `${getBaseUrlAuth()}/auth/login?inviter_id=${this.inviterId}`; }, inviterId() { - const result = this.$route.query.inviter_id?.toString() || getCookie('INVITER_ID'); + // if forceInviterId is set, then use forceInviterId + if (this.$config?.distribution?.forceInviterId) { + return this.$config?.distribution?.defaultInviterId; + } + // Otherwise, use the inviter_id in the url, then use the inviter_id in the cookie, and finally use the default inviter_id + const result = + this.$route.query.inviter_id?.toString() || + getCookie('INVITER_ID') || + this.$config?.distribution?.defaultInviterId; return result; }, authenticated() { diff --git a/src/components/common/Chevron.vue b/src/components/common/Chevron.vue new file mode 100644 index 0000000..374131f --- /dev/null +++ b/src/components/common/Chevron.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/src/components/common/Navigator.vue b/src/components/common/Navigator.vue index 58819c7..01e3e27 100644 --- a/src/components/common/Navigator.vue +++ b/src/components/common/Navigator.vue @@ -1,13 +1,26 @@