mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed review comments:
1. Split the restore options/backup options into 2 tabs 2. Restore icon changes 3. feature tests issues 4. restore help link broken 5. Comment section not visible refs #7018
This commit is contained in:
committed by
Akshay Joshi
parent
f56b4030f1
commit
6528d086ba
@@ -12,6 +12,7 @@ import { Box, makeStyles } from '@material-ui/core';
|
||||
import {Accordion, AccordionSummary, AccordionDetails} from '@material-ui/core';
|
||||
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
|
||||
import SaveIcon from '@material-ui/icons/Save';
|
||||
import PublishIcon from '@material-ui/icons/Publish';
|
||||
import SettingsBackupRestoreIcon from '@material-ui/icons/SettingsBackupRestore';
|
||||
import CloseIcon from '@material-ui/icons/Close';
|
||||
import InfoIcon from '@material-ui/icons/InfoRounded';
|
||||
@@ -683,6 +684,15 @@ function SchemaDialogView({
|
||||
formErr: formErr,
|
||||
}), [formResetKey, formErr]);
|
||||
|
||||
const getButtonIcon = () => {
|
||||
if(props.customSaveBtnIconType == 'upload') {
|
||||
return <PublishIcon />;
|
||||
}
|
||||
return <SaveIcon />;
|
||||
};
|
||||
|
||||
let ButtonIcon = getButtonIcon();
|
||||
|
||||
/* I am Groot */
|
||||
return (
|
||||
<StateUtilsContext.Provider value={stateUtils}>
|
||||
@@ -710,7 +720,7 @@ function SchemaDialogView({
|
||||
<DefaultButton data-test="Reset" onClick={onResetClick} startIcon={<SettingsBackupRestoreIcon />} disabled={!dirty || saving} className={classes.buttonMargin}>
|
||||
{gettext('Reset')}
|
||||
</DefaultButton>
|
||||
<PrimaryButton data-test="Save" onClick={onSaveClick} startIcon={<SaveIcon />} disabled={!dirty || saving || Boolean(formErr.name) || !formReady}>
|
||||
<PrimaryButton data-test="Save" onClick={onSaveClick} startIcon={ButtonIcon} disabled={!dirty || saving || Boolean(formErr.name) || !formReady}>
|
||||
{props.customSaveBtnName ? gettext(props.customSaveBtnName) : gettext('Save')}
|
||||
</PrimaryButton>
|
||||
</Box>
|
||||
@@ -745,6 +755,7 @@ SchemaDialogView.propTypes = {
|
||||
showFooter: PropTypes.bool,
|
||||
resetKey: PropTypes.any,
|
||||
customSaveBtnName: PropTypes.string,
|
||||
customSaveBtnIconType: PropTypes.string,
|
||||
};
|
||||
|
||||
const usePropsStyles = makeStyles((theme)=>({
|
||||
|
||||
Reference in New Issue
Block a user