From a200f27a173f6bfbc27b4f4a19df511bb3ba35b9 Mon Sep 17 00:00:00 2001 From: Trenton Zimmer <66042448+trmazi@users.noreply.github.com> Date: Mon, 17 Mar 2025 17:21:40 -0400 Subject: [PATCH] Add profile customization support. --- src/components/UserAvatar.vue | 13 ++- src/components/UserAvatarCurrentUser.vue | 6 +- src/components/UserCard.vue | 43 +++++---- src/constants/customizations.js | 33 +++++++ src/constants/index.js | 8 ++ src/menuNavBar.js | 6 ++ src/router/index.js | 16 ++-- src/stores/api/account.js | 12 +++ src/stores/main.js | 5 + src/views/Profile/CustomizeView.vue | 112 +++++++++++++++++------ src/views/Profile/ProfileView.vue | 1 + 11 files changed, 193 insertions(+), 62 deletions(-) create mode 100644 src/constants/customizations.js diff --git a/src/components/UserAvatar.vue b/src/components/UserAvatar.vue index de1b93c..4c8bb81 100644 --- a/src/components/UserAvatar.vue +++ b/src/components/UserAvatar.vue @@ -1,6 +1,8 @@ diff --git a/src/components/UserCard.vue b/src/components/UserCard.vue index 5176b03..bcf3902 100644 --- a/src/components/UserCard.vue +++ b/src/components/UserCard.vue @@ -33,25 +33,19 @@ const mainStore = useMainStore(); const greeting = GetRandomMessage(); -// var last = { -// game: "beatmaniaIIDX", -// version: "22 PENDUAL", -// arcade: "Ho-House", -// }; - -function getCardStyle(game) { - if (game !== null) { - return ` - background-image: url('${ASSET_PATH}/card/${game}.webp'); - background-size: cover; - background-repeat: no-repeat; - `; - } +function getCardStyle() { + return ` + background-image: url('${ASSET_PATH}/card/${ + mainStore.userCustomize?.card ?? "time" + }.webp'); + background-size: cover; + background-repeat: no-repeat; + `; }