Web: Added information update when connecting via dialog.
This commit is contained in:
parent
6b183f2ddb
commit
b55107dffd
@ -26,10 +26,10 @@ const PureConnectDialogContainer = (props) => {
|
||||
setConnectDialogVisible,
|
||||
personal,
|
||||
folderFormValidation,
|
||||
updateInfo,
|
||||
isConnectionViaBackupModule,
|
||||
roomCreation,
|
||||
setSaveThirdpartyResponse,
|
||||
setSelectedThirdPartyAccount,
|
||||
} = props;
|
||||
const {
|
||||
corporate,
|
||||
@ -134,14 +134,15 @@ const PureConnectDialogContainer = (props) => {
|
||||
provider_key,
|
||||
provider_id
|
||||
)
|
||||
.catch((err) => {
|
||||
setIsLoading(false);
|
||||
.then(() => {
|
||||
onClose();
|
||||
setSelectedThirdPartyAccount(null);
|
||||
})
|
||||
.catch((err) => {
|
||||
toastr.error(err);
|
||||
})
|
||||
.finally(() => {
|
||||
setIsLoading(false);
|
||||
updateInfo && updateInfo();
|
||||
onClose();
|
||||
});
|
||||
|
||||
@ -372,7 +373,10 @@ export default inject(
|
||||
const { personal, folderFormValidation } = auth.settingsStore;
|
||||
|
||||
const { id, folders } = selectedFolderStore;
|
||||
const { selectedThirdPartyAccount: backupConnectionItem } = backup;
|
||||
const {
|
||||
selectedThirdPartyAccount: backupConnectionItem,
|
||||
setSelectedThirdPartyAccount,
|
||||
} = backup;
|
||||
const {
|
||||
connectDialogVisible: visible,
|
||||
setConnectDialogVisible,
|
||||
@ -398,7 +402,7 @@ export default inject(
|
||||
openConnectWindow,
|
||||
fetchThirdPartyProviders,
|
||||
setConnectDialogVisible,
|
||||
|
||||
setSelectedThirdPartyAccount,
|
||||
personal,
|
||||
};
|
||||
}
|
||||
|
@ -56,6 +56,11 @@ const DirectThirdPartyConnection = (props) => {
|
||||
};
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
updateAccountsInfo();
|
||||
}, [selectedThirdPartyAccount === null]);
|
||||
|
||||
const initialState = {
|
||||
folderList: [],
|
||||
isLoading: false,
|
||||
@ -235,8 +240,8 @@ const DirectThirdPartyConnection = (props) => {
|
||||
provider_key,
|
||||
provider_id
|
||||
);
|
||||
|
||||
updateAccountsInfo();
|
||||
console.log("saveSettings");
|
||||
setSelectedThirdPartyAccount(null);
|
||||
} catch (e) {
|
||||
setState({ isLoading: false, isUpdatingInfo: false });
|
||||
toastr.error(e);
|
||||
|
@ -146,9 +146,12 @@ class BackupStore {
|
||||
|
||||
setSelectedThirdPartyAccount = (elem) => {
|
||||
this.selectedThirdPartyAccount = elem;
|
||||
|
||||
};
|
||||
|
||||
get selectedThirdPartyAccount() {
|
||||
return this.selectedThirdPartyAccount;
|
||||
}
|
||||
|
||||
toDefault = () => {
|
||||
this.selectedMonthlySchedule = this.defaultMonthlySchedule;
|
||||
this.selectedWeeklySchedule = this.defaultWeeklySchedule;
|
||||
|
Loading…
Reference in New Issue
Block a user