diff --git a/.vscode/settings.json b/.vscode/settings.json index b7e45af..dd30eea 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,5 @@ "editor.formatOnSave": true, "prettier.useEditorConfig": false, "prettier.useTabs": false, - "prettier.configPath": ".prettierrc" + "prettier.configPath": "./.prettierrc" } diff --git a/backend/routes/auth/signup.js b/backend/routes/auth/signup.js index f172b35..8fed0d9 100644 --- a/backend/routes/auth/signup.js +++ b/backend/routes/auth/signup.js @@ -11,7 +11,7 @@ module.exports = function (sequelize) { router.post('/signup', async (req, res) => { try { - const { email, password, username, avatarPath } = req.body; + const { email, password, username } = req.body; const hashedPassword = await bcrypt.hash(password, 10); const userCount = await User.count(); @@ -25,7 +25,6 @@ module.exports = function (sequelize) { password: hashedPassword, username: username, role: initialRole, - avatarPath: avatarPath, }); const accessToken = jwt.sign({ userId: user.id }, 'your-secret-key', { diff --git a/frontend/config/selection.ts b/frontend/config/selection.ts index 908baf4..0cac983 100644 --- a/frontend/config/selection.ts +++ b/frontend/config/selection.ts @@ -55,20 +55,4 @@ const testRunCaseStatus = [ { uid: 'skipped', color: 'primary', chartColor: '#805aab' }, ]; -const avatars = [ - '/avatar/bear.png', - '/avatar/cat.png', - '/avatar/cow.png', - '/avatar/dog.png', - '/avatar/giraffe.png', - '/avatar/koala.png', - '/avatar/lion.png', - '/avatar/owl.png', - '/avatar/panda.png', - '/avatar/penguin.png', - '/avatar/rhinoceros.png', - '/avatar/shark.png', - '/avatar/sloth.png', -]; - -export { roles, priorities, testTypes, automationStatus, templates, testRunStatus, testRunCaseStatus, avatars }; +export { roles, priorities, testTypes, automationStatus, templates, testRunStatus, testRunCaseStatus }; diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d5afe1b..b6e3bfe 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -16,6 +16,7 @@ "@types/react-dom": "18.2.7", "apexcharts": "^3.49.0", "autoprefixer": "10.4.16", + "boring-avatars": "^1.10.2", "clsx": "^2.0.0", "dayjs": "^1.11.10", "eslint": "8.48.0", @@ -3185,6 +3186,11 @@ "node": ">=8" } }, + "node_modules/boring-avatars": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/boring-avatars/-/boring-avatars-1.10.2.tgz", + "integrity": "sha512-uQyvmNeW6loz4Yytj7aDo0IhhuByW/YyOHtqwb3kQ/x48hum22hROA2Wn3qzrLR5JsoZ+FHjPO6z6LrXrWjegg==" + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", diff --git a/frontend/package.json b/frontend/package.json index 62847f9..85e00f6 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -17,6 +17,7 @@ "@types/react-dom": "18.2.7", "apexcharts": "^3.49.0", "autoprefixer": "10.4.16", + "boring-avatars": "^1.10.2", "clsx": "^2.0.0", "dayjs": "^1.11.10", "eslint": "8.48.0", diff --git a/frontend/public/avatar/bear.png b/frontend/public/avatar/bear.png deleted file mode 100644 index 31f51b7..0000000 Binary files a/frontend/public/avatar/bear.png and /dev/null differ diff --git a/frontend/public/avatar/cat.png b/frontend/public/avatar/cat.png deleted file mode 100644 index bc7d433..0000000 Binary files a/frontend/public/avatar/cat.png and /dev/null differ diff --git a/frontend/public/avatar/cow.png b/frontend/public/avatar/cow.png deleted file mode 100644 index 256fb64..0000000 Binary files a/frontend/public/avatar/cow.png and /dev/null differ diff --git a/frontend/public/avatar/dog.png b/frontend/public/avatar/dog.png deleted file mode 100644 index d729b8b..0000000 Binary files a/frontend/public/avatar/dog.png and /dev/null differ diff --git a/frontend/public/avatar/giraffe.png b/frontend/public/avatar/giraffe.png deleted file mode 100644 index 4f3166a..0000000 Binary files a/frontend/public/avatar/giraffe.png and /dev/null differ diff --git a/frontend/public/avatar/koala.png b/frontend/public/avatar/koala.png deleted file mode 100644 index e3e5f2c..0000000 Binary files a/frontend/public/avatar/koala.png and /dev/null differ diff --git a/frontend/public/avatar/lion.png b/frontend/public/avatar/lion.png deleted file mode 100644 index 6080b4b..0000000 Binary files a/frontend/public/avatar/lion.png and /dev/null differ diff --git a/frontend/public/avatar/owl.png b/frontend/public/avatar/owl.png deleted file mode 100644 index 01c7bb3..0000000 Binary files a/frontend/public/avatar/owl.png and /dev/null differ diff --git a/frontend/public/avatar/panda.png b/frontend/public/avatar/panda.png deleted file mode 100644 index ddc1981..0000000 Binary files a/frontend/public/avatar/panda.png and /dev/null differ diff --git a/frontend/public/avatar/penguin.png b/frontend/public/avatar/penguin.png deleted file mode 100644 index a7f31c0..0000000 Binary files a/frontend/public/avatar/penguin.png and /dev/null differ diff --git a/frontend/public/avatar/rhinoceros.png b/frontend/public/avatar/rhinoceros.png deleted file mode 100644 index 2edc589..0000000 Binary files a/frontend/public/avatar/rhinoceros.png and /dev/null differ diff --git a/frontend/public/avatar/shark.png b/frontend/public/avatar/shark.png deleted file mode 100644 index 3200072..0000000 Binary files a/frontend/public/avatar/shark.png and /dev/null differ diff --git a/frontend/public/avatar/sloth.png b/frontend/public/avatar/sloth.png deleted file mode 100644 index 9f742b4..0000000 Binary files a/frontend/public/avatar/sloth.png and /dev/null differ diff --git a/frontend/src/app/[locale]/account/AccountPage.tsx b/frontend/src/app/[locale]/account/AccountPage.tsx index a310234..aa64daa 100644 --- a/frontend/src/app/[locale]/account/AccountPage.tsx +++ b/frontend/src/app/[locale]/account/AccountPage.tsx @@ -1,7 +1,8 @@ 'use client'; import { useContext } from 'react'; -import { Avatar, Card, CardHeader, CardBody, Divider } from '@nextui-org/react'; +import { Card, CardHeader, CardBody, Divider } from '@nextui-org/react'; import { TokenContext } from '../TokenProvider'; +import Avatar from 'boring-avatars'; type AccountPageMessages = { yourProjects: string; @@ -20,7 +21,12 @@ export default function AccountPage({ messages, locale }: Props) { {context.token && context.token.user && ( - +

{context.token.user.username}

{context.token.user.email}

diff --git a/frontend/src/app/[locale]/account/authPage.tsx b/frontend/src/app/[locale]/account/authPage.tsx index 769fd94..33b41b1 100644 --- a/frontend/src/app/[locale]/account/authPage.tsx +++ b/frontend/src/app/[locale]/account/authPage.tsx @@ -57,8 +57,6 @@ export default function AuthPage({ isSignup, messages, locale }: Props) { } } - const initialavatarPath = getRandomAvatarPath(); - user.avatarPath = initialavatarPath; await submit(); };