Merge branch 'release/1.0.0' into bugfix/mousewheel-opening-files
This commit is contained in:
commit
8407efccaf
@ -2,6 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
|
@ -12,6 +12,7 @@
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<WarningsAsErrors></WarningsAsErrors>
|
||||
<NoWarn>$(NoWarn);NU1605</NoWarn>
|
||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
|
@ -10,6 +10,7 @@
|
||||
<Product>ASC.Core.Common</Product>
|
||||
<Copyright>(c) Ascensio System SIA. All rights reserved</Copyright>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
|
@ -5,6 +5,7 @@
|
||||
<Company>Ascensio System SIA</Company>
|
||||
<Product>ASC.Notify.Textile</Product>
|
||||
<Copyright>(c) Ascensio System SIA. All rights reserved</Copyright>
|
||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
|
@ -11,6 +11,7 @@
|
||||
<Product>ASC.Textile</Product>
|
||||
<Copyright>(c) Ascensio System SIA. All rights reserved</Copyright>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
|
@ -76,7 +76,7 @@ export const request = function (options) {
|
||||
? getResponseError(error.response)
|
||||
: error.message;
|
||||
|
||||
switch (error.response.status) {
|
||||
switch (error.response?.status) {
|
||||
case 401:
|
||||
if (options.skipUnauthorized) return Promise.resolve();
|
||||
|
||||
|
@ -53,6 +53,9 @@ const StyledArticleBody = styled.div`
|
||||
|
||||
const StyledArticleWrapper = styled.div`
|
||||
margin: 16px 0;
|
||||
@media ${tablet} {
|
||||
${!isMobile && `margin-bottom:47px`};
|
||||
}
|
||||
`;
|
||||
|
||||
class ArticleBody extends React.Component {
|
||||
|
@ -33,6 +33,11 @@ const PrivateRoute = ({ component: Component, ...rest }) => {
|
||||
|
||||
const renderComponent = (props) => {
|
||||
if (isLoaded && !isAuthenticated) {
|
||||
if (personal && process.env.NODE_ENV === "production") {
|
||||
window.location.replace("/");
|
||||
return <></>;
|
||||
}
|
||||
|
||||
console.log("PrivateRoute render Redirect to login", rest);
|
||||
return (
|
||||
<Redirect
|
||||
|
@ -97,6 +97,7 @@ class GroupButton extends React.Component {
|
||||
isSeparator,
|
||||
label,
|
||||
style,
|
||||
alt,
|
||||
} = this.props;
|
||||
|
||||
const itemLabel = !isSelect ? label : this.state.selected;
|
||||
@ -154,7 +155,7 @@ class GroupButton extends React.Component {
|
||||
</DropDown>
|
||||
</>
|
||||
) : (
|
||||
<StyledDropdownToggle {...this.props} title={itemLabel}>
|
||||
<StyledDropdownToggle {...this.props} title={alt || itemLabel}>
|
||||
{label}
|
||||
</StyledDropdownToggle>
|
||||
)}
|
||||
@ -204,6 +205,8 @@ GroupButton.propTypes = {
|
||||
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
|
||||
/** Value of tab index */
|
||||
tabIndex: PropTypes.number,
|
||||
/** Alternative value of the group button */
|
||||
alt: PropTypes.string,
|
||||
};
|
||||
|
||||
GroupButton.defaultProps = {
|
||||
|
@ -172,6 +172,7 @@ class GroupButtonsMenu extends React.Component {
|
||||
isIndeterminate={isIndeterminate}
|
||||
onChange={onChange}
|
||||
opened={item.opened}
|
||||
alt={item.alt}
|
||||
>
|
||||
{item.children}
|
||||
</GroupButton>
|
||||
|
@ -17,10 +17,12 @@ import { connectedCloudsTitleTranslation } from "../../../helpers/utils";
|
||||
|
||||
const StyledThirdParty = styled.div`
|
||||
margin-top: 42px;
|
||||
${isMobile &&
|
||||
css`
|
||||
margin-bottom: 64px;
|
||||
`}
|
||||
${
|
||||
isMobile &&
|
||||
css`
|
||||
margin-bottom: 64px;
|
||||
`
|
||||
}
|
||||
.tree-thirdparty-list {
|
||||
padding-top: 3px;
|
||||
display: flex;
|
||||
@ -46,10 +48,9 @@ const StyledThirdParty = styled.div`
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
height: 32px;
|
||||
margin-right: 0px;
|
||||
|
||||
:first-of-type {
|
||||
border-radius: 3px 0 0 3px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
:last-of-type {
|
||||
border-radius: 0 3px 3px 0;
|
||||
|
@ -119,21 +119,23 @@ class DeleteDialogComponent extends React.Component {
|
||||
isLoading,
|
||||
unsubscribe,
|
||||
isPrivacyFolder,
|
||||
isRecycleBinFolder,
|
||||
personal,
|
||||
} = this.props;
|
||||
const { filesList, foldersList, selection } = this.state;
|
||||
|
||||
const checkedSelections = selection.filter((x) => x.checked === true);
|
||||
|
||||
const title = isPrivacyFolder
|
||||
? t("ConfirmRemove")
|
||||
: unsubscribe
|
||||
? t("UnsubscribeTitle")
|
||||
: checkedSelections.length === 1 || isPrivacyFolder
|
||||
? checkedSelections[0].fileExst
|
||||
? t("MoveToTrashOneFileTitle")
|
||||
: t("MoveToTrashOneFolderTitle")
|
||||
: t("MoveToTrashItemsTitle");
|
||||
const title =
|
||||
isPrivacyFolder || isRecycleBinFolder
|
||||
? t("ConfirmRemove")
|
||||
: unsubscribe
|
||||
? t("UnsubscribeTitle")
|
||||
: checkedSelections.length === 1 || isPrivacyFolder
|
||||
? checkedSelections[0].fileExst
|
||||
? t("MoveToTrashOneFileTitle")
|
||||
: t("MoveToTrashOneFolderTitle")
|
||||
: t("MoveToTrashItemsTitle");
|
||||
|
||||
const noteText = unsubscribe
|
||||
? t("UnsubscribeNote")
|
||||
@ -145,11 +147,12 @@ class DeleteDialogComponent extends React.Component {
|
||||
: t("MoveToTrashOneFolderNote")
|
||||
: t("MoveToTrashItemsNote");
|
||||
|
||||
const accessButtonLabel = isPrivacyFolder
|
||||
? t("Common:OKButton")
|
||||
: unsubscribe
|
||||
? t("UnsubscribeButton")
|
||||
: t("MoveToTrashButton");
|
||||
const accessButtonLabel =
|
||||
isPrivacyFolder || isRecycleBinFolder
|
||||
? t("Common:OKButton")
|
||||
: unsubscribe
|
||||
? t("UnsubscribeButton")
|
||||
: t("MoveToTrashButton");
|
||||
|
||||
const accuracy = 20;
|
||||
let filesHeight = 25 * filesList.length + accuracy + 8;
|
||||
@ -251,7 +254,7 @@ export default inject(
|
||||
}) => {
|
||||
const { selection, isLoading } = filesStore;
|
||||
const { deleteAction, unsubscribeAction } = filesActionsStore;
|
||||
const { isPrivacyFolder } = treeFoldersStore;
|
||||
const { isPrivacyFolder, isRecycleBinFolder } = treeFoldersStore;
|
||||
|
||||
const {
|
||||
deleteDialogVisible: visible,
|
||||
@ -269,6 +272,7 @@ export default inject(
|
||||
isRootFolder: selectedFolderStore.isRootFolder,
|
||||
visible,
|
||||
isPrivacyFolder,
|
||||
isRecycleBinFolder,
|
||||
|
||||
setDeleteDialogVisible,
|
||||
deleteAction,
|
||||
|
@ -78,7 +78,7 @@ const FilesTile = (props) => {
|
||||
onMouseUp={onMouseUp}
|
||||
thumbnailClick={onFilesClick}
|
||||
onDoubleClick={onFilesClick}
|
||||
{...checkedProps}
|
||||
checked={checkedProps}
|
||||
{...contextOptionsProps}
|
||||
contextButtonSpacerWidth={displayShareButton}
|
||||
>
|
||||
|
@ -326,7 +326,7 @@ class SectionHeaderContent extends React.Component {
|
||||
selectionCount,
|
||||
isAccessedSelected,
|
||||
isWebEditSelected,
|
||||
// isViewedSelected,
|
||||
isViewedSelected,
|
||||
// isMediaSelected,
|
||||
deleteDialogVisible,
|
||||
isRecycleBin,
|
||||
@ -335,7 +335,7 @@ class SectionHeaderContent extends React.Component {
|
||||
isFavoritesFolder,
|
||||
isRecentFolder,
|
||||
isShareFolder,
|
||||
// personal,
|
||||
personal,
|
||||
} = this.props;
|
||||
|
||||
let menu = [
|
||||
@ -442,14 +442,13 @@ class SectionHeaderContent extends React.Component {
|
||||
label: t("Translations:Restore"),
|
||||
onClick: this.onMoveAction,
|
||||
});
|
||||
|
||||
menu.splice(1, 1);
|
||||
}
|
||||
|
||||
if (isFavoritesFolder) {
|
||||
menu.splice(6, 1);
|
||||
menu.push({
|
||||
label: t("Common:Delete"),
|
||||
alt: t("RemoveFromFavorites"),
|
||||
onClick: this.onDeleteFavorite,
|
||||
});
|
||||
}
|
||||
@ -469,16 +468,12 @@ class SectionHeaderContent extends React.Component {
|
||||
}
|
||||
|
||||
if (isRecentFolder || isFavoritesFolder) {
|
||||
menu.splice(1, 1);
|
||||
menu.splice(3, 1);
|
||||
menu.splice(4, 1);
|
||||
}
|
||||
|
||||
/*if (
|
||||
(personal && !isWebEditSelected && !isViewedSelected) ||
|
||||
selectionCount > 1
|
||||
) {
|
||||
if (personal) {
|
||||
menu.splice(1, 1);
|
||||
}*/
|
||||
}
|
||||
|
||||
return menu;
|
||||
};
|
||||
|
@ -57,12 +57,10 @@ namespace ASC.Web.Files.HttpHandlers
|
||||
{
|
||||
public class ChunkedUploaderHandler
|
||||
{
|
||||
private RequestDelegate Next { get; }
|
||||
private IServiceProvider ServiceProvider { get; }
|
||||
|
||||
public ChunkedUploaderHandler(RequestDelegate next, IServiceProvider serviceProvider)
|
||||
{
|
||||
Next = next;
|
||||
ServiceProvider = serviceProvider;
|
||||
}
|
||||
|
||||
@ -70,8 +68,7 @@ namespace ASC.Web.Files.HttpHandlers
|
||||
{
|
||||
using var scope = ServiceProvider.CreateScope();
|
||||
var chunkedUploaderHandlerService = scope.ServiceProvider.GetService<ChunkedUploaderHandlerService>();
|
||||
await chunkedUploaderHandlerService.Invoke(context);
|
||||
await Next.Invoke(context);
|
||||
await chunkedUploaderHandlerService.Invoke(context).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,12 +51,10 @@ namespace ASC.Web.Files.HttpHandlers
|
||||
{
|
||||
public class DocuSignHandler
|
||||
{
|
||||
private RequestDelegate Next { get; }
|
||||
private IServiceProvider ServiceProvider { get; }
|
||||
|
||||
public DocuSignHandler(RequestDelegate next, IServiceProvider serviceProvider)
|
||||
{
|
||||
Next = next;
|
||||
ServiceProvider = serviceProvider;
|
||||
}
|
||||
|
||||
@ -64,8 +62,7 @@ namespace ASC.Web.Files.HttpHandlers
|
||||
{
|
||||
using var scope = ServiceProvider.CreateScope();
|
||||
var docuSignHandlerService = scope.ServiceProvider.GetService<DocuSignHandlerService>();
|
||||
await docuSignHandlerService.Invoke(context);
|
||||
await Next.Invoke(context);
|
||||
await docuSignHandlerService.Invoke(context).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
|
@ -527,8 +527,15 @@ namespace ASC.Web.Core.Users
|
||||
public void RemovePhoto(Guid idUser)
|
||||
{
|
||||
UserManager.SaveUserPhoto(idUser, null);
|
||||
var storage = GetDataStore();
|
||||
storage.DeleteFiles("", idUser + "*.*", false);
|
||||
try
|
||||
{
|
||||
var storage = GetDataStore();
|
||||
storage.DeleteFiles("", idUser + "*.*", false);
|
||||
}
|
||||
catch(DirectoryNotFoundException e)
|
||||
{
|
||||
Log.Error(e);
|
||||
}
|
||||
|
||||
UserManager.SaveUserPhoto(idUser, null);
|
||||
UserPhotoManagerCache.ClearCache(idUser);
|
||||
|
Loading…
Reference in New Issue
Block a user