Merge branch 'release/1.0.0' of github.com:ONLYOFFICE/AppServer into release/1.0.0
This commit is contained in:
commit
f3796d1d56
8
build/Jenkinsfile
vendored
8
build/Jenkinsfile
vendored
@ -8,7 +8,7 @@ pipeline {
|
|||||||
stages {
|
stages {
|
||||||
stage('Frontend') {
|
stage('Frontend') {
|
||||||
steps {
|
steps {
|
||||||
sh 'yarn install && yarn build'
|
sh 'yarn install --frozen-lockfile && yarn build'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Backend') {
|
stage('Backend') {
|
||||||
@ -23,7 +23,7 @@ pipeline {
|
|||||||
stages {
|
stages {
|
||||||
stage('Frontend') {
|
stage('Frontend') {
|
||||||
steps {
|
steps {
|
||||||
bat 'yarn install && yarn build'
|
bat "yarn install --frozen-lockfile && yarn build"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Backend') {
|
stage('Backend') {
|
||||||
@ -43,7 +43,7 @@ pipeline {
|
|||||||
stages {
|
stages {
|
||||||
stage('Components') {
|
stage('Components') {
|
||||||
steps {
|
steps {
|
||||||
sh "yarn install && yarn build && cd ${env.WORKSPACE}/packages/asc-web-components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
|
sh "yarn install --frozen-lockfile && yarn build && cd ${env.WORKSPACE}/packages/asc-web-components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
@ -72,7 +72,7 @@ pipeline {
|
|||||||
stages {
|
stages {
|
||||||
stage('Components') {
|
stage('Components') {
|
||||||
steps {
|
steps {
|
||||||
bat "yarn install && yarn build && cd ${env.WORKSPACE}\\packages\\asc-web-components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
|
bat "yarn install --frozen-lockfile && yarn build && cd ${env.WORKSPACE}\\packages\\asc-web-components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
|
@ -53,35 +53,22 @@ namespace ASC.Data.Storage
|
|||||||
protected EmailValidationKeyProvider EmailValidationKeyProvider { get; }
|
protected EmailValidationKeyProvider EmailValidationKeyProvider { get; }
|
||||||
protected IHttpContextAccessor HttpContextAccessor { get; }
|
protected IHttpContextAccessor HttpContextAccessor { get; }
|
||||||
protected IOptionsMonitor<ILog> Options { get; }
|
protected IOptionsMonitor<ILog> Options { get; }
|
||||||
|
|
||||||
public BaseStorage(
|
|
||||||
TempStream tempStream,
|
|
||||||
TenantManager tenantManager,
|
|
||||||
PathUtils pathUtils,
|
|
||||||
EmailValidationKeyProvider emailValidationKeyProvider,
|
|
||||||
IOptionsMonitor<ILog> options)
|
|
||||||
{
|
|
||||||
TempStream = tempStream;
|
|
||||||
TenantManager = tenantManager;
|
|
||||||
PathUtils = pathUtils;
|
|
||||||
EmailValidationKeyProvider = emailValidationKeyProvider;
|
|
||||||
Options = options;
|
|
||||||
Log = options.CurrentValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BaseStorage(
|
public BaseStorage(
|
||||||
TempStream tempStream,
|
TempStream tempStream,
|
||||||
TenantManager tenantManager,
|
TenantManager tenantManager,
|
||||||
PathUtils pathUtils,
|
PathUtils pathUtils,
|
||||||
EmailValidationKeyProvider emailValidationKeyProvider,
|
EmailValidationKeyProvider emailValidationKeyProvider,
|
||||||
IHttpContextAccessor httpContextAccessor,
|
IHttpContextAccessor httpContextAccessor,
|
||||||
IOptionsMonitor<ILog> options) : this(
|
IOptionsMonitor<ILog> options)
|
||||||
tempStream,
|
|
||||||
tenantManager,
|
|
||||||
pathUtils,
|
|
||||||
emailValidationKeyProvider,
|
|
||||||
options)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
TempStream = tempStream;
|
||||||
|
TenantManager = tenantManager;
|
||||||
|
PathUtils = pathUtils;
|
||||||
|
EmailValidationKeyProvider = emailValidationKeyProvider;
|
||||||
|
Options = options;
|
||||||
|
Log = options.CurrentValue;
|
||||||
HttpContextAccessor = httpContextAccessor;
|
HttpContextAccessor = httpContextAccessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,21 +76,7 @@ namespace ASC.Data.Storage.DiscStorage
|
|||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DiscDataStore(
|
|
||||||
TempStream tempStream,
|
|
||||||
TenantManager tenantManager,
|
|
||||||
PathUtils pathUtils,
|
|
||||||
EmailValidationKeyProvider emailValidationKeyProvider,
|
|
||||||
IOptionsMonitor<ILog> options,
|
|
||||||
EncryptionSettingsHelper encryptionSettingsHelper,
|
|
||||||
EncryptionFactory encryptionFactory)
|
|
||||||
: base(tempStream, tenantManager, pathUtils, emailValidationKeyProvider, options)
|
|
||||||
{
|
|
||||||
EncryptionSettingsHelper = encryptionSettingsHelper;
|
|
||||||
EncryptionFactory = encryptionFactory;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DiscDataStore(
|
public DiscDataStore(
|
||||||
TempStream tempStream,
|
TempStream tempStream,
|
||||||
TenantManager tenantManager,
|
TenantManager tenantManager,
|
||||||
|
@ -71,16 +71,7 @@ namespace ASC.Data.Storage.GoogleCloud
|
|||||||
private Uri _bucketSSlRoot;
|
private Uri _bucketSSlRoot;
|
||||||
|
|
||||||
private bool _lowerCasing = true;
|
private bool _lowerCasing = true;
|
||||||
|
|
||||||
public GoogleCloudStorage(
|
|
||||||
TempStream tempStream,
|
|
||||||
TenantManager tenantManager,
|
|
||||||
PathUtils pathUtils,
|
|
||||||
EmailValidationKeyProvider emailValidationKeyProvider,
|
|
||||||
IOptionsMonitor<ILog> options) : base(tempStream, tenantManager, pathUtils, emailValidationKeyProvider, options)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public GoogleCloudStorage(
|
public GoogleCloudStorage(
|
||||||
TempStream tempStream,
|
TempStream tempStream,
|
||||||
TenantManager tenantManager,
|
TenantManager tenantManager,
|
||||||
|
@ -64,20 +64,7 @@ namespace ASC.Data.Storage.RackspaceCloud
|
|||||||
private Uri _cnameSSL;
|
private Uri _cnameSSL;
|
||||||
|
|
||||||
private readonly ILog _logger;
|
private readonly ILog _logger;
|
||||||
|
|
||||||
public RackspaceCloudStorage(
|
|
||||||
TempPath tempPath,
|
|
||||||
TempStream tempStream,
|
|
||||||
TenantManager tenantManager,
|
|
||||||
PathUtils pathUtils,
|
|
||||||
EmailValidationKeyProvider emailValidationKeyProvider,
|
|
||||||
IOptionsMonitor<ILog> options)
|
|
||||||
: base(tempStream, tenantManager, pathUtils, emailValidationKeyProvider, options)
|
|
||||||
{
|
|
||||||
_logger = options.Get("ASC.Data.Storage.Rackspace.RackspaceCloudStorage");
|
|
||||||
TempPath = tempPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
public RackspaceCloudStorage(
|
public RackspaceCloudStorage(
|
||||||
TempPath tempPath,
|
TempPath tempPath,
|
||||||
TempStream tempStream,
|
TempStream tempStream,
|
||||||
|
@ -77,17 +77,7 @@ namespace ASC.Data.Storage.S3
|
|||||||
private bool _revalidateCloudFront;
|
private bool _revalidateCloudFront;
|
||||||
private string _distributionId = string.Empty;
|
private string _distributionId = string.Empty;
|
||||||
private string _subDir = string.Empty;
|
private string _subDir = string.Empty;
|
||||||
|
|
||||||
public S3Storage(
|
|
||||||
TempStream tempStream,
|
|
||||||
TenantManager tenantManager,
|
|
||||||
PathUtils pathUtils,
|
|
||||||
EmailValidationKeyProvider emailValidationKeyProvider,
|
|
||||||
IOptionsMonitor<ILog> options)
|
|
||||||
: base(tempStream, tenantManager, pathUtils, emailValidationKeyProvider, options)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public S3Storage(
|
public S3Storage(
|
||||||
TempStream tempStream,
|
TempStream tempStream,
|
||||||
TenantManager tenantManager,
|
TenantManager tenantManager,
|
||||||
|
@ -24,7 +24,7 @@ map $request_uri $header_x_frame_options {
|
|||||||
|
|
||||||
map $request_uri $cache_control {
|
map $request_uri $cache_control {
|
||||||
default "no-cache, no-store, must-revalidate";
|
default "no-cache, no-store, must-revalidate";
|
||||||
# ~*^/(api\/2\.0.*|storage|login\.ashx|products\/.+\/httphandlers\/filehandler\.ashx|ChunkedUploader.ashx|apisystem|sh) "no-cache, no-store, must-revalidate";
|
~*\/(api\/2\.0.*|storage|login\.ashx|products\/.+\/httphandlers\/filehandler\.ashx|ChunkedUploader.ashx|apisystem|sh|remoteEntry\.js|debuginfo\.md) "no-cache, no-store, must-revalidate";
|
||||||
~*\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|md|css|js)$ "public, no-transform";
|
~*\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|md|css|js)$ "public, no-transform";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,6 +125,8 @@ class MediaViewer extends React.Component {
|
|||||||
|
|
||||||
const { playlistPos, fileUrl } = this.state;
|
const { playlistPos, fileUrl } = this.state;
|
||||||
const src = playlist[playlistPos]?.src;
|
const src = playlist[playlistPos]?.src;
|
||||||
|
const title = playlist[playlistPos]?.title;
|
||||||
|
const ext = this.getFileExtension(title);
|
||||||
|
|
||||||
if (visible !== prevProps.visible) {
|
if (visible !== prevProps.visible) {
|
||||||
const newPlaylistPos =
|
const newPlaylistPos =
|
||||||
@ -138,7 +140,13 @@ class MediaViewer extends React.Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (src && src !== fileUrl && playlistPos === prevState.playlistPos) {
|
if (
|
||||||
|
src &&
|
||||||
|
src !== fileUrl &&
|
||||||
|
playlistPos === prevState.playlistPos &&
|
||||||
|
ext !== ".tif" &&
|
||||||
|
ext !== ".tiff"
|
||||||
|
) {
|
||||||
this.setState({ fileUrl: src });
|
this.setState({ fileUrl: src });
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,10 +155,6 @@ class MediaViewer extends React.Component {
|
|||||||
visible === prevProps.visible &&
|
visible === prevProps.visible &&
|
||||||
playlistPos !== prevState.playlistPos
|
playlistPos !== prevState.playlistPos
|
||||||
) {
|
) {
|
||||||
const currentFile = playlist[playlistPos];
|
|
||||||
const { src, title } = currentFile;
|
|
||||||
const ext = this.getFileExtension(title);
|
|
||||||
|
|
||||||
if (ext === ".tiff" || ext === ".tif") {
|
if (ext === ".tiff" || ext === ".tif") {
|
||||||
this.getTiffDataURL(src);
|
this.getTiffDataURL(src);
|
||||||
} else {
|
} else {
|
||||||
|
@ -5,6 +5,7 @@ import { tablet } from "@appserver/components/utils/device";
|
|||||||
|
|
||||||
const StyledArticleMainButton = styled.div`
|
const StyledArticleMainButton = styled.div`
|
||||||
margin: 12px 0 0;
|
margin: 12px 0 0;
|
||||||
|
max-width: 216px;
|
||||||
.main-button_drop-down {
|
.main-button_drop-down {
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
}
|
}
|
||||||
|
@ -383,6 +383,7 @@ class AvatarEditorBody extends React.Component {
|
|||||||
onImageChange={this.throttledSetCroppedImage}
|
onImageChange={this.throttledSetCroppedImage}
|
||||||
onPositionChange={this.onPositionChange}
|
onPositionChange={this.onPositionChange}
|
||||||
onImageReady={this.onImageReady}
|
onImageReady={this.onImageReady}
|
||||||
|
crossOrigin="anonymous"
|
||||||
/>
|
/>
|
||||||
<Box className="editor-buttons">
|
<Box className="editor-buttons">
|
||||||
<Box></Box>
|
<Box></Box>
|
||||||
|
@ -42,16 +42,16 @@ class DeleteDialogComponent extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
document.addEventListener("keydown", this.onKeydown, false);
|
document.addEventListener("keyup", this.onKeyUp, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
document.removeEventListener("keydown", this.onKeydown, false);
|
document.removeEventListener("keyup", this.onKeyUp, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
onKeydown = (e) => {
|
onKeyUp = (e) => {
|
||||||
if (e.keyCode === 27) this.onClose();
|
if (e.keyCode === 27) this.onClose();
|
||||||
if (e.keyCode === 13) this.onDelete();
|
if (e.keyCode === 13 || e.which === 13) this.onDelete();
|
||||||
};
|
};
|
||||||
|
|
||||||
onDelete = () => {
|
onDelete = () => {
|
||||||
|
@ -45,6 +45,7 @@ class DownloadDialogComponent extends React.Component {
|
|||||||
const { documents, spreadsheets, presentations, other } = this.state;
|
const { documents, spreadsheets, presentations, other } = this.state;
|
||||||
const files = [];
|
const files = [];
|
||||||
const folders = [];
|
const folders = [];
|
||||||
|
let singleFileUrl = null;
|
||||||
|
|
||||||
const collectItems = (itemList) => {
|
const collectItems = (itemList) => {
|
||||||
for (let item of itemList) {
|
for (let item of itemList) {
|
||||||
@ -54,8 +55,10 @@ class DownloadDialogComponent extends React.Component {
|
|||||||
item.format === this.props.t("OriginalFormat")
|
item.format === this.props.t("OriginalFormat")
|
||||||
? item.fileExst
|
? item.fileExst
|
||||||
: item.format;
|
: item.format;
|
||||||
const viewUrl = item.viewUrl;
|
if (!singleFileUrl) {
|
||||||
files.push({ key: item.id, value: format, viewUrl });
|
singleFileUrl = item.viewUrl;
|
||||||
|
}
|
||||||
|
files.push({ key: item.id, value: format });
|
||||||
} else {
|
} else {
|
||||||
folders.push(item.id);
|
folders.push(item.id);
|
||||||
}
|
}
|
||||||
@ -68,22 +71,21 @@ class DownloadDialogComponent extends React.Component {
|
|||||||
collectItems(presentations);
|
collectItems(presentations);
|
||||||
collectItems(other);
|
collectItems(other);
|
||||||
|
|
||||||
return [files, folders];
|
return [files, folders, singleFileUrl];
|
||||||
};
|
};
|
||||||
|
|
||||||
onDownload = () => {
|
onDownload = () => {
|
||||||
const { t, downloadFiles } = this.props;
|
const { t, downloadFiles } = this.props;
|
||||||
|
|
||||||
const [fileConvertIds, folderIds] = this.getDownloadItems();
|
const [fileConvertIds, folderIds, singleFileUrl] = this.getDownloadItems();
|
||||||
|
|
||||||
if (fileConvertIds.length === 1 && folderIds.length === 0) {
|
if (fileConvertIds.length === 1 && folderIds.length === 0) {
|
||||||
// Single file download as
|
// Single file download as
|
||||||
const file = fileConvertIds[0];
|
const file = fileConvertIds[0];
|
||||||
let viewUrl = file.viewUrl;
|
if (file.value && singleFileUrl) {
|
||||||
if (file.value) {
|
const viewUrl = `${singleFileUrl}&outputtype=${file.value}`;
|
||||||
viewUrl = `${viewUrl}&outputtype=${file.value}`;
|
window.open(viewUrl, "_self");
|
||||||
}
|
}
|
||||||
window.open(viewUrl, "_self");
|
|
||||||
this.onClose();
|
this.onClose();
|
||||||
} else if (fileConvertIds.length || folderIds.length) {
|
} else if (fileConvertIds.length || folderIds.length) {
|
||||||
this.onClose();
|
this.onClose();
|
||||||
|
@ -184,14 +184,21 @@ class FilesActionStore {
|
|||||||
icon: "file",
|
icon: "file",
|
||||||
label,
|
label,
|
||||||
};
|
};
|
||||||
const item = await this.uploadDataStore.loopFilesOperations(
|
|
||||||
data,
|
const item =
|
||||||
pbData
|
data?.finished && data?.url
|
||||||
);
|
? data
|
||||||
|
: await this.uploadDataStore.loopFilesOperations(data, pbData);
|
||||||
|
|
||||||
if (item.url) {
|
if (item.url) {
|
||||||
window.location.href = item.url;
|
window.location.href = item.url;
|
||||||
|
} else {
|
||||||
|
setSecondaryProgressBarData({
|
||||||
|
visible: true,
|
||||||
|
alert: true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => clearSecondaryProgressData(), TIMEOUT);
|
setTimeout(() => clearSecondaryProgressData(), TIMEOUT);
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -137,8 +137,6 @@ const MyProfileRoute = (props) => (
|
|||||||
</React.Suspense>
|
</React.Suspense>
|
||||||
);
|
);
|
||||||
|
|
||||||
let index = 0;
|
|
||||||
|
|
||||||
const Shell = ({ items = [], page = "home", ...rest }) => {
|
const Shell = ({ items = [], page = "home", ...rest }) => {
|
||||||
const {
|
const {
|
||||||
isLoaded,
|
isLoaded,
|
||||||
@ -351,7 +349,7 @@ const Shell = ({ items = [], page = "home", ...rest }) => {
|
|||||||
const remoteEntryURL = combineUrl(
|
const remoteEntryURL = combineUrl(
|
||||||
window.location.origin,
|
window.location.origin,
|
||||||
appURL,
|
appURL,
|
||||||
`remoteEntry.js?__index=${++index}`
|
`remoteEntry.js`
|
||||||
);
|
);
|
||||||
|
|
||||||
const system = {
|
const system = {
|
||||||
|
Loading…
Reference in New Issue
Block a user