Skip to content

Commit 5743252

Browse files
committed
update: suggess style
1 parent 618e619 commit 5743252

File tree

3 files changed

+22
-15
lines changed

3 files changed

+22
-15
lines changed

src/data/data.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,10 @@
157157
{
158158
"id": "UI_SUGGESS_EXTEND",
159159
"lang": {
160-
"en": "Your life expectancy will increase by: {years} years",
161-
"zh": "你的寿命将延长:{years}",
162-
"zh-HK": "您的壽命將延長:{years}",
163-
"ja": "あなたの寿命は{years}年延びます"
160+
"en": "Your life expectancy will increase by: <span style=\"color:#49da54;\">{years} years</span>",
161+
"zh": "你的寿命将延长:<span style=\"color:#49da54;\">{years} 年</span>",
162+
"zh-HK": "您的壽命將延長:<span style=\"color:#49da54;\">{years} 年</span>",
163+
"ja": "あなたの寿命は<span style=\"color:#49da54;\">{years} 年</span>延びます"
164164
}
165165
},
166166
{
@@ -5218,6 +5218,6 @@
52185218
}
52195219
}
52205220
},
5221-
"version": "2025-03-20T09:51:16.927Z",
5222-
"timestamp": "2025-03-20T09:51:16.927Z"
5221+
"version": "2025-03-20T10:41:12.633Z",
5222+
"timestamp": "2025-03-20T10:41:12.633Z"
52235223
}

src/data/data.xlsx

178 Bytes
Binary file not shown.

src/pages/ResultPage.tsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -201,22 +201,29 @@ export function ResultPage({
201201
.filter(a => a.a < 0)
202202
.map(({ i }, n) => (
203203
<li key={i}>
204-
{n + 1}. {t(questions[i].suggess)}
204+
<span>{n + 1}.</span>
205+
<span
206+
dangerouslySetInnerHTML={{
207+
__html: t(questions[i].suggess),
208+
}}
209+
/>
205210
</li>
206211
))}
207212
{
208213
<li>
209-
<b>
210-
{t('UI_SUGGESS_EXTEND', {
211-
years: (alt - alter)
212-
.toFixed(2)
213-
.replace('.00', ''),
214-
})}
215-
</b>
214+
<span
215+
dangerouslySetInnerHTML={{
216+
__html: t('UI_SUGGESS_EXTEND', {
217+
years: (alt - alter)
218+
.toFixed(2)
219+
.replace('.00', ''),
220+
}),
221+
}}
222+
/>
216223
</li>
217224
}
218225
</ul>,
219-
{ autoClose: false, position: 'bottom-center' }
226+
{ autoClose: false, closeOnClick: true, position: 'bottom-center' }
220227
)
221228
selected.filter(a => a >= 0).map((s, i) => alts[i][s])
222229
}

0 commit comments

Comments
 (0)