Skip to content

Commit

Permalink
fix(UpdateChecker): 优化更新对话框中的文本格式和代码结构
Browse files Browse the repository at this point in the history
  • Loading branch information
thoulee21 committed Dec 13, 2024
1 parent 7caada2 commit ac6fff9
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/components/UpdateChecker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,15 @@ export const UpdateChecker = () => {
>
<Dialog.Icon icon="information" size={40} />
<Dialog.Title>{t('about.update.dialog.title')}</Dialog.Title>

<Dialog.Content>
<Text>
{availableUpdate?.createdAt
&& t(
'about.update.dialog.caption',
{ date: availableUpdate.createdAt.toISOString() }
)}
{t('about.update.dialog.ask')} </Text>
{availableUpdate?.createdAt && t(
'about.update.dialog.caption',
{ date: availableUpdate.createdAt.toISOString() }
)}
{t('about.update.dialog.ask')}
</Text>
</Dialog.Content>

<Dialog.Actions>
Expand All @@ -195,11 +196,9 @@ export const UpdateChecker = () => {
</Button>

<Button
onPress={
isUpdatePending
? () => RNRestart.Restart()
: fetchUpdateAndRestart
}
onPress={isUpdatePending
? () => RNRestart.Restart()
: fetchUpdateAndRestart}
>
{t('about.update.dialog.actions.update')}
</Button>
Expand Down

0 comments on commit ac6fff9

Please sign in to comment.