Skip to content

Commit 131621d

Browse files
committed
feat: render circular loader in manual install button while installing
1 parent 771bbf9 commit 131621d

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

i18n/en.pot

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ msgstr ""
55
"Content-Type: text/plain; charset=utf-8\n"
66
"Content-Transfer-Encoding: 8bit\n"
77
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
8-
"POT-Creation-Date: 2021-05-31T12:19:50.489Z\n"
9-
"PO-Revision-Date: 2021-05-31T12:19:50.489Z\n"
8+
"POT-Creation-Date: 2021-05-31T15:48:18.461Z\n"
9+
"PO-Revision-Date: 2021-05-31T15:48:18.461Z\n"
1010

1111
msgid "Version {{version}} installed"
1212
msgstr ""

src/pages/ManualInstall/ManualInstall.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useAlert } from '@dhis2/app-runtime'
22
import i18n from '@dhis2/d2-i18n'
3-
import { Button } from '@dhis2/ui'
3+
import { Button, CircularLoader } from '@dhis2/ui'
44
import React, { useState, useRef } from 'react'
55
import { useApi } from '../../api'
66
import styles from './ManualInstall.module.css'
@@ -52,9 +52,14 @@ const UploadButton = () => {
5252
onClick={handleClick}
5353
disabled={isUploading}
5454
>
55-
{isUploading
56-
? i18n.t('Uploading...')
57-
: i18n.t('Upload an app to install')}
55+
{isUploading ? (
56+
<>
57+
{i18n.t('Uploading...')}
58+
<CircularLoader small />
59+
</>
60+
) : (
61+
i18n.t('Upload an app to install')
62+
)}
5863
</Button>
5964
</>
6065
)

0 commit comments

Comments
 (0)