Merge branch 'release/v1.2' of https://github.com/ONLYOFFICE/AppServer into release/v1.2

This commit is contained in:
Alexey Safronov 2022-06-21 19:45:30 +03:00
commit bbcd5b7382
17 changed files with 91 additions and 68 deletions

View File

@ -47,7 +47,7 @@ public class DarkThemeSettings : ISettings
{
return new DarkThemeSettings
{
Theme = DarkThemeSettingsEnum.Base,
Theme = DarkThemeSettingsEnum.System,
};
}
}

View File

@ -65,7 +65,6 @@ const FilterInput = React.memo(
onChange={onSearch}
onClearSearch={onClearSearch}
/>
<FilterButton
t={t}
selectedFilterData={selectedFilterData}
@ -74,38 +73,36 @@ const FilterInput = React.memo(
onFilter={onFilter}
headerLabel={headerLabel}
/>
{(viewSettings &&
{(isMobile ||
isTabletUtils() ||
isMobileUtils() ||
viewAs === "row") && (
<SortButton
t={t}
selectedFilterData={selectedFilterData}
getSortData={getSortData}
onChangeViewAs={onChangeViewAs}
viewAs={viewAs === "table" ? "row" : viewAs}
viewSettings={viewSettings}
onSort={onSort}
viewSelectorVisible={
viewSelectorVisible &&
(isMobile || isMobileUtils() || isTabletUtils())
}
/>
)}
{((viewSettings &&
!isMobile &&
viewSelectorVisible &&
!isMobileUtils() &&
!isTabletUtils() &&
viewAs !== "row") ||
isRecentFolder ? (
!isTabletUtils()) ||
isRecentFolder) && (
<ViewSelector
style={{ marginLeft: "8px" }}
onChangeView={onChangeViewAs}
viewAs={viewAs === "table" ? "row" : viewAs}
viewSettings={viewSettings}
/>
) : (
<>
{(isMobile ||
isTabletUtils() ||
isMobileUtils() ||
viewAs === "row") && (
<SortButton
t={t}
selectedFilterData={selectedFilterData}
getSortData={getSortData}
onChangeViewAs={onChangeViewAs}
viewAs={viewAs === "table" ? "row" : viewAs}
viewSettings={viewSettings}
onSort={onSort}
viewSelectorVisible={viewSelectorVisible}
/>
)}
</>
)}
</StyledFilterInput>
);

View File

@ -1,6 +1,11 @@
import styled, { css } from "styled-components";
import { isMobile, isMobileOnly } from "react-device-detect";
import { tablet, mobile, desktop } from "@appserver/components/utils/device";
import {
tablet,
mobile,
desktop,
hugeMobile,
} from "@appserver/components/utils/device";
const StyledContainer = styled.div`
${(props) =>
@ -50,7 +55,7 @@ const StyledContainer = styled.div`
padding: ${(props) => (props.isDropBox ? "10px 0 5px" : "10px 0 11px")};
}
@media ${mobile} {
@media ${mobile}, ${hugeMobile} {
padding: ${(props) =>
props.isDropBox ? "10px 0 5px" : "10px 0 11px"} !important;
}

View File

@ -55,6 +55,7 @@ const StyledInfoPanelToggleWrapper = styled.div`
${isMobile &&
css`
display: none;
margin-left: ${(props) => (props.isRootFolder ? "auto" : "0")};
`}

View File

@ -31,16 +31,15 @@ const StyledInfoPanelWrapper = styled.div.attrs(({ id }) => ({
right: 0;
}
/* ${(props) =>
(props.isRowView || isMobile) &&
css`
z-index: 309;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
`} */
${isMobile &&
css`
z-index: 309;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
`}
`;
const StyledInfoPanel = styled.div`
@ -63,6 +62,15 @@ const StyledInfoPanel = styled.div`
max-width: calc(100vw - 69px);
}
${isMobile &&
css`
position: absolute;
border: none;
right: 0;
width: 480px;
max-width: calc(100vw - 69px);
`}
/* ${(props) =>
(props.isRowView || isMobile) &&
css`
@ -103,6 +111,14 @@ const StyledControlContainer = styled.div`
left: -34px;
}
${isMobile &&
css`
display: flex;
top: 16px;
left: -34px;
`}
/* ${(props) =>
(props.isRowView || isMobile) &&
css`

View File

@ -3,7 +3,7 @@ import PropTypes from "prop-types";
import { ReactSVG } from "react-svg";
import styled from "styled-components";
import Button from "../button";
import { mobile, tablet } from "../utils/device";
import { mobile, tablet, hugeMobile } from "../utils/device";
import { Base } from "../themes";
const StyledButton = styled(Button)`
@ -74,7 +74,7 @@ const StyledButton = styled(Button)`
}
}
@media ${mobile} {
@media ${mobile}, ${hugeMobile} {
padding: 0 16px;
height: 50px;
font-size: 0;

View File

@ -1,6 +1,6 @@
import styled, { css } from "styled-components";
import Base from "../themes/base";
import { mobile, tablet } from "../utils/device";
import { mobile, tablet, hugeMobile } from "../utils/device";
import Scrollbar from "../scrollbar";
import { isMobile } from "react-device-detect";
@ -99,7 +99,7 @@ const StyledTableGroupMenu = styled.div`
height: 60px;
}
@media ${mobile} {
@media ${mobile}, ${hugeMobile} {
height: 52px;
}

View File

@ -1,5 +1,6 @@
export const size = {
mobile: 375,
hugeMobile: 414,
smallTablet: 600,
tablet: 1024,
desktop: 1025,
@ -7,6 +8,8 @@ export const size = {
export const mobile = `(max-width: ${size.mobile}px)`;
export const hugeMobile = `(max-width: ${size.hugeMobile}px)`;
export const smallTablet = `(max-width: ${size.smallTablet}px)`;
export const tablet = `(max-width: ${size.tablet}px)`;
@ -17,12 +20,18 @@ export const isMobile = () => {
return window.innerWidth <= size.mobile;
};
export const isHugeMobile = () => {
return window.innerWidth <= size.hugeMobile;
};
export const isSmallTablet = () => {
return window.innerWidth < size.smallTablet;
};
export const isTablet = () => {
return window.innerWidth <= size.tablet && window.innerWidth >= size.mobile;
return (
window.innerWidth <= size.tablet && window.innerWidth >= size.hugeMobile
);
};
export const isDesktop = () => {

View File

@ -156,7 +156,7 @@ const withHotkeys = (Component) => {
useHotkeys(
"Shift+d",
() => setAction({ type: FileAction.Create, extension: "docx", id: -1 }),
hotkeysFilter
{ ...hotkeysFilter, ...{ keyup: true } }
);
//Crete spreadsheet

View File

@ -118,12 +118,13 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations
MimeMapping.GetMimeMapping(path),
"attachment; filename=\"" + fileName + "\"");
Result = string.Format("{0}?{1}=bulk&ext={2}", filesLinkUtility.FileHandlerPath, FilesLinkUtility.Action, archiveExtension);
}
}
TaskInfo.SetProperty(FINISHED, true);
FillDistributedTask();
TaskInfo.PublishChanges();
}
}
public override void PublishChanges(DistributedTask task)
{
var thirdpartyTask = ThirdPartyOperation.GetDistributedTask();
@ -139,15 +140,7 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations
else if (!string.IsNullOrEmpty(error2))
{
Error = error2;
}
var finished1 = thirdpartyTask.GetProperty<bool?>(FINISHED);
var finished2 = daoTask.GetProperty<bool?>(FINISHED);
if (finished1 != null && finished2 != null)
{
TaskInfo.SetProperty(FINISHED, finished1);
}
}
successProcessed = thirdpartyTask.GetProperty<int>(PROCESSED) + daoTask.GetProperty<int>(PROCESSED);
@ -383,6 +376,7 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations
filesMessageService.Send(file, headers, MessageAction.FileDownloaded, file.Title);
}
}
compressTo.CloseEntry();
}
catch (Exception ex)
{
@ -393,8 +387,9 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations
else
{
compressTo.PutNextEntry();
compressTo.CloseEntry();
}
compressTo.CloseEntry();
counter++;
}

View File

@ -109,7 +109,7 @@ const Layout = (props) => {
if (isMobileOnly && isIOS && isChrome) {
if (window.innerHeight < window.innerWidth && isPortrait) {
height = window.screen.availWidth - correctorMobileChrome;
height = window.screen.availWidth - correctorMobileChrome + "px";
}
}

View File

@ -73,7 +73,7 @@ const SettingsContainer = ({
{titleEmail}
{contentEmail}
<Text fontSize="13px">{t("Language")}:</Text>
<Text fontSize="13px">{t("Common:Language")}:</Text>
<ComboBox
className="drop-down"
options={languages}

View File

@ -290,7 +290,7 @@
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="PublicResources\WebstudioNotifyPatternResource.resx">
<Generator>ResXFileCodeGenerator</Generator>
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>WebstudioNotifyPatternResource.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="PublicResources\WebstudioNotifyPatternResource.ru.resx">

View File

@ -19,7 +19,7 @@ namespace ASC.Web.Core.PublicResources {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class CustomModeResource {
@ -175,11 +175,11 @@ namespace ASC.Web.Core.PublicResources {
/// <summary>
/// Looks up a localized string similar to You have requested a termination of your account at personal.onlyoffice.com. Follow the link to complete the request (the link is active for a 7-day period):
///
///Confirm account termination
///$GreenButton
///
///*Note*: After the deletion, your account and all data associated with it will be erased permanently in accordance with our &quot;Privacy statement&quot;:&quot;https://help.onlyoffice.com/products/files/doceditor.aspx?fileid=5048502&amp;doc=SXhWMEVzSEYxNlVVaXJJeUVtS0kyYk14YWdXTEFUQmRWL250NllHNUFGbz0_IjUwNDg1MDIi0&quot;.
///
///&quot;Read more about account [rest of string was truncated]&quot;;.
///&quot;Read more about account termination&quot;:&quot;h [rest of string was truncated]&quot;;.
/// </summary>
public static string pattern_personal_custom_mode_profile_delete {
get {

View File

@ -181,7 +181,7 @@ ONLYOFFICE team</value>
<data name="pattern_personal_custom_mode_profile_delete" xml:space="preserve">
<value>You have requested a termination of your account at personal.onlyoffice.com. Follow the link to complete the request (the link is active for a 7-day period):
Confirm account termination
$GreenButton
*Note*: After the deletion, your account and all data associated with it will be erased permanently in accordance with our "Privacy statement":"https://help.onlyoffice.com/products/files/doceditor.aspx?fileid=5048502&amp;doc=SXhWMEVzSEYxNlVVaXJJeUVtS0kyYk14YWdXTEFUQmRWL250NllHNUFGbz0_IjUwNDg1MDIi0".

View File

@ -19,7 +19,7 @@ namespace ASC.Web.Core.PublicResources {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class WebstudioNotifyPatternResource {
@ -1586,11 +1586,11 @@ namespace ASC.Web.Core.PublicResources {
/// <summary>
/// Looks up a localized string similar to You have requested a termination of your account at personal.onlyoffice.com. Follow the link to complete the request (the link is active for a 7-day period):
///
///Confirm account termination
///$GreenButton
///
///*Note*: After the deletion, your account and all data associated with it will be erased permanently in accordance with our &quot;Privacy statement&quot;:&quot;https://help.onlyoffice.com/products/files/doceditor.aspx?fileid=5048502&amp;doc=SXhWMEVzSEYxNlVVaXJJeUVtS0kyYk14YWdXTEFUQmRWL250NllHNUFGbz0_IjUwNDg1MDIi0&quot;.
///
///&quot;Read more about account [rest of string was truncated]&quot;;.
///&quot;Read more about account termination&quot;:&quot;h [rest of string was truncated]&quot;;.
/// </summary>
public static string pattern_personal_profile_delete {
get {

View File

@ -1057,7 +1057,7 @@ ONLYOFFICE team</value>
<data name="pattern_personal_profile_delete" xml:space="preserve">
<value>You have requested a termination of your account at personal.onlyoffice.com. Follow the link to complete the request (the link is active for a 7-day period):
Confirm account termination
$GreenButton
*Note*: After the deletion, your account and all data associated with it will be erased permanently in accordance with our "Privacy statement":"https://help.onlyoffice.com/products/files/doceditor.aspx?fileid=5048502&amp;doc=SXhWMEVzSEYxNlVVaXJJeUVtS0kyYk14YWdXTEFUQmRWL250NllHNUFGbz0_IjUwNDg1MDIi0".