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 return new DarkThemeSettings
{ {
Theme = DarkThemeSettingsEnum.Base, Theme = DarkThemeSettingsEnum.System,
}; };
} }
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -109,7 +109,7 @@ const Layout = (props) => {
if (isMobileOnly && isIOS && isChrome) { if (isMobileOnly && isIOS && isChrome) {
if (window.innerHeight < window.innerWidth && isPortrait) { 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} {titleEmail}
{contentEmail} {contentEmail}
<Text fontSize="13px">{t("Language")}:</Text> <Text fontSize="13px">{t("Common:Language")}:</Text>
<ComboBox <ComboBox
className="drop-down" className="drop-down"
options={languages} options={languages}

View File

@ -290,7 +290,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Update="PublicResources\WebstudioNotifyPatternResource.resx"> <EmbeddedResource Update="PublicResources\WebstudioNotifyPatternResource.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>WebstudioNotifyPatternResource.Designer.cs</LastGenOutput> <LastGenOutput>WebstudioNotifyPatternResource.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Update="PublicResources\WebstudioNotifyPatternResource.ru.resx"> <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. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // 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.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class CustomModeResource { public class CustomModeResource {
@ -175,11 +175,11 @@ namespace ASC.Web.Core.PublicResources {
/// <summary> /// <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): /// 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;. ///*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> /// </summary>
public static string pattern_personal_custom_mode_profile_delete { public static string pattern_personal_custom_mode_profile_delete {
get { get {

View File

@ -181,7 +181,7 @@ ONLYOFFICE team</value>
<data name="pattern_personal_custom_mode_profile_delete" xml:space="preserve"> <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): <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". *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. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // 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.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class WebstudioNotifyPatternResource { public class WebstudioNotifyPatternResource {
@ -1586,11 +1586,11 @@ namespace ASC.Web.Core.PublicResources {
/// <summary> /// <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): /// 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;. ///*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> /// </summary>
public static string pattern_personal_profile_delete { public static string pattern_personal_profile_delete {
get { get {

View File

@ -1057,7 +1057,7 @@ ONLYOFFICE team</value>
<data name="pattern_personal_profile_delete" xml:space="preserve"> <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): <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". *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".