Merge pull request #1698 from ONLYOFFICE/bugfix/crash-backup-list
bugfix/crash-backup-list
This commit is contained in:
commit
3ceeb0a963
@ -170,18 +170,25 @@ const BackupListModalDialog = (props) => {
|
||||
setState((val) => ({ ...val, isChecked: !val.isChecked }));
|
||||
};
|
||||
|
||||
const { onModalClose, isVisibleDialog, t, isCopyingToLocal, theme, standalone } = props;
|
||||
const {
|
||||
onModalClose,
|
||||
isVisibleDialog,
|
||||
t,
|
||||
isCopyingToLocal,
|
||||
theme,
|
||||
standalone,
|
||||
} = props;
|
||||
const { filesList, isLoading, selectedFileIndex, isChecked } = state;
|
||||
|
||||
const helpContent = () => (
|
||||
<>
|
||||
<Text className="restore-backup_warning-description">
|
||||
{t("RestoreBackupWarningText")}{" "}
|
||||
{!standalone && (
|
||||
<Text as="span" className="restore-backup_warning-link">
|
||||
{t("RestoreBackupResetInfoWarningText")}
|
||||
</Text>
|
||||
)}
|
||||
const helpContent = () => (
|
||||
<>
|
||||
<Text className="restore-backup_warning-description">
|
||||
{t("RestoreBackupWarningText")}{" "}
|
||||
{!standalone && (
|
||||
<Text as="span" className="restore-backup_warning-link">
|
||||
{t("RestoreBackupResetInfoWarningText")}
|
||||
</Text>
|
||||
)}
|
||||
</Text>
|
||||
</>
|
||||
);
|
||||
@ -212,7 +219,7 @@ const BackupListModalDialog = (props) => {
|
||||
</Text>
|
||||
<Link
|
||||
id="delete-backups"
|
||||
onClick={this.onCleanBackupList}
|
||||
onClick={onCleanBackupList}
|
||||
fontWeight={600}
|
||||
style={{ textDecoration: "underline dotted" }}
|
||||
>
|
||||
@ -226,8 +233,8 @@ const BackupListModalDialog = (props) => {
|
||||
filesList.length > 0 ? (
|
||||
<BackupListBody
|
||||
filesList={filesList}
|
||||
onDeleteBackup={this.onDeleteBackup}
|
||||
onSelectFile={this.onSelectFile}
|
||||
onDeleteBackup={onDeleteBackup}
|
||||
onSelectFile={onSelectFile}
|
||||
selectedFileIndex={selectedFileIndex}
|
||||
/>
|
||||
) : (
|
||||
@ -255,7 +262,7 @@ const BackupListModalDialog = (props) => {
|
||||
<Checkbox
|
||||
truncate
|
||||
className="backup-list_checkbox"
|
||||
onChange={this.onChangeCheckbox}
|
||||
onChange={onChangeCheckbox}
|
||||
isChecked={isChecked}
|
||||
/>
|
||||
<Text as="span" className="backup-list_agreement-text">
|
||||
@ -276,7 +283,7 @@ const BackupListModalDialog = (props) => {
|
||||
primary
|
||||
size="normal"
|
||||
label={t("Common:Restore")}
|
||||
onClick={this.onRestorePortal}
|
||||
onClick={onRestorePortal}
|
||||
isDisabled={isCopyingToLocal || !isChecked}
|
||||
/>
|
||||
<Button
|
||||
|
Loading…
Reference in New Issue
Block a user