Skip to content

Commit 23c2182

Browse files
committed
feat(namecard): add base ui on user page
1 parent 5bf0038 commit 23c2182

File tree

3 files changed

+87
-6
lines changed

3 files changed

+87
-6
lines changed

apps/web/app/lang/en.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,5 +120,15 @@
120120
"privacy": {
121121
"title": "Privacy Policy",
122122
"button": "Back to Top"
123+
},
124+
"namecard": {
125+
"title_edit": "Create/Edit Name Card",
126+
"edit": "edit",
127+
"creation_status": {
128+
"not_created": "not created",
129+
"inquiry_in_progress": "inquiry in progress",
130+
"inquiry_failed": "inquiry failed",
131+
"inquiry_completed": "inquiry complete"
132+
}
123133
}
124-
}
134+
}

apps/web/app/lang/ja.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,15 @@
138138
"privacy": {
139139
"title": "プライバシーポリシー",
140140
"button": "トップに戻る"
141+
},
142+
"namecard": {
143+
"title_edit": "ネームカード作成・編集",
144+
"edit": "編集する",
145+
"creation_status": {
146+
"not_created": "未作成",
147+
"inquiry_in_progress": "注文番号照会中",
148+
"inquiry_failed": "注文番号照会失敗",
149+
"inquiry_completed": "注文番号照合完了"
150+
}
141151
}
142-
}
152+
}
Lines changed: 65 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,76 @@
1-
<script setup lang="ts"></script>
1+
<script setup lang="ts">
2+
import { computed } from 'vue'
3+
import { useI18n } from '#i18n'
4+
import CreationStatus, { type Status } from '~/components/namecard/CreationStatus.vue'
5+
import { useColor, useTypography } from '@vuejs-jp/composable'
6+
import type { NamecardUser } from '@vuejs-jp/model'
7+
8+
const { t } = useI18n()
9+
const { fontWeight, fontSize } = useTypography()
10+
const { color } = useColor()
11+
12+
const statusKey = computed<Status>(() => {
13+
// TODO テーブルから取得する
14+
return 'not_created'
15+
})
16+
const user = computed<NamecardUser>(() => {
17+
// TODO テーブルから取得する
18+
return {
19+
display_name: 'jiyuujin',
20+
avatar_url: '',
21+
role: 'attendee',
22+
}
23+
})
24+
</script>
225
<template>
326
<div class="name-card-user-root">
4-
<VFLinkButton is="button" background-color="vue-green/200" color="white" href=""
5-
>hoge</VFLinkButton
27+
<h1
28+
:style="{
29+
fontWeight: fontWeight('heading/700'),
30+
fontSize: fontSize('heading/700'),
31+
color: color('vue-blue'),
32+
}"
33+
class="title"
634
>
35+
{{ t('namecard.title_edit') }}
36+
</h1>
37+
<CreationStatus :status-key="statusKey" class="creation-status" />
38+
<VFNamecard23 :user="user" class="namecard" />
39+
<VFLinkButton
40+
is="button"
41+
background-color="vue-green/200"
42+
color="white"
43+
href=""
44+
class="edit-button"
45+
>{{ t('namecard.edit') }}</VFLinkButton
46+
>
47+
<!-- TODO 作成フロー・注記挿入 -->
748
</div>
849
</template>
950

1051
<style scoped>
52+
@import url('~/assets/media.css');
53+
1154
.name-card-user-root {
1255
--header-height: calc(var(--unit) * 10);
13-
padding-top: var(--header-height);
56+
padding-top: calc(var(--header-height) + var(--unit) * 15);
57+
text-align: center;
58+
}
59+
.title {
60+
margin-bottom: calc(var(--unit) * 5);
61+
}
62+
.creation-status {
63+
margin: 0 auto calc(var(--unit) * 2.5);
64+
}
65+
.namecard {
66+
margin: 0 auto calc(var(--unit) * 5);
67+
}
68+
.edit-button {
69+
display: flex;
70+
justify-content: center;
71+
align-items: center;
72+
width: 198px;
73+
height: 66px;
74+
margin: 0 auto calc(var(--unit) * 5);
1475
}
1576
</style>

0 commit comments

Comments
 (0)