mirror of
https://github.com/optim-enterprises-bv/OptimCloud-gw-ui.git
synced 2025-11-02 19:27:45 +00:00
[WIFI-11563] Added import file button to configure modal
Signed-off-by: Charles <charles.bourque96@gmail.com>
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ucentral-client",
|
"name": "ucentral-client",
|
||||||
"version": "2.8.0(5)",
|
"version": "2.8.0(8)",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ucentral-client",
|
"name": "ucentral-client",
|
||||||
"version": "2.8.0(5)",
|
"version": "2.8.0(8)",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/icons": "^2.0.11",
|
"@chakra-ui/icons": "^2.0.11",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ucentral-client",
|
"name": "ucentral-client",
|
||||||
"version": "2.8.0(5)",
|
"version": "2.8.0(8)",
|
||||||
"description": "",
|
"description": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "index.tsx",
|
"main": "index.tsx",
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import {
|
|||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { SaveButton } from '../../Buttons/SaveButton';
|
import { SaveButton } from '../../Buttons/SaveButton';
|
||||||
import { Modal } from '../Modal';
|
import { Modal } from '../Modal';
|
||||||
|
import { FileInputButton } from 'components/Buttons/FileInputButton';
|
||||||
import { useConfigureDevice } from 'hooks/Network/Commands';
|
import { useConfigureDevice } from 'hooks/Network/Commands';
|
||||||
|
|
||||||
export type ConfigureModalProps = {
|
export type ConfigureModalProps = {
|
||||||
@@ -91,7 +92,16 @@ export const ConfigureModal = ({ serialNumber, modalProps }: ConfigureModalProps
|
|||||||
</Alert>
|
</Alert>
|
||||||
<FormControl isInvalid={!isValid && newConfig.length > 0}>
|
<FormControl isInvalid={!isValid && newConfig.length > 0}>
|
||||||
<FormLabel>{t('configurations.one')}</FormLabel>
|
<FormLabel>{t('configurations.one')}</FormLabel>
|
||||||
<Textarea height="auto" minH="200px" value={newConfig} onChange={onChange} />
|
<Box mb={2} w="240px">
|
||||||
|
<FileInputButton
|
||||||
|
value={newConfig}
|
||||||
|
setValue={(v) => setNewConfig(v)}
|
||||||
|
refreshId="1"
|
||||||
|
accept=".json"
|
||||||
|
isStringFile
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
<Textarea height="auto" minH="600px" value={newConfig} onChange={onChange} />
|
||||||
<FormErrorMessage>{t('controller.configure.invalid')}</FormErrorMessage>
|
<FormErrorMessage>{t('controller.configure.invalid')}</FormErrorMessage>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user