Web:Client: fix double tab at desktop editors
This commit is contained in:
parent
8d6c2cdb9e
commit
1278f5e722
@ -93,13 +93,13 @@ const CreateEvent = ({
|
||||
setStartValue(newValue);
|
||||
}
|
||||
|
||||
let tab =
|
||||
!isDesktop && extension && open
|
||||
? window.open(
|
||||
combineUrl(AppServerConfig.proxyURL, config.homepage, "/doceditor"),
|
||||
"_blank"
|
||||
)
|
||||
: null;
|
||||
// let tab =
|
||||
// !isDesktop && extension && open
|
||||
// ? window.open(
|
||||
// combineUrl(AppServerConfig.proxyURL, config.homepage, `/doceditor`),
|
||||
// "_blank"
|
||||
// )
|
||||
// : null;
|
||||
|
||||
if (!extension) {
|
||||
createFolder(parentId, newValue)
|
||||
@ -127,7 +127,7 @@ const CreateEvent = ({
|
||||
createdFileId = file.id;
|
||||
addActiveItems([file.id]);
|
||||
|
||||
open && openDocEditor(file.id, file.providerKey, tab);
|
||||
open && openDocEditor(file.id, file.providerKey, null);
|
||||
})
|
||||
.then(() => editCompleteAction(item, type))
|
||||
.catch((err) => {
|
||||
@ -154,7 +154,7 @@ const CreateEvent = ({
|
||||
});
|
||||
setConvertPasswordDialogVisible(true);
|
||||
|
||||
open && openDocEditor(null, null, tab);
|
||||
// open && openDocEditor(null, null, null);
|
||||
})
|
||||
.finally(() => {
|
||||
const fileIds = [+id];
|
||||
@ -177,7 +177,7 @@ const CreateEvent = ({
|
||||
setCreatedItem({ id: createdFileId, type: "file" });
|
||||
addActiveItems([file.id]);
|
||||
|
||||
return open && openDocEditor(file.id, file.providerKey, tab);
|
||||
return open && openDocEditor(file.id, file.providerKey, null);
|
||||
})
|
||||
.then(() => editCompleteAction(item, type))
|
||||
.catch((e) => toastr.error(e))
|
||||
@ -208,12 +208,12 @@ const CreateEvent = ({
|
||||
true,
|
||||
false
|
||||
).then(
|
||||
() => open && openDocEditor(file.id, file.providerKey, tab)
|
||||
() => open && openDocEditor(file.id, file.providerKey, null)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
return open && openDocEditor(file.id, file.providerKey, tab);
|
||||
return open && openDocEditor(file.id, file.providerKey, null);
|
||||
})
|
||||
.then(() => editCompleteAction(item, type))
|
||||
.catch((e) => toastr.error(e))
|
||||
|
@ -111,6 +111,7 @@ const ConvertPasswordDialogComponent = (props) => {
|
||||
.then((file) => {
|
||||
toastr.success(t("SuccessfullyCreated", { fileTitle: newTitle }));
|
||||
onClose();
|
||||
|
||||
open && openDocEditor(file.id, file.providerKey, tab);
|
||||
})
|
||||
.then(() => {
|
||||
@ -123,7 +124,8 @@ const ConvertPasswordDialogComponent = (props) => {
|
||||
}
|
||||
|
||||
toastr.error(t("CreationError"), t("Common:Warning"));
|
||||
open && openDocEditor(null, null, tab);
|
||||
|
||||
// open && openDocEditor(null, null, tab);
|
||||
if (_isMounted) {
|
||||
setPasswordValid(false);
|
||||
focusInput();
|
||||
|
@ -266,7 +266,11 @@ class ContextOptionsStore {
|
||||
let tab =
|
||||
!this.authStore.isDesktopClient && fileExst
|
||||
? window.open(
|
||||
combineUrl(AppServerConfig.proxyURL, config.homepage, "/doceditor"),
|
||||
combineUrl(
|
||||
AppServerConfig.proxyURL,
|
||||
config.homepage,
|
||||
`/doceditor?fileId=${id}`
|
||||
),
|
||||
"_blank"
|
||||
)
|
||||
: null;
|
||||
|
@ -1807,7 +1807,7 @@ class FilesActionStore {
|
||||
combineUrl(
|
||||
AppServerConfig.proxyURL,
|
||||
config.homepage,
|
||||
"/doceditor"
|
||||
`/doceditor?fileId=${id}`
|
||||
),
|
||||
"_blank"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user