diff --git a/frontend/src/assets/icons/back.svg b/frontend/src/assets/icons/back.svg new file mode 100644 index 0000000000..dcf17773f8 --- /dev/null +++ b/frontend/src/assets/icons/back.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/icons/index.ts b/frontend/src/assets/icons/index.ts index 5a5447ee3f..cc02921e2c 100644 --- a/frontend/src/assets/icons/index.ts +++ b/frontend/src/assets/icons/index.ts @@ -1,3 +1,4 @@ +import Back from './back.svg?component' import Bell from './bell.svg?component' import Camera from './camera.svg?component' import Cockpit from './cockpit.svg?component' @@ -13,6 +14,7 @@ import Message from './message.svg?component' import Pinterest from './pinterest.svg?component' import Place from './place.svg?component' import Share from './share.svg?component' +import Triangle from './triangle.svg?component' import Website from './website.svg?component' import Working from './working.svg?component' import WorldCafe from './worldCafe.svg?component' @@ -23,6 +25,7 @@ import Youtube from './youtube.svg?component' import type { IconAliases } from 'vuetify' const aliases: Partial = { + back: Back, bell: Bell, camera: Camera, cockpit: Cockpit, @@ -38,6 +41,7 @@ const aliases: Partial = { pinterest: Pinterest, place: Place, share: Share, + triange: Triangle, website: Website, working: Working, 'world-cafe': WorldCafe, diff --git a/frontend/src/assets/icons/triangle.svg b/frontend/src/assets/icons/triangle.svg new file mode 100644 index 0000000000..2fbf639981 --- /dev/null +++ b/frontend/src/assets/icons/triangle.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/components/cockpit/about-me/AboutMe.stories.ts b/frontend/src/components/cockpit/about-me/AboutMe.stories.ts index 2d92cfe06a..7f3cd5c600 100644 --- a/frontend/src/components/cockpit/about-me/AboutMe.stories.ts +++ b/frontend/src/components/cockpit/about-me/AboutMe.stories.ts @@ -9,25 +9,7 @@ const meta = { component: AboutMe as SBComp, tags: ['autodocs'], argTypes: {}, - args: { - name: 'John Doe', - initials: 'JD', - introduction: 'Pushing pixels and experiences', - availability: 'available', - details: [ - { category: 'place', text: 'Berlin, Germany' }, - { category: 'place', text: 'Madrid, Spain' }, - { category: 'work', text: 'Frontend Developer at Company XY' }, - { category: 'language', text: 'English, German, Spanish' }, - { category: 'education', text: 'B.Sc. Computer Science' }, - { category: 'feeling', text: 'Happy like a really happy honey cake horse' }, - ], - social: { - linkedin: 'https://www.linkedin.com/in/johndoe', - xing: 'https://www.xing.com/profile/John_Doe', - x: 'https://www.x.com/johndoe', - }, - }, + args: {}, } satisfies Meta export default meta diff --git a/frontend/src/components/cockpit/about-me/AboutMe.vue b/frontend/src/components/cockpit/about-me/AboutMe.vue index 554c19d8ac..212ee06227 100644 --- a/frontend/src/components/cockpit/about-me/AboutMe.vue +++ b/frontend/src/components/cockpit/about-me/AboutMe.vue @@ -1,187 +1,73 @@ - - - - - - {{ props.initials }} - - - - {{ item.circle }} {{ item.text }} - - - {{ props.name }} - {{ props.introduction }} - - - - {{ detail.text }} - - - - - - - - - - - - - - - - - - - - - - - - - - + + setMode('edit')" + @update-availability="updateAvailability" + > + setMode('view')" + > + - - + diff --git a/frontend/src/components/cockpit/about-me/AboutMeEdit.vue b/frontend/src/components/cockpit/about-me/AboutMeEdit.vue new file mode 100644 index 0000000000..47f42de881 --- /dev/null +++ b/frontend/src/components/cockpit/about-me/AboutMeEdit.vue @@ -0,0 +1,82 @@ + + + + + + {{ $t('cockpit.about-me.edit.title') }} + + + + + + + {{ $t('cockpit.about-me.edit.add') }} + + + + removeDetail(item.id)"> + {{ item.text }} + + + + + + + + + diff --git a/frontend/src/components/cockpit/about-me/AboutMeView.stories.ts b/frontend/src/components/cockpit/about-me/AboutMeView.stories.ts new file mode 100644 index 0000000000..81114b443b --- /dev/null +++ b/frontend/src/components/cockpit/about-me/AboutMeView.stories.ts @@ -0,0 +1,51 @@ +import { SBComp } from '#types/SBComp' + +import AboutMeView from './AboutMeView.vue' + +import type { Meta, StoryObj } from '@storybook/vue3' + +const meta = { + title: 'Cockpit/AboutMe/AboutMeView', + component: AboutMeView as SBComp, + tags: ['autodocs'], + argTypes: {}, + args: { + name: 'John Doe', + username: 'john23', + initials: 'JD', + introduction: 'Pushing pixels and experiences', + availability: 'available', + details: [ + { id: 1, category: 'place', text: 'Berlin, Germany' }, + { id: 2, category: 'place', text: 'Madrid, Spain' }, + { id: 3, category: 'work', text: 'Frontend Developer at Company XY' }, + { id: 4, category: 'language', text: 'English, German, Spanish' }, + { id: 5, category: 'education', text: 'B.Sc. Computer Science' }, + { id: 6, category: 'feeling', text: 'Happy like a really happy honey cake horse' }, + ], + social: [ + { + id: 1, + type: 'linkedin', + link: 'https://www.linkedin.com/in/johndoe', + }, + { + id: 2, + type: 'xing', + link: 'https://www.xing.com/profile/John_Doe', + }, + { + id: 3, + type: 'x', + link: 'https://www.x.com/johndoe', + }, + ], + }, +} satisfies Meta + +export default meta +type Story = StoryObj + +export const Raw: Story = { + args: {}, +} diff --git a/frontend/src/components/cockpit/about-me/AboutMeView.vue b/frontend/src/components/cockpit/about-me/AboutMeView.vue new file mode 100644 index 0000000000..4a7a78644a --- /dev/null +++ b/frontend/src/components/cockpit/about-me/AboutMeView.vue @@ -0,0 +1,158 @@ + + + + + + + {{ props.initials }} + + + + + {{ item.circle }} {{ item.text }} + + + + + {{ props.name }} + + + {{ props.introduction }} + + + + {{ + detail.text + }} + + + + + + + + + + + + + + + + diff --git a/frontend/src/components/cockpit/about-me/CustomSelect.stories.ts b/frontend/src/components/cockpit/about-me/CustomSelect.stories.ts new file mode 100644 index 0000000000..edbcb07c0d --- /dev/null +++ b/frontend/src/components/cockpit/about-me/CustomSelect.stories.ts @@ -0,0 +1,20 @@ +import { SBComp } from '#types/SBComp' + +import CustomSelect from './CustomSelect.vue' + +import type { Meta, StoryObj } from '@storybook/vue3' + +const meta = { + title: 'Cockpit/AboutMe/CustomSelect', + component: CustomSelect as SBComp, + tags: ['autodocs'], + argTypes: {}, + args: {}, +} satisfies Meta + +export default meta +type Story = StoryObj + +export const Raw: Story = { + args: {}, +} diff --git a/frontend/src/components/cockpit/about-me/CustomSelect.vue b/frontend/src/components/cockpit/about-me/CustomSelect.vue new file mode 100644 index 0000000000..795c3cf0cb --- /dev/null +++ b/frontend/src/components/cockpit/about-me/CustomSelect.vue @@ -0,0 +1,56 @@ + + + + + {{ item.circle }} {{ item.text }} + + + + {{ selectedOption?.text }} + + + + + + + diff --git a/frontend/src/components/cockpit/about-me/detailCategoryToIcon.ts b/frontend/src/components/cockpit/about-me/detailCategoryToIcon.ts new file mode 100644 index 0000000000..fd20363ff3 --- /dev/null +++ b/frontend/src/components/cockpit/about-me/detailCategoryToIcon.ts @@ -0,0 +1,18 @@ +import type { UserDetailCategory } from '#stores/userStore.js' + +export function detailCategoryToIcon(category: UserDetailCategory) { + switch (category) { + case 'place': + return '$place' + case 'work': + return '$working' + case 'language': + return '$world' + case 'education': + return '$education' + case 'feeling': + return '$feeling' + default: + throw new Error(`Unknown category`) + } +} diff --git a/frontend/src/components/cockpit/cockpitCard/CockpitCard.vue b/frontend/src/components/cockpit/cockpitCard/CockpitCard.vue index c734a498a5..e20ae8c9a3 100644 --- a/frontend/src/components/cockpit/cockpitCard/CockpitCard.vue +++ b/frontend/src/components/cockpit/cockpitCard/CockpitCard.vue @@ -14,7 +14,7 @@ import { useSlots } from 'vue' const slots = useSlots() const props = defineProps<{ - narrow: boolean + narrow?: boolean }>() @@ -27,6 +27,10 @@ const props = defineProps<{ border-radius: 20px; } +.header { + font-size: 16px; +} + .hr { margin-block: 15px; margin-inline: calc(-1 * var(--padding)); diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 6c5934c5b7..8d1f8ac6e2 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -22,7 +22,10 @@ }, "cockpit": { "about-me": { - "header": "Über mich" + "edit": { + "title": "Über mich", + "add": "Hinzufügen", + } } }, "error": { diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index d5f4b60222..de942f9beb 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -22,7 +22,10 @@ }, "cockpit": { "about-me": { - "header": "About me" + "edit": { + "title": "About me", + "add": "Add", + } } }, "error": {