Merge branch 'develop' into feature/win-docker
This commit is contained in:
commit
fdbd71f4a3
@ -12,6 +12,12 @@ import config from "PACKAGE_FILE";
|
||||
|
||||
export default function withBadges(WrappedComponent) {
|
||||
class WithBadges extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = { disableBadgeClick: false, disableUnpinClick: false };
|
||||
}
|
||||
|
||||
onShowVersionHistory = () => {
|
||||
const {
|
||||
homepage,
|
||||
@ -28,22 +34,42 @@ export default function withBadges(WrappedComponent) {
|
||||
};
|
||||
|
||||
onBadgeClick = () => {
|
||||
if (this.state.disableBadgeClick) return;
|
||||
|
||||
const { item, markAsRead, setNewFilesPanelVisible } = this.props;
|
||||
this.setState(() => ({
|
||||
disableBadgeClick: true,
|
||||
}));
|
||||
|
||||
const enableBadgeClick = () => {
|
||||
this.setState({ disableBadgeClick: false });
|
||||
};
|
||||
|
||||
if (item.fileExst) {
|
||||
markAsRead([], [item.id], item);
|
||||
markAsRead([], [item.id], item).then(() => {
|
||||
enableBadgeClick();
|
||||
});
|
||||
} else {
|
||||
setNewFilesPanelVisible(true, null, item);
|
||||
setNewFilesPanelVisible(true, null, item).then(() => {
|
||||
enableBadgeClick();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
onUnpinClick = (e) => {
|
||||
if (this.state.disableUnpinClick) return;
|
||||
|
||||
this.setState({ disableUnpinClick: true });
|
||||
|
||||
const { t, setPinAction } = this.props;
|
||||
|
||||
const { action, id } = e.target.closest(".is-pinned").dataset;
|
||||
|
||||
if (!action && !id) return;
|
||||
|
||||
setPinAction(action, id, t);
|
||||
setPinAction(action, id, t).then(() => {
|
||||
this.setState({ disableUnpinClick: false });
|
||||
});
|
||||
};
|
||||
|
||||
setConvertDialogVisible = () => {
|
||||
|
@ -11,11 +11,17 @@ import {
|
||||
import { withTranslation } from "react-i18next";
|
||||
import DragAndDrop from "@docspace/components/drag-and-drop";
|
||||
import { isMobile } from "react-device-detect";
|
||||
import SettingsItem from "./SettingsItem";
|
||||
import AccountsItem from "./AccountsItem";
|
||||
|
||||
const StyledDragAndDrop = styled(DragAndDrop)`
|
||||
display: contents;
|
||||
`;
|
||||
|
||||
const CatalogDivider = styled.div`
|
||||
height: 16px;
|
||||
`;
|
||||
|
||||
const Item = ({
|
||||
t,
|
||||
item,
|
||||
@ -152,6 +158,7 @@ const Items = ({
|
||||
trashIsEmpty,
|
||||
|
||||
onHide,
|
||||
firstLoad,
|
||||
}) => {
|
||||
useEffect(() => {
|
||||
data.forEach((elem) => {
|
||||
@ -329,44 +336,11 @@ const Items = ({
|
||||
);
|
||||
});
|
||||
|
||||
const roomsHeader = (
|
||||
<CatalogItem
|
||||
key={"rooms-header"}
|
||||
isHeader={true}
|
||||
isFirstHeader={true}
|
||||
showText={showText}
|
||||
text={t("Common:Rooms")}
|
||||
/>
|
||||
);
|
||||
if (!firstLoad) items.splice(3, 0, <SettingsItem key="settings-item" />);
|
||||
if (!isVisitor) items.splice(3, 0, <AccountsItem key="accounts-item" />);
|
||||
|
||||
const filesHeader = (
|
||||
<CatalogItem
|
||||
key={"files-header"}
|
||||
isHeader={true}
|
||||
isFirstHeader={false}
|
||||
showText={showText}
|
||||
text={t("Translations:Files")}
|
||||
/>
|
||||
);
|
||||
|
||||
const otherHeader = (
|
||||
<CatalogItem
|
||||
key={"other-header"}
|
||||
isHeader={true}
|
||||
isFirstHeader={false}
|
||||
showText={showText}
|
||||
text={t("Translations:Other")}
|
||||
/>
|
||||
);
|
||||
|
||||
if (isVisitor) {
|
||||
items.length > 2 && items.splice(2, 0, filesHeader);
|
||||
} else {
|
||||
items.splice(3, 0, filesHeader);
|
||||
}
|
||||
|
||||
items.unshift(roomsHeader);
|
||||
items.push(otherHeader);
|
||||
if (!isVisitor) items.splice(3, 0, <CatalogDivider key="other-header" />);
|
||||
else items.splice(2, 0, <CatalogDivider key="other-header" />);
|
||||
|
||||
return items;
|
||||
},
|
||||
@ -386,6 +360,8 @@ const Items = ({
|
||||
uploadEmptyFolders,
|
||||
trashIsEmpty,
|
||||
isAdmin,
|
||||
isVisitor,
|
||||
firstLoad,
|
||||
]
|
||||
);
|
||||
|
||||
@ -417,6 +393,7 @@ export default inject(
|
||||
setDragging,
|
||||
setStartDrag,
|
||||
trashIsEmpty,
|
||||
firstLoad,
|
||||
} = filesStore;
|
||||
|
||||
const { startUpload } = uploadDataStore;
|
||||
@ -455,6 +432,7 @@ export default inject(
|
||||
setEmptyTrashDialogVisible,
|
||||
trashIsEmpty,
|
||||
rootFolderType,
|
||||
firstLoad,
|
||||
};
|
||||
}
|
||||
)(withTranslation(["Files", "Common", "Translations"])(observer(Items)));
|
||||
|
@ -9,8 +9,6 @@ import Items from "./Items";
|
||||
import { isMobile, tablet } from "@docspace/components/utils/device";
|
||||
import FilesFilter from "@docspace/common/api/files/filter";
|
||||
import RoomsFilter from "@docspace/common/api/rooms/filter";
|
||||
import SettingsItem from "./SettingsItem";
|
||||
import AccountsItem from "./AccountsItem";
|
||||
import { combineUrl } from "@docspace/common/utils";
|
||||
import { isDesktop, isTablet, isMobileOnly } from "react-device-detect";
|
||||
//import ThirdPartyList from "./ThirdPartyList";
|
||||
@ -51,6 +49,8 @@ const ArticleBodyContent = (props) => {
|
||||
archiveFolderId,
|
||||
} = props;
|
||||
|
||||
const [disableBadgeClick, setDisableBadgeClick] = React.useState(false);
|
||||
|
||||
const campaigns = (localStorage.getItem("campaigns") || "")
|
||||
.split(",")
|
||||
.filter((campaign) => campaign.length > 0);
|
||||
@ -150,9 +150,18 @@ const ArticleBodyContent = (props) => {
|
||||
[categoryType, roomsFolderId, archiveFolderId]
|
||||
);
|
||||
|
||||
const onShowNewFilesPanel = React.useCallback((folderId) => {
|
||||
props.setNewFilesPanelVisible(true, [`${folderId}`]);
|
||||
}, []);
|
||||
const onShowNewFilesPanel = React.useCallback(
|
||||
async (folderId) => {
|
||||
if (disableBadgeClick) return;
|
||||
|
||||
setDisableBadgeClick(true);
|
||||
|
||||
await props.setNewFilesPanelVisible(true, [`${folderId}`]);
|
||||
|
||||
setDisableBadgeClick(false);
|
||||
},
|
||||
[disableBadgeClick]
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
@ -162,8 +171,7 @@ const ArticleBodyContent = (props) => {
|
||||
showText={showText}
|
||||
onHide={toggleArticleOpen}
|
||||
/>
|
||||
{!personal && !isVisitor && <AccountsItem />}
|
||||
{!personal && !firstLoad && <SettingsItem />}
|
||||
|
||||
{!isDesktopClient && showText && !docSpace && (
|
||||
<StyledBlock showText={showText}>
|
||||
{/* {enableThirdParty && !isVisitor && <ThirdPartyList />} */}
|
||||
|
@ -83,7 +83,7 @@ const QuickButtons = (props) => {
|
||||
hoverColor={theme.filesQuickButtons.sharedColor}
|
||||
/>
|
||||
)}
|
||||
{fileExst && !isTrashFolder && displayBadges && (
|
||||
{/* {fileExst && !isTrashFolder && displayBadges && (
|
||||
<ColorTheme
|
||||
themeId={ThemeType.IconButton}
|
||||
iconName={iconFavorite}
|
||||
@ -96,7 +96,7 @@ const QuickButtons = (props) => {
|
||||
onClick={setFavorite}
|
||||
hoverColor={theme.filesQuickButtons.hoverColor}
|
||||
/>
|
||||
)}
|
||||
)} */}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
@ -18,6 +18,14 @@ const TagDropdown = ({
|
||||
|
||||
const [dropdownMaxHeight, setDropdownMaxHeight] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
document.getElementById("tags-input").addEventListener("keyup", onKeyPress);
|
||||
|
||||
return () => document.removeEventListener("keyup", onKeyPress);
|
||||
});
|
||||
|
||||
const onKeyPress = (e) => e.key === "Enter" && addNewTag();
|
||||
|
||||
const chosenTags = tagHandler.tags.map((tag) => tag.name);
|
||||
|
||||
const tagsForDropdown = tagHandler.fetchedTags.filter(
|
||||
|
@ -33,6 +33,7 @@ class NewFilesPanel extends React.Component {
|
||||
state = { readingFiles: [], inProgress: false };
|
||||
|
||||
onClose = () => {
|
||||
if (this.state.inProgress) return;
|
||||
this.props.setNewFilesPanelVisible(false);
|
||||
};
|
||||
|
||||
@ -52,16 +53,27 @@ class NewFilesPanel extends React.Component {
|
||||
};
|
||||
|
||||
onMarkAsRead = () => {
|
||||
const fileIds = [];
|
||||
const folderIds = [];
|
||||
|
||||
for (let item of this.props.newFiles) {
|
||||
if (item.fileExst) fileIds.push(item.id);
|
||||
else folderIds.push(item.id);
|
||||
}
|
||||
const { inProgress, readingFiles } = this.state;
|
||||
if (inProgress) return;
|
||||
|
||||
this.setState({ inProgress: true });
|
||||
|
||||
const files = [];
|
||||
const folders = [];
|
||||
|
||||
for (let item of this.props.newFiles) {
|
||||
if (item.fileExst) files.push(item);
|
||||
else folders.push(item);
|
||||
}
|
||||
|
||||
const fileIds = files
|
||||
.filter((f) => !readingFiles.includes(f.id.toString()))
|
||||
.map((f) => f.id);
|
||||
|
||||
const folderIds = folders
|
||||
.filter((f) => !readingFiles.includes(f.id.toString()))
|
||||
.map((f) => f.id);
|
||||
|
||||
this.props
|
||||
.markAsRead(folderIds, fileIds)
|
||||
.then(() => this.setNewBadgeCount())
|
||||
@ -78,6 +90,10 @@ class NewFilesPanel extends React.Component {
|
||||
};
|
||||
|
||||
onNewFileClick = (e) => {
|
||||
if (this.state.inProgress) return;
|
||||
|
||||
this.setState({ inProgress: true });
|
||||
|
||||
const { id, extension: fileExst } = e.target.dataset;
|
||||
|
||||
const {
|
||||
@ -92,16 +108,23 @@ class NewFilesPanel extends React.Component {
|
||||
|
||||
const item = newFiles.find((file) => file.id.toString() === id);
|
||||
|
||||
if (readingFiles.includes(id)) return this.onFileClick(item);
|
||||
if (readingFiles.includes(id)) {
|
||||
this.setState({ inProgress: false });
|
||||
return this.onFileClick(item);
|
||||
}
|
||||
|
||||
markAsRead(folderIds, fileIds, item)
|
||||
.then(() => {
|
||||
//updateFolderBadge(folderId, 1);
|
||||
|
||||
readingFiles.push(id);
|
||||
this.setState({ readingFiles });
|
||||
this.setState({ readingFiles, inProgress: false });
|
||||
|
||||
this.onFileClick(item);
|
||||
})
|
||||
.then(() => refreshFiles())
|
||||
.then(() => {
|
||||
refreshFiles();
|
||||
})
|
||||
.catch((err) => toastr.error(err));
|
||||
};
|
||||
|
||||
@ -159,7 +182,11 @@ class NewFilesPanel extends React.Component {
|
||||
newFiles,
|
||||
} = this.props;
|
||||
|
||||
const filesCount = newFiles.length;
|
||||
const { readingFiles } = this.state;
|
||||
|
||||
const filesCount = newFiles.filter(
|
||||
(f) => !readingFiles.includes(f.id.toString())
|
||||
).length;
|
||||
updateRootBadge(+newFilesIds[0], filesCount);
|
||||
|
||||
if (newFilesIds.length <= 1) {
|
||||
@ -175,6 +202,7 @@ class NewFilesPanel extends React.Component {
|
||||
render() {
|
||||
//console.log("NewFiles panel render");
|
||||
const { t, visible, isLoading, newFiles, theme } = this.props;
|
||||
const { inProgress } = this.state;
|
||||
const zIndex = 310;
|
||||
|
||||
return (
|
||||
@ -244,12 +272,13 @@ class NewFilesPanel extends React.Component {
|
||||
size="normal"
|
||||
primary
|
||||
onClick={this.onMarkAsRead}
|
||||
isLoading={this.state.inProgress}
|
||||
isLoading={inProgress}
|
||||
/>
|
||||
<Button
|
||||
className="new_files_panel-button"
|
||||
label={t("Common:CloseButton")}
|
||||
size="normal"
|
||||
isDisabled={inProgress}
|
||||
onClick={this.onClose}
|
||||
/>
|
||||
</StyledFooter>
|
||||
|
@ -115,22 +115,26 @@ const SectionFilterContent = ({
|
||||
|
||||
const statusItems = [
|
||||
{
|
||||
id: "filter_status-user",
|
||||
key: "filter-status",
|
||||
group: "filter-status",
|
||||
label: t("UserStatus"),
|
||||
isHeader: true,
|
||||
},
|
||||
{
|
||||
id: "filter_status-active",
|
||||
key: 1,
|
||||
group: "filter-status",
|
||||
label: t("Common:Active"),
|
||||
},
|
||||
{
|
||||
id: "filter_status-pending",
|
||||
key: 2,
|
||||
group: "filter-status",
|
||||
label: t("PeopleTranslations:PendingTitle"),
|
||||
},
|
||||
{
|
||||
id: "filter_status-disabled",
|
||||
key: 3,
|
||||
group: "filter-status",
|
||||
label: t("PeopleTranslations:DisabledEmployeeStatus"),
|
||||
@ -145,13 +149,20 @@ const SectionFilterContent = ({
|
||||
isHeader: true,
|
||||
isLast: true,
|
||||
},
|
||||
{ key: "admin", group: "filter-type", label: t("Common:DocSpaceAdmin") },
|
||||
{
|
||||
id: "filter_type-docspace-admin",
|
||||
key: "admin",
|
||||
group: "filter-type",
|
||||
label: t("Common:DocSpaceAdmin"),
|
||||
},
|
||||
{
|
||||
id: "filter_type-room-admin",
|
||||
key: "manager",
|
||||
group: "filter-type",
|
||||
label: t("Common:RoomAdmin"),
|
||||
},
|
||||
{
|
||||
id: "filter_type-user",
|
||||
key: "user",
|
||||
group: "filter-type",
|
||||
label: userCaption,
|
||||
@ -215,11 +226,17 @@ const SectionFilterContent = ({
|
||||
const getSortData = React.useCallback(() => {
|
||||
return [
|
||||
{
|
||||
id: "sory-by_first-name",
|
||||
key: "firstname",
|
||||
label: t("Common:ByFirstNameSorting"),
|
||||
default: true,
|
||||
},
|
||||
{ key: "lastname", label: t("Common:ByLastNameSorting"), default: true },
|
||||
{
|
||||
id: "sory-by_last-name",
|
||||
key: "lastname",
|
||||
label: t("Common:ByLastNameSorting"),
|
||||
default: true,
|
||||
},
|
||||
];
|
||||
}, [t]);
|
||||
|
||||
|
@ -610,6 +610,7 @@ const SectionFilterContent = ({
|
||||
!isFavoritesFolder && !isRecentFolder
|
||||
? [
|
||||
{
|
||||
id: "filter_type-folders",
|
||||
key: FilterType.FoldersOnly.toString(),
|
||||
group: FilterGroups.filterType,
|
||||
label: t("Translations:Folders").toLowerCase(),
|
||||
@ -620,6 +621,7 @@ const SectionFilterContent = ({
|
||||
const images = !isRecentFolder
|
||||
? [
|
||||
{
|
||||
id: "filter_type-images",
|
||||
key: FilterType.ImagesOnly.toString(),
|
||||
group: FilterGroups.filterType,
|
||||
label: t("Images").toLowerCase(),
|
||||
@ -630,6 +632,7 @@ const SectionFilterContent = ({
|
||||
const archives = !isRecentFolder
|
||||
? [
|
||||
{
|
||||
id: "filter_type-archive",
|
||||
key: FilterType.ArchiveOnly.toString(),
|
||||
group: FilterGroups.filterType,
|
||||
label: t("Archives").toLowerCase(),
|
||||
@ -640,6 +643,7 @@ const SectionFilterContent = ({
|
||||
const media = !isRecentFolder
|
||||
? [
|
||||
{
|
||||
id: "filter_type-media",
|
||||
key: FilterType.MediaOnly.toString(),
|
||||
group: FilterGroups.filterType,
|
||||
label: t("Media").toLowerCase(),
|
||||
@ -657,26 +661,31 @@ const SectionFilterContent = ({
|
||||
isLast: isLastTypeOptionsRooms,
|
||||
},
|
||||
{
|
||||
id: "filter_type-custom",
|
||||
key: RoomsType.CustomRoom,
|
||||
group: FilterGroups.roomFilterType,
|
||||
label: t("CustomRooms"),
|
||||
},
|
||||
{
|
||||
id: "filter_type-filling-form",
|
||||
key: RoomsType.FillingFormsRoom,
|
||||
group: FilterGroups.roomFilterType,
|
||||
label: t("FillingFormRooms"),
|
||||
},
|
||||
{
|
||||
id: "filter_type-collaboration",
|
||||
key: RoomsType.EditingRoom,
|
||||
group: FilterGroups.roomFilterType,
|
||||
label: t("CollaborationRooms"),
|
||||
},
|
||||
{
|
||||
id: "filter_type-review",
|
||||
key: RoomsType.ReviewRoom,
|
||||
group: FilterGroups.roomFilterType,
|
||||
label: t("ReviewRooms"),
|
||||
},
|
||||
{
|
||||
id: "filter_type-view-only",
|
||||
key: RoomsType.ReadOnlyRoom,
|
||||
group: FilterGroups.roomFilterType,
|
||||
label: t("ViewOnlyRooms"),
|
||||
@ -692,26 +701,31 @@ const SectionFilterContent = ({
|
||||
},
|
||||
...folders,
|
||||
{
|
||||
id: "filter_type-documents",
|
||||
key: FilterType.DocumentsOnly.toString(),
|
||||
group: FilterGroups.filterType,
|
||||
label: t("Common:Documents").toLowerCase(),
|
||||
},
|
||||
{
|
||||
id: "filter_type-presentations",
|
||||
key: FilterType.PresentationsOnly.toString(),
|
||||
group: FilterGroups.filterType,
|
||||
label: t("Translations:Presentations").toLowerCase(),
|
||||
},
|
||||
{
|
||||
id: "filter_type-spreadsheets",
|
||||
key: FilterType.SpreadsheetsOnly.toString(),
|
||||
group: FilterGroups.filterType,
|
||||
label: t("Translations:Spreadsheets").toLowerCase(),
|
||||
},
|
||||
{
|
||||
id: "filter_type-form-templates",
|
||||
key: FilterType.OFormTemplateOnly.toString(),
|
||||
group: FilterGroups.filterType,
|
||||
label: t("FormsTemplates").toLowerCase(),
|
||||
},
|
||||
{
|
||||
id: "filter_type-forms",
|
||||
key: FilterType.OFormOnly.toString(),
|
||||
group: FilterGroups.filterType,
|
||||
label: t("Forms").toLowerCase(),
|
||||
@ -731,16 +745,19 @@ const SectionFilterContent = ({
|
||||
withMultiItems: true,
|
||||
},
|
||||
{
|
||||
id: "filter_author-me",
|
||||
key: FilterKeys.me,
|
||||
group: FilterGroups.roomFilterOwner,
|
||||
label: t("Common:MeLabel"),
|
||||
},
|
||||
{
|
||||
id: "filter_author-other",
|
||||
key: FilterKeys.other,
|
||||
group: FilterGroups.roomFilterOwner,
|
||||
label: t("Common:OtherLabel"),
|
||||
},
|
||||
{
|
||||
id: "filter_author-user",
|
||||
key: FilterKeys.user,
|
||||
group: FilterGroups.roomFilterOwner,
|
||||
label: t("Translations:AddOwner"),
|
||||
@ -857,13 +874,19 @@ const SectionFilterContent = ({
|
||||
withoutSeparator: true,
|
||||
},
|
||||
{
|
||||
id: "filter_folders",
|
||||
key: "folders",
|
||||
group: FilterGroups.filterFolders,
|
||||
label: "",
|
||||
withOptions: true,
|
||||
options: [
|
||||
{ key: FilterKeys.withSubfolders, label: t("WithSubfolders") },
|
||||
{
|
||||
id: "filter_folders_with-subfolders",
|
||||
key: FilterKeys.withSubfolders,
|
||||
label: t("WithSubfolders"),
|
||||
},
|
||||
{
|
||||
id: "filter_folders_exclude-subfolders",
|
||||
key: FilterKeys.excludeSubfolders,
|
||||
label: t("ExcludeSubfolders"),
|
||||
},
|
||||
@ -879,6 +902,7 @@ const SectionFilterContent = ({
|
||||
withoutHeader: true,
|
||||
},
|
||||
{
|
||||
id: "filter_search-by-file-contents",
|
||||
key: "true",
|
||||
group: FilterGroups.filterContent,
|
||||
label: t("SearchByContent"),
|
||||
@ -899,16 +923,19 @@ const SectionFilterContent = ({
|
||||
withMultiItems: true,
|
||||
},
|
||||
{
|
||||
id: "filter_author-me",
|
||||
key: FilterKeys.me,
|
||||
group: FilterGroups.filterAuthor,
|
||||
label: t("Common:MeLabel"),
|
||||
},
|
||||
{
|
||||
id: "filter_author-other",
|
||||
key: FilterKeys.other,
|
||||
group: FilterGroups.filterAuthor,
|
||||
label: t("Common:OtherLabel"),
|
||||
},
|
||||
{
|
||||
id: "filter_author-user",
|
||||
key: FilterKeys.user,
|
||||
group: FilterGroups.filterAuthor,
|
||||
label: t("Translations:AddAuthor"),
|
||||
@ -936,11 +963,13 @@ const SectionFilterContent = ({
|
||||
const getViewSettingsData = React.useCallback(() => {
|
||||
const viewSettings = [
|
||||
{
|
||||
id: "view-switch_rows",
|
||||
value: "row",
|
||||
label: t("ViewList"),
|
||||
icon: "/static/images/view-rows.react.svg",
|
||||
},
|
||||
{
|
||||
id: "view-switch_tiles",
|
||||
value: "tile",
|
||||
label: t("ViewTiles"),
|
||||
icon: "/static/images/view-tiles.react.svg",
|
||||
@ -954,29 +983,58 @@ const SectionFilterContent = ({
|
||||
const getSortData = React.useCallback(() => {
|
||||
const commonOptions = [];
|
||||
|
||||
const name = { key: "AZ", label: t("Common:Name"), default: true };
|
||||
const name = {
|
||||
id: "sort-by_name",
|
||||
key: "AZ",
|
||||
label: t("Common:Name"),
|
||||
default: true,
|
||||
};
|
||||
const modifiedDate = {
|
||||
id: "sort-by_modified",
|
||||
key: "DateAndTime",
|
||||
label: t("ByLastModified"),
|
||||
default: true,
|
||||
};
|
||||
|
||||
const type = { key: "Type", label: t("Common:Type"), default: true };
|
||||
const size = { key: "Size", label: t("Common:Size"), default: true };
|
||||
const type = {
|
||||
id: "sort-by_type",
|
||||
key: "Type",
|
||||
label: t("Common:Type"),
|
||||
default: true,
|
||||
};
|
||||
const size = {
|
||||
id: "sort-by_size",
|
||||
key: "Size",
|
||||
label: t("Common:Size"),
|
||||
default: true,
|
||||
};
|
||||
const creationDate = {
|
||||
id: "sort-by_created",
|
||||
key: "DateAndTimeCreation",
|
||||
label: t("ByCreation"),
|
||||
default: true,
|
||||
};
|
||||
const authorOption = {
|
||||
id: "sort-by_author",
|
||||
key: "Author",
|
||||
label: t("ByAuthor"),
|
||||
default: true,
|
||||
};
|
||||
|
||||
const owner = { key: "Author", label: t("Common:Owner"), default: true };
|
||||
const tags = { key: "Tags", label: t("Tags"), default: true };
|
||||
const owner = {
|
||||
id: "sort-by_owner",
|
||||
key: "Author",
|
||||
label: t("Common:Owner"),
|
||||
default: true,
|
||||
};
|
||||
const tags = {
|
||||
id: "sort-by_tags",
|
||||
key: "Tags",
|
||||
label: t("Tags"),
|
||||
default: true,
|
||||
};
|
||||
const roomType = {
|
||||
id: "sort-by_room-type",
|
||||
key: "roomType",
|
||||
label: t("Common:Type"),
|
||||
default: true,
|
||||
|
@ -1,18 +1,16 @@
|
||||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { withTranslation } from "react-i18next";
|
||||
import Box from "@docspace/components/box";
|
||||
//import FormStore from "@docspace/studio/src/store/SsoFormStore";
|
||||
import Text from "@docspace/components/text";
|
||||
import ToggleButton from "@docspace/components/toggle-button";
|
||||
import Badge from "@docspace/components/badge";
|
||||
import DisableSsoConfirmationModal from "./DisableSsoConfirmationModal";
|
||||
|
||||
import SSOLoader from "../../sub-components/ssoLoader";
|
||||
const borderProp = { radius: "6px" };
|
||||
|
||||
const ToggleSSO = (props) => {
|
||||
const { t } = useTranslation("SingleSignOn");
|
||||
const {
|
||||
theme,
|
||||
enableSso,
|
||||
@ -21,8 +19,14 @@ const ToggleSSO = (props) => {
|
||||
ssoToggle,
|
||||
confirmationDisableModal,
|
||||
isSSOAvailable,
|
||||
tReady,
|
||||
t,
|
||||
} = props;
|
||||
|
||||
if (!tReady) {
|
||||
return <SSOLoader isToggleSSO={true} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Text
|
||||
@ -106,4 +110,4 @@ export default inject(({ auth, ssoStore }) => {
|
||||
ssoToggle,
|
||||
confirmationDisableModal,
|
||||
};
|
||||
})(observer(ToggleSSO));
|
||||
})(withTranslation(["SingleSignOn"])(observer(ToggleSSO)));
|
||||
|
@ -24,13 +24,16 @@ const StyledLoader = styled.div`
|
||||
}
|
||||
`;
|
||||
|
||||
const SSOLoader = () => {
|
||||
const SSOLoader = (props) => {
|
||||
const { isToggleSSO } = props;
|
||||
return (
|
||||
<StyledLoader>
|
||||
<div className="submenu">
|
||||
<Loaders.Rectangle className="item" height="28px" />
|
||||
<Loaders.Rectangle className="item" height="28px" />
|
||||
</div>
|
||||
{!isToggleSSO && (
|
||||
<div className="submenu">
|
||||
<Loaders.Rectangle className="item" height="28px" />
|
||||
<Loaders.Rectangle className="item" height="28px" />
|
||||
</div>
|
||||
)}
|
||||
<Loaders.Rectangle className="description" height="60px" />
|
||||
<Loaders.Rectangle height="64px" />
|
||||
|
||||
|
@ -90,7 +90,7 @@ const CommonSettings = ({
|
||||
/>
|
||||
</Box>
|
||||
|
||||
<Box className="settings-section">
|
||||
{/* <Box className="settings-section">
|
||||
<Heading className="heading" level={2} size="xsmall">
|
||||
{t("AdditionalSections")}
|
||||
</Heading>
|
||||
@ -109,14 +109,14 @@ const CommonSettings = ({
|
||||
onChange={onChangeFavorites}
|
||||
isChecked={favoritesSection}
|
||||
/>
|
||||
{/* <ToggleButton
|
||||
isDisabled={true}
|
||||
className="toggle-btn"
|
||||
label={t("DisplayTemplates")}
|
||||
onChange={(e) => console.log(e)}
|
||||
isChecked={false}
|
||||
/> */}
|
||||
</Box>
|
||||
<ToggleButton
|
||||
isDisabled={true}
|
||||
className="toggle-btn"
|
||||
label={t("DisplayTemplates")}
|
||||
onChange={(e) => console.log(e)}
|
||||
isChecked={false}
|
||||
/>
|
||||
</Box> */}
|
||||
|
||||
<Box className="settings-section">
|
||||
<Heading className="heading" level={2} size="xsmall">
|
||||
|
@ -1079,7 +1079,7 @@ class FilesStore {
|
||||
"separator1",
|
||||
"open-location",
|
||||
"mark-read",
|
||||
"mark-as-favorite",
|
||||
// "mark-as-favorite",
|
||||
"remove-from-favorites",
|
||||
"download",
|
||||
"download-as",
|
||||
|
@ -252,21 +252,23 @@ class ProfileActionsStore {
|
||||
|
||||
if (!feedbackAndSupportEnabled) {
|
||||
const index = actionsArray.findIndex(
|
||||
(item) => item?.key === "SupportBtn"
|
||||
(item) => item?.key === "user-menu-support"
|
||||
);
|
||||
|
||||
actionsArray.splice(index, 1);
|
||||
}
|
||||
|
||||
if (!videoGuidesEnabled) {
|
||||
const index = actionsArray.findIndex((item) => item?.key === "VideoBtn");
|
||||
const index = actionsArray.findIndex(
|
||||
(item) => item?.key === "user-menu-video"
|
||||
);
|
||||
|
||||
actionsArray.splice(index, 1);
|
||||
}
|
||||
|
||||
if (!helpCenterEnabled) {
|
||||
const index = actionsArray.findIndex(
|
||||
(item) => item?.key === "HelpCenterBtn"
|
||||
(item) => item?.key === "user-menu-help-center"
|
||||
);
|
||||
|
||||
actionsArray.splice(index, 1);
|
||||
|
@ -35,7 +35,12 @@ class TreeFoldersStore {
|
||||
getFoldersTree = () => getFoldersTree();
|
||||
|
||||
setTreeFolders = (treeFolders) => {
|
||||
this.treeFolders = treeFolders;
|
||||
// this.treeFolders = treeFolders;
|
||||
|
||||
//TODO: remove after api fix
|
||||
this.treeFolders = treeFolders
|
||||
.filter((f) => f.rootFolderType !== FolderType.Recent)
|
||||
.filter((f) => f.rootFolderType !== FolderType.Favorites);
|
||||
};
|
||||
|
||||
setIsLoadingNodes = (isLoadingNodes) => {
|
||||
|
@ -123,9 +123,11 @@ const FilterInput = React.memo(
|
||||
value={inputValue}
|
||||
onChange={onSearch}
|
||||
onClearSearch={onClearSearch}
|
||||
id="filter_search-input"
|
||||
/>
|
||||
<FilterButton
|
||||
t={t}
|
||||
id="filter-button"
|
||||
onFilter={onFilter}
|
||||
getFilterData={getFilterData}
|
||||
selectedFilterValue={selectedFilterValue}
|
||||
@ -138,6 +140,7 @@ const FilterInput = React.memo(
|
||||
{!isRecentFolder && (
|
||||
<SortButton
|
||||
t={t}
|
||||
id="sort-by-button"
|
||||
onSort={onSort}
|
||||
getSortData={getSortData}
|
||||
getSelectedSortData={getSelectedSortData}
|
||||
@ -159,6 +162,7 @@ const FilterInput = React.memo(
|
||||
!isTabletUtils()) ||
|
||||
isRecentFolder) && (
|
||||
<ViewSelector
|
||||
id={viewAs === "tile" ? "view-switch--row" : "view-switch--tile"}
|
||||
style={{ marginLeft: "8px" }}
|
||||
viewAs={viewAs === "table" ? "row" : viewAs}
|
||||
viewSettings={viewSettings}
|
||||
|
@ -371,6 +371,7 @@ const FilterBlock = ({
|
||||
<Heading size="medium">{filterHeader}</Heading>
|
||||
{showFooter && (
|
||||
<IconButton
|
||||
id="filter_search-options-clear"
|
||||
iconName="/static/images/clear.react.svg"
|
||||
isFill={true}
|
||||
onClick={onClearFilter}
|
||||
@ -411,6 +412,7 @@ const FilterBlock = ({
|
||||
{showFooter && (
|
||||
<StyledFilterBlockFooter>
|
||||
<Button
|
||||
id="filter_apply-button"
|
||||
size="normal"
|
||||
primary={true}
|
||||
label={t("ApplyButton")}
|
||||
@ -418,6 +420,7 @@ const FilterBlock = ({
|
||||
onClick={onFilterAction}
|
||||
/>
|
||||
<Button
|
||||
id="filter_cancel-button"
|
||||
size="normal"
|
||||
label={t("CancelButton")}
|
||||
scale={true}
|
||||
@ -426,7 +429,7 @@ const FilterBlock = ({
|
||||
</StyledFilterBlockFooter>
|
||||
)}
|
||||
|
||||
<StyledControlContainer onClick={hideFilterBlock}>
|
||||
<StyledControlContainer id="filter_close" onClick={hideFilterBlock}>
|
||||
<StyledCrossIcon />
|
||||
</StyledControlContainer>
|
||||
</StyledFilterBlock>
|
||||
|
@ -82,6 +82,7 @@ const FilterBlockItem = ({
|
||||
onClick={(event) =>
|
||||
showSelectorAction(event, isAuthor, item.group, [])
|
||||
}
|
||||
id="filter_add-author"
|
||||
/>
|
||||
<StyledFilterBlockItemSelectorText noSelect={true}>
|
||||
{item.label}
|
||||
@ -90,6 +91,7 @@ const FilterBlockItem = ({
|
||||
) : (
|
||||
<ColorTheme
|
||||
key={item.key}
|
||||
id={item.id}
|
||||
isSelected={item.isSelected}
|
||||
onClick={(event) =>
|
||||
showSelectorAction(
|
||||
@ -136,6 +138,7 @@ const FilterBlockItem = ({
|
||||
|
||||
return (
|
||||
<ComboBox
|
||||
id={item.id}
|
||||
className={"combo-item"}
|
||||
key={item.key}
|
||||
onSelect={(data) =>
|
||||
@ -162,6 +165,7 @@ const FilterBlockItem = ({
|
||||
return (
|
||||
<StyledFilterBlockItemCheckboxContainer key={item.key}>
|
||||
<Checkbox
|
||||
id={item.id}
|
||||
isChecked={item.isSelected}
|
||||
label={item.label}
|
||||
onChange={() =>
|
||||
@ -178,6 +182,7 @@ const FilterBlockItem = ({
|
||||
key={item.key}
|
||||
isSelected={item.isSelected}
|
||||
name={`${item.label}-${item.key}`}
|
||||
id={item.id}
|
||||
onClick={() =>
|
||||
changeFilterValueAction(item.key, item.isSelected, item.isMultiSelect)
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ const FilterButton = ({
|
||||
isPersonalRoom,
|
||||
isRooms,
|
||||
isAccounts,
|
||||
id,
|
||||
}) => {
|
||||
const [showFilterBlock, setShowFilterBlock] = React.useState(false);
|
||||
|
||||
@ -30,7 +31,7 @@ const FilterButton = ({
|
||||
|
||||
return (
|
||||
<>
|
||||
<StyledButton onClick={changeShowFilterBlock}>
|
||||
<StyledButton id={id} onClick={changeShowFilterBlock}>
|
||||
<IconButton iconName="/static/images/filter.react.svg" size={16} />
|
||||
{selectedFilterValue && selectedFilterValue.length > 0 && (
|
||||
<ColorTheme themeId={ThemeType.IndicatorFilterButton} />
|
||||
|
@ -43,6 +43,7 @@ const SelectedItem = ({ propKey, label, group, removeSelectedItem }) => {
|
||||
{label}
|
||||
</Text>
|
||||
<IconButton
|
||||
className="selected-tag-removed"
|
||||
iconName={"/static/images/cross.react.svg"}
|
||||
size={12}
|
||||
onClick={onRemove}
|
||||
|
@ -158,6 +158,7 @@ const StyledSortButton = styled.div`
|
||||
StyledSortButton.defaultProps = { theme: Base };
|
||||
|
||||
const SortButton = ({
|
||||
id,
|
||||
getSortData,
|
||||
getSelectedSortData,
|
||||
|
||||
@ -167,7 +168,6 @@ const SortButton = ({
|
||||
viewSettings,
|
||||
|
||||
onSort,
|
||||
|
||||
viewSelectorVisible,
|
||||
}) => {
|
||||
const [isOpen, setIsOpen] = React.useState(false);
|
||||
@ -269,6 +269,7 @@ const SortButton = ({
|
||||
)}
|
||||
{sortData?.map((item) => (
|
||||
<DropDownItem
|
||||
id={item.id}
|
||||
onClick={onOptionClick}
|
||||
className={item.className}
|
||||
key={item.key}
|
||||
@ -303,6 +304,7 @@ const SortButton = ({
|
||||
viewAs={viewAs}
|
||||
isDesc={selectedSortData.sortDirection === "desc"}
|
||||
onClick={toggleCombobox}
|
||||
id={id}
|
||||
>
|
||||
<ComboBox
|
||||
opened={isOpen}
|
||||
|
@ -12,7 +12,8 @@ const ArticleFolderLoader = ({
|
||||
className,
|
||||
style,
|
||||
showText,
|
||||
personal,
|
||||
|
||||
isVisitor,
|
||||
...rest
|
||||
}) => {
|
||||
return (
|
||||
@ -22,23 +23,29 @@ const ArticleFolderLoader = ({
|
||||
style={style}
|
||||
showText={showText}
|
||||
>
|
||||
<StyledBlock>
|
||||
<StyledRectangleLoader {...rest} />
|
||||
<StyledRectangleLoader {...rest} />
|
||||
<StyledRectangleLoader {...rest} />
|
||||
<StyledRectangleLoader {...rest} />
|
||||
</StyledBlock>
|
||||
{!personal && (
|
||||
{isVisitor ? (
|
||||
<>
|
||||
<StyledBlock>
|
||||
<StyledRectangleLoader {...rest} />
|
||||
<StyledRectangleLoader {...rest} />
|
||||
</StyledBlock>
|
||||
|
||||
<StyledBlock>
|
||||
<StyledRectangleLoader {...rest} />
|
||||
</StyledBlock>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<StyledBlock>
|
||||
<StyledRectangleLoader {...rest} />
|
||||
<StyledRectangleLoader {...rest} />
|
||||
<StyledRectangleLoader {...rest} />
|
||||
</StyledBlock>
|
||||
|
||||
<StyledBlock>
|
||||
<StyledRectangleLoader {...rest} />
|
||||
<StyledRectangleLoader {...rest} />
|
||||
<StyledRectangleLoader {...rest} />
|
||||
</StyledBlock>
|
||||
</>
|
||||
)}
|
||||
@ -62,6 +69,6 @@ ArticleFolderLoader.defaultProps = {
|
||||
export default inject(({ auth }) => {
|
||||
return {
|
||||
showText: auth.settingsStore.showText,
|
||||
personal: auth.settingsStore.personal,
|
||||
isVisitor: auth.userStore.user.isVisitor,
|
||||
};
|
||||
})(observer(ArticleFolderLoader));
|
||||
|
@ -13,7 +13,11 @@ const DialogAsideLoader = ({
|
||||
|
||||
const renderClearDialogAsideLoader = () => {
|
||||
return (
|
||||
<StyledDialogAsideLoader withFooterBorder={withFooterBorder} visible>
|
||||
<StyledDialogAsideLoader
|
||||
withFooterBorder={withFooterBorder}
|
||||
isPanel={isPanel}
|
||||
visible
|
||||
>
|
||||
<div className="dialog-loader-header">
|
||||
<Loaders.Rectangle height="29px" />
|
||||
</div>
|
||||
@ -23,6 +27,7 @@ const DialogAsideLoader = ({
|
||||
|
||||
<div className="dialog-loader-footer">
|
||||
<Loaders.Rectangle height="40px" />
|
||||
<Loaders.Rectangle height="40px" />
|
||||
</div>
|
||||
</StyledDialogAsideLoader>
|
||||
);
|
||||
@ -32,7 +37,7 @@ const DialogAsideLoader = ({
|
||||
renderClearDialogAsideLoader()
|
||||
) : (
|
||||
<>
|
||||
<Backdrop visible isAside />
|
||||
<Backdrop visible isAside zIndex={zIndex} />
|
||||
<StyledDialogAsideLoader visible isPanel={isPanel}>
|
||||
<Aside className="dialog-aside-loader" visible zIndex={zIndex}>
|
||||
{renderClearDialogAsideLoader()}
|
||||
|
@ -1,41 +1,43 @@
|
||||
import styled, { css } from "styled-components";
|
||||
|
||||
const StyledDialogAsideLoader = styled.div`
|
||||
${(props) =>
|
||||
props.isPanel &&
|
||||
css`
|
||||
.dialog-aside-loader {
|
||||
padding: 0;
|
||||
transform: translateX(${(props) => (props.visible ? "0" : "500px")});
|
||||
width: 500px;
|
||||
|
||||
@media (max-width: 550px) {
|
||||
width: 320px;
|
||||
transform: translateX(${(props) => (props.visible ? "0" : "320px")});
|
||||
}
|
||||
}
|
||||
`}
|
||||
|
||||
${(props) =>
|
||||
props.isPanel
|
||||
? css`
|
||||
.dialog-loader-header {
|
||||
padding: 12px 16px;
|
||||
|
||||
height: 53px;
|
||||
|
||||
border-bottom: ${(props) =>
|
||||
`1px solid ${props.theme.modalDialog.headerBorderColor}`};
|
||||
|
||||
box-sizing: border-box;
|
||||
|
||||
margin-right: -16px;
|
||||
}
|
||||
|
||||
.dialog-loader-body {
|
||||
padding: 16px;
|
||||
margin-right: -16px;
|
||||
}
|
||||
|
||||
.dialog-loader-footer {
|
||||
padding: 12px 16px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 468px;
|
||||
|
||||
@media (max-width: 550px) {
|
||||
width: 288px;
|
||||
}
|
||||
height: 71px;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
|
||||
box-sizing: border-box;
|
||||
|
||||
border-top: ${(props) =>
|
||||
`1px solid ${props.theme.modalDialog.headerBorderColor}`};
|
||||
}
|
||||
`
|
||||
: css`
|
||||
|
@ -153,7 +153,10 @@ const InfoPanel = ({
|
||||
if (!isDesktop() && isVisible) closeInfoPanel();
|
||||
};
|
||||
|
||||
return () => document.removeEventListener("mousedown", onMouseDown);
|
||||
return () => {
|
||||
document.removeEventListener("mousedown", onMouseDown);
|
||||
closeInfoPanel();
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
@ -53,6 +53,7 @@ export const FilterType = Object.freeze({
|
||||
OFormTemplateOnly: 18,
|
||||
OFormOnly: 19,
|
||||
});
|
||||
|
||||
/**
|
||||
* Enum for file type.
|
||||
* @readonly
|
||||
|
@ -61,12 +61,9 @@ class InputBlock extends React.Component {
|
||||
iconSize,
|
||||
theme,
|
||||
forwardedRef,
|
||||
iconButtonClassName,
|
||||
} = this.props;
|
||||
|
||||
const classNamePassword = `password_eye--${
|
||||
type === "password" ? "close" : "open"
|
||||
}`;
|
||||
|
||||
if (typeof iconSize == "number" && iconSize > 0) {
|
||||
iconButtonSize = iconSize;
|
||||
} else {
|
||||
@ -133,7 +130,7 @@ class InputBlock extends React.Component {
|
||||
//iconNames.includes(iconName) && (
|
||||
<div className="append">
|
||||
<StyledIconBlock
|
||||
className={`input-block-icon ${classNamePassword}`}
|
||||
className={`input-block-icon ${iconButtonClassName}`}
|
||||
//isDisabled={isDisabled}
|
||||
onClick={this.onIconClick}
|
||||
isClickable={typeof onIconClick === "function"}
|
||||
@ -216,6 +213,7 @@ InputBlock.propTypes = {
|
||||
className: PropTypes.string,
|
||||
/** Accepts css style */
|
||||
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
|
||||
iconButtonClassName: PropTypes.string,
|
||||
};
|
||||
|
||||
InputBlock.defaultProps = {
|
||||
@ -233,6 +231,7 @@ InputBlock.defaultProps = {
|
||||
isIconFill: false,
|
||||
isDisabled: false,
|
||||
keepCharPositions: false,
|
||||
iconButtonClassName: "",
|
||||
};
|
||||
|
||||
export default InputBlock;
|
||||
|
@ -363,7 +363,9 @@ class PasswordInput extends React.Component {
|
||||
type === "password"
|
||||
? "/static/images/eye.off.react.svg"
|
||||
: "/static/images/eye.react.svg";
|
||||
|
||||
const iconButtonClassName = `password_eye--${
|
||||
type === "password" ? "close" : "open"
|
||||
}`;
|
||||
return (
|
||||
<>
|
||||
<InputBlock
|
||||
@ -373,6 +375,7 @@ class PasswordInput extends React.Component {
|
||||
hasError={hasError}
|
||||
isDisabled={isDisabled}
|
||||
iconName={iconName}
|
||||
iconButtonClassName={iconButtonClassName}
|
||||
value={inputValue}
|
||||
onIconClick={this.changeInputType}
|
||||
onChange={this.onChangeAction}
|
||||
|
@ -86,6 +86,11 @@ class SearchInput extends React.Component {
|
||||
? "/static/images/cross.react.svg"
|
||||
: "/static/images/search.react.svg"
|
||||
}
|
||||
iconButtonClassName={
|
||||
!!this.state.inputValue || this.props.showClearButton
|
||||
? "search-cross"
|
||||
: "search-loupe"
|
||||
}
|
||||
isIconFill={true}
|
||||
iconSize={clearButtonSize}
|
||||
onIconClick={
|
||||
|
@ -27,10 +27,11 @@ const ViewSelector = ({
|
||||
|
||||
const renderFewIconView = () => {
|
||||
return viewSettings.map((el, indx) => {
|
||||
const { value, icon } = el;
|
||||
const { value, icon, id } = el;
|
||||
|
||||
return (
|
||||
<IconWrapper
|
||||
id={id}
|
||||
isDisabled={isDisabled}
|
||||
isChecked={viewAs === value}
|
||||
firstItem={indx === 0}
|
||||
|
@ -484,6 +484,8 @@ function Editor({
|
||||
goback: goBack,
|
||||
};
|
||||
|
||||
config.document.info.favorite = null;
|
||||
|
||||
// if (personal && !fileInfo) {
|
||||
// //TODO: add conditions for SaaS
|
||||
// config.document.info.favorite = null;
|
||||
|
@ -73,6 +73,8 @@ internal class FileMoveCopyOperationData<T> : FileOperationData<T>
|
||||
|
||||
class FileMoveCopyOperation<T> : FileOperation<FileMoveCopyOperationData<T>, T>
|
||||
{
|
||||
private static readonly SemaphoreSlim _semaphore = new SemaphoreSlim(1);
|
||||
|
||||
private readonly int _daoFolderId;
|
||||
private readonly string _thirdpartyFolderId;
|
||||
private readonly bool _copy;
|
||||
@ -382,10 +384,15 @@ class FileMoveCopyOperation<T> : FileOperation<FileMoveCopyOperationData<T>, T>
|
||||
{
|
||||
if (isRoom && toFolder.FolderType == FolderType.VirtualRooms)
|
||||
{
|
||||
await _semaphore.WaitAsync();
|
||||
await countRoomChecker.CheckAppend();
|
||||
newFolderId = await FolderDao.MoveFolderAsync(folder.Id, toFolderId, CancellationToken);
|
||||
_semaphore.Release();
|
||||
}
|
||||
else
|
||||
{
|
||||
newFolderId = await FolderDao.MoveFolderAsync(folder.Id, toFolderId, CancellationToken);
|
||||
}
|
||||
|
||||
newFolderId = await FolderDao.MoveFolderAsync(folder.Id, toFolderId, CancellationToken);
|
||||
}
|
||||
|
||||
newFolder = await folderDao.GetFolderAsync(newFolderId);
|
||||
|
@ -50,13 +50,12 @@ public abstract class FileOperation : DistributedTaskProgress
|
||||
_culture = Thread.CurrentThread.CurrentCulture.Name;
|
||||
|
||||
this[Owner] = ((IAccount)(_principal ?? Thread.CurrentPrincipal).Identity).ID.ToString();
|
||||
this[Src] = "";
|
||||
this[Src] = _props.ContainsValue(Src) ? this[Src] : "";
|
||||
this[Progress] = 0;
|
||||
this[Res] = "";
|
||||
this[Err] = "";
|
||||
this[Process] = 0;
|
||||
this[Finish] = false;
|
||||
this[Hold] = false;
|
||||
}
|
||||
|
||||
protected void IncrementProgress()
|
||||
@ -84,6 +83,7 @@ internal class ComposeFileOperation<T1, T2> : FileOperation
|
||||
{
|
||||
ThirdPartyOperation = thirdPartyOperation;
|
||||
DaoOperation = daoOperation;
|
||||
this[Hold] = ThirdPartyOperation[Hold] || DaoOperation[Hold];
|
||||
}
|
||||
|
||||
public override async Task RunJob(DistributedTask _, CancellationToken cancellationToken)
|
||||
|
Loading…
Reference in New Issue
Block a user