Skip to content

Commit 0cf4680

Browse files
authored
Merge pull request #354 from vuejs-jp/enhance/end-create-namecard
endedCreateNamecard
2 parents 2c1a1c6 + c119778 commit 0cf4680

File tree

6 files changed

+17
-3
lines changed

6 files changed

+17
-3
lines changed

apps/web/app/components/admin/AttendeeList.vue

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import type { Attendee } from '@vuejs-jp/model'
33
import { ref } from 'vue'
44
import { useSupabase } from '~/composables/useSupabase'
5+
import { endedCreateNamecard } from '~/utils/constants'
56
67
interface AttendeeListProps {
78
attendees: Attendee[]
@@ -79,6 +80,7 @@ const handleConfirm = (attendee?: Attendee) => {
7980
class="action"
8081
background-color="white"
8182
color="vue-blue"
83+
:disabled="endedCreateNamecard"
8284
@click="() => handleDialog(attendee?.id)"
8385
>
8486
Edit
@@ -88,6 +90,7 @@ const handleConfirm = (attendee?: Attendee) => {
8890
class="action"
8991
background-color="white"
9092
color="vue-blue"
93+
:disabled="endedCreateNamecard"
9194
@click="() => handleConfirm(attendee)"
9295
>
9396
{{ attendee.activated_at ? 'Deactivate' : 'Activate' }}

apps/web/app/components/ticket/NamecardSection.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import { useLocaleCurrent } from '~/composables/useLocaleCurrent'
3-
import { ticketUrl } from '~/utils/constants'
3+
import { endedCreateNamecard, ticketUrl } from '~/utils/constants'
44
55
const { locale: currentLocale } = useLocaleCurrent()
66
</script>
@@ -32,7 +32,7 @@ const { locale: currentLocale } = useLocaleCurrent()
3232
background-color="vue-green/200"
3333
color="white"
3434
>
35-
{{ $t('namecard.createNamecard') }}
35+
{{ endedCreateNamecard ? $t('namecard.confirmNamecard') : $t('namecard.createNamecard') }}
3636
</VFLinkButton>
3737
<VFLinkButton
3838
class="action-button"

apps/web/app/lang/en.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@
234234
"sectionTitle1": "With your avatar and name on it!",
235235
"sectionTitle2": "Namecard",
236236
"createNamecard": "Create Namecard",
237-
"title_edit": "Create/Edit Name Card",
237+
"confirmNamecard": "Confirm Namecard",
238+
"title_edit": "Create/Edit Namecard",
238239
"cancel": "Cancel",
239240
"edit": "Edit",
240241
"login_title": "Login via social account",

apps/web/app/lang/ja.json

+1
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@
252252
"sectionTitle1": "アバター+名前入りがもらえる!",
253253
"sectionTitle2": "ネームカード",
254254
"createNamecard": "ネームカードを作成する",
255+
"confirmNamecard": "ネームカードを確認する",
255256
"title_edit": "ネームカード作成・編集",
256257
"cancel": "キャンセル",
257258
"edit": "編集する",

apps/web/app/utils/constants.ts

+2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ export const endedApplyEarly = true
4949

5050
export const endedApplyHandson = true
5151

52+
export const endedCreateNamecard = true
53+
5254
export const displayNameMaxLength = 24
5355

5456
export const personalSponsors = [

packages/ui/components/link/LinkButton.vue

+7
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ interface LinkButtonProps extends /* @vue-ignore */ _LinkButtonProps {
1212
href?: string
1313
target?: string
1414
iconName?: IconName
15+
disabled?: boolean
1516
}
1617
const props = withDefaults(defineProps<LinkButtonProps>(), {
1718
is: 'a',
1819
href: '',
1920
target: '_blank',
2021
iconName: undefined,
22+
disabled: false,
2123
})
2224
2325
const { color: updateColor } = useColor()
@@ -65,6 +67,7 @@ const iconColor = computed(() => {
6567
:is="is ?? 'a'"
6668
:href
6769
:target
70+
:disabled
6871
:style
6972
class="link-button"
7073
@mouseover="hoverIn"
@@ -103,6 +106,10 @@ const iconColor = computed(() => {
103106
.link-button:hover {
104107
transition: 0.2s;
105108
}
109+
.link-button:disabled {
110+
pointer-events: none;
111+
opacity: 0.6;
112+
}
106113
.icon {
107114
margin-right: calc(var(--unit) * 1);
108115
width: var(--icon-size);

0 commit comments

Comments
 (0)