Skip to content

Commit 7f16f4a

Browse files
sumi-0011claudesumiOrchemi
authored
퀴즈 생성 카드 임시 비활성화 (#367)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: sumi <sumi@sumiui-MacBookAir.local> Co-authored-by: 박승훈 <tmdgns1126@naver.com>
1 parent 7a48165 commit 7f16f4a

6 files changed

Lines changed: 54 additions & 10 deletions

File tree

apps/web/messages/en_US.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@
210210
"invalid-guild-name": "Guild name may only contain alphanumeric characters or single hyphens, and cannot begin or end with a hyphen."
211211
},
212212
"Quiz": {
213+
"prepare": "Coming Soon",
213214
"quiz-solve-description": "Create a quiz or solve it to earn points!",
214215
"solve-todays-quiz-description": "Solve today's quiz and get points!",
215216
"check-language-for-quiz-dialog-title": "Change Language",

apps/web/messages/ko_KR.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@
211211
"invalid-guild-name": "길드 이름은 영문자, 숫자, -만 포함할 수 있으며, -으로 시작하거나 끝날 수 없습니다."
212212
},
213213
"Quiz": {
214+
"prepare": "준비중",
214215
"quiz-solve-description": "퀴즈를 만들거나 풀어서 포인트를 모아보세요!",
215216
"create-quiz-card-title": "퀴즈 만들기",
216217
"create-quiz-card-description": "O/X 퀴즈를 만들고 [point]P를 모아보세요!",

apps/web/src/app/[locale]/game/quiz/_components/CreateOrSolve/QuizTypeCard.tsx

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,20 @@ interface QuizTypeCardProps {
99
point: string;
1010
onClick: () => void;
1111
isDisabled?: boolean;
12+
disabledLabel?: string;
1213
}
1314

14-
const QuizTypeCard = ({ title, description, image, point, onClick, isDisabled }: QuizTypeCardProps) => {
15+
const QuizTypeCard = ({ title, description, image, point, onClick, isDisabled, disabledLabel }: QuizTypeCardProps) => {
1516
return (
1617
<button className={cx(cardStyle, isDisabled && disabledStyle)} onClick={onClick} disabled={isDisabled}>
17-
<Image className={imageStyle} src={image} alt={title} width={100} height={100} />
18-
<Flex direction="column" gap="4px">
18+
<Image className={cx(imageStyle, isDisabled && disabledContentStyle)} src={image} alt={title} width={100} height={100} />
19+
<Flex className={isDisabled ? disabledContentStyle : undefined} direction="column" gap="4px">
1920
<h4 className={titleStyle}>{title}</h4>
2021
<p className={descriptionStyle}>{description}</p>
2122
</Flex>
22-
<p className={pointStyle}>{point}</p>
23+
<p className={isDisabled && disabledLabel ? disabledLabelStyle : pointStyle}>
24+
{isDisabled && disabledLabel ? disabledLabel : point}
25+
</p>
2326
</button>
2427
);
2528
};
@@ -38,10 +41,26 @@ const cardStyle = css({
3841
});
3942

4043
const disabledStyle = css({
41-
opacity: 0.5,
4244
pointerEvents: 'none',
4345
});
4446

47+
const disabledContentStyle = css({
48+
opacity: 0.4,
49+
filter: 'grayscale(1)',
50+
});
51+
52+
const disabledLabelStyle = css({
53+
position: 'absolute',
54+
top: '8px',
55+
right: '8px',
56+
padding: '2px 12px',
57+
backgroundColor: 'white.white_50',
58+
borderRadius: 'full',
59+
textStyle: 'glyph12.regular',
60+
fontWeight: 700,
61+
color: 'white',
62+
});
63+
4564
const imageStyle = css({
4665
flexShrink: 0,
4766
});

apps/web/src/app/[locale]/game/quiz/_components/CreateOrSolve/SelectQuizType.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ const SelectQuizType = wrap
6464
image="/assets/game/quiz/quiz-cat.webp"
6565
point={`${QUIZ_REGISTER_POINT}P`}
6666
onClick={() => router.push(ROUTE.GAME.QUIZ.CREATE())}
67+
isDisabled
68+
disabledLabel={t('prepare')}
6769
/>
6870
<QuizTypeCard
6971
title={quizSolveCard.title}

apps/webview/src/pages/game/quiz/_components/CreateOrSolve/QuizTypeCard.tsx

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,20 @@ interface QuizTypeCardProps {
88
point: string;
99
onClick: () => void;
1010
isDisabled?: boolean;
11+
disabledLabel?: string;
1112
}
1213

13-
const QuizTypeCard = ({ title, description, image, point, onClick, isDisabled }: QuizTypeCardProps) => {
14+
const QuizTypeCard = ({ title, description, image, point, onClick, isDisabled, disabledLabel }: QuizTypeCardProps) => {
1415
return (
1516
<button className={cx(cardStyle, isDisabled && disabledStyle)} onClick={onClick} disabled={isDisabled}>
16-
<img className={imageStyle} src={image} alt={title} width={100} height={100} />
17-
<Flex direction="column" gap="4px">
17+
<img className={cx(imageStyle, isDisabled && disabledContentStyle)} src={image} alt={title} width={100} height={100} />
18+
<Flex className={isDisabled ? disabledContentStyle : undefined} direction="column" gap="4px">
1819
<h4 className={titleStyle}>{title}</h4>
1920
<p className={descriptionStyle}>{description}</p>
2021
</Flex>
21-
<p className={pointStyle}>{point}</p>
22+
<p className={isDisabled && disabledLabel ? disabledLabelStyle : pointStyle}>
23+
{isDisabled && disabledLabel ? disabledLabel : point}
24+
</p>
2225
</button>
2326
);
2427
};
@@ -37,10 +40,14 @@ const cardStyle = css({
3740
});
3841

3942
const disabledStyle = css({
40-
opacity: 0.5,
4143
pointerEvents: 'none',
4244
});
4345

46+
const disabledContentStyle = css({
47+
opacity: 0.4,
48+
filter: 'grayscale(1)',
49+
});
50+
4451
const imageStyle = css({
4552
flexShrink: 0,
4653
});
@@ -62,6 +69,18 @@ const descriptionStyle = css({
6269
textAlign: 'left',
6370
});
6471

72+
const disabledLabelStyle = css({
73+
position: 'absolute',
74+
top: '8px',
75+
right: '8px',
76+
padding: '2px 12px',
77+
backgroundColor: 'white.white_50',
78+
borderRadius: 'full',
79+
textStyle: 'glyph12.regular',
80+
fontWeight: 700,
81+
color: 'white',
82+
});
83+
6584
const pointStyle = css({
6685
position: 'absolute',
6786
top: '8px',

apps/webview/src/pages/game/quiz/_components/CreateOrSolve/SelectQuizType.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ const SelectQuizType = wrap
3333
image="/assets/game/quiz/quiz-cat.webp"
3434
point={`${QUIZ_REGISTER_POINT}P`}
3535
onClick={() => navigate(ROUTES.GAME.QUIZ.CREATE())}
36+
isDisabled
37+
disabledLabel={t('prepare', { ns: 'shop' })}
3638
/>
3739
<QuizTypeCard
3840
title={quizSolveCard.title}

0 commit comments

Comments
 (0)