From 613c5315b368b4f4f293598eb7e782d7abed651c Mon Sep 17 00:00:00 2001 From: Ayaka Rizumu <464388324@qq.com> Date: Mon, 26 Dec 2022 16:50:11 +0800 Subject: [PATCH] feat: added a profile settings and settings nav (#432) --- components/account/AccountHeader.vue | 11 ++ components/common/CommonCropImage.vue | 109 ++++++++++++++++++ components/common/CommonInputImage.vue | 121 ++++++++++++++++++++ components/nav/NavSide.vue | 1 + components/settings/SettingsNavItem.vue | 60 ++++++++++ components/user/UserSwitcher.vue | 7 ++ composables/command.ts | 1 + composables/users.ts | 18 +++ composables/utils.ts | 2 + https-dev-config/local-https-server.mjs | 1 - layouts/default.vue | 10 +- locales/en-US.json | 29 ++++- locales/zh-CN.json | 30 ++++- package.json | 2 + pages/settings.vue | 41 +++++++ pages/settings/index.vue | 8 ++ pages/settings/preferences/index.vue | 21 ++++ pages/settings/profile/appearance.vue | 135 +++++++++++++++++++++++ pages/settings/profile/featured-tags.vue | 18 +++ pages/settings/profile/index.vue | 34 ++++++ pnpm-lock.yaml | 33 ++++++ styles/vars.css | 6 + unocss.config.ts | 7 ++ 23 files changed, 698 insertions(+), 7 deletions(-) create mode 100644 components/common/CommonCropImage.vue create mode 100644 components/common/CommonInputImage.vue create mode 100644 components/settings/SettingsNavItem.vue create mode 100644 pages/settings.vue create mode 100644 pages/settings/index.vue create mode 100644 pages/settings/preferences/index.vue create mode 100644 pages/settings/profile/appearance.vue create mode 100644 pages/settings/profile/featured-tags.vue create mode 100644 pages/settings/profile/index.vue diff --git a/components/account/AccountHeader.vue b/components/account/AccountHeader.vue index cbcc8d6a..e0c65995 100644 --- a/components/account/AccountHeader.vue +++ b/components/account/AccountHeader.vue @@ -62,6 +62,8 @@ watchEffect(() => { namedFields.value = named iconFields.value = icons }) + +const isSelf = $computed(() => currentUser.value?.account.id === account.id)