Merge branch 'hotfix/v1.0.1' into feature/desktop-login

This commit is contained in:
Ilya Oleshko 2021-11-02 14:03:26 +03:00
commit aa79ef2c9d
106 changed files with 1429 additions and 775 deletions

View File

@ -201,7 +201,7 @@ WORKDIR ${BUILD_PATH}/products/ASC.Files/service/
COPY --chown=onlyoffice:onlyoffice docker-entrypoint.sh .
COPY --from=base --chown=onlyoffice:onlyoffice ${BUILD_PATH}/services/ASC.Files.Service/service/ .
CMD ["ASC.Files.Service.dll", "ASC.Files.Service", "core:products:folder=/var/www/products/", "core:products:subfolder=server"]
CMD ["ASC.Files.Service.dll", "ASC.Files.Service", "core:products:folder=/var/www/products/", "core:products:subfolder=server", "disable_elastic=true"]
## ASC.Mail ##
FROM builder AS mail

View File

@ -11,15 +11,16 @@ namespace ASC.Api.Core
{
public class BaseWorkerStartup
{
public IConfiguration Configuration { get; }
public IConfiguration Configuration { get; }
public BaseWorkerStartup(IConfiguration configuration)
{
Configuration = configuration;
}
public virtual void ConfigureServices(IServiceCollection services)
{
{
services.AddHttpContextAccessor();
services.AddCustomHealthCheck(Configuration);
}

View File

@ -36,6 +36,7 @@ using System.Threading.Tasks;
using ASC.Common;
using ASC.Common.Caching;
using ASC.Common.Logging;
using ASC.Common.Utils;
using ASC.Core;
using ASC.Core.Common.EF;
using ASC.Core.Common.EF.Context;
@ -102,14 +103,14 @@ namespace ASC.ElasticSearch
DbContextManager<WebstudioDbContext> dbContextManager,
TenantManager tenantManager,
BaseIndexerHelper baseIndexerHelper,
Settings settings,
ConfigurationExtension configurationExtension,
IServiceProvider serviceProvider)
{
Client = client;
Log = log.CurrentValue;
TenantManager = tenantManager;
BaseIndexerHelper = baseIndexerHelper;
Settings = settings;
Settings = Settings.GetInstance(configurationExtension);
ServiceProvider = serviceProvider;
LazyWebstudioDbContext = new Lazy<WebstudioDbContext>(() => dbContextManager.Value);
}

View File

@ -29,6 +29,7 @@ using System.Text;
using ASC.Common;
using ASC.Common.Logging;
using ASC.Common.Utils;
using ASC.Core;
using ASC.Core.Tenants;
using ASC.ElasticSearch.Service;
@ -53,11 +54,11 @@ namespace ASC.ElasticSearch
private CoreConfiguration CoreConfiguration { get; }
private Settings Settings { get; }
public Client(IOptionsMonitor<ILog> option, CoreConfiguration coreConfiguration, Settings settings)
public Client(IOptionsMonitor<ILog> option, CoreConfiguration coreConfiguration, ConfigurationExtension configurationExtension)
{
Log = option.Get("ASC.Indexer");
CoreConfiguration = coreConfiguration;
Settings = settings;
Settings = Settings.GetInstance(configurationExtension);
}
public ElasticClient Instance

View File

@ -32,6 +32,7 @@ using System.Threading.Tasks;
using ASC.Common;
using ASC.Common.Caching;
using ASC.Common.Logging;
using ASC.Common.Utils;
using ASC.ElasticSearch.Service;
using Microsoft.Extensions.DependencyInjection;
@ -57,13 +58,14 @@ namespace ASC.ElasticSearch
ICacheNotify<AscCacheItem> notify,
ICacheNotify<IndexAction> indexNotify,
IServiceProvider serviceProvider,
Settings settings)
ConfigurationExtension configurationExtension)
{
Log = options.Get("ASC.Indexer");
Notify = notify;
IndexNotify = indexNotify;
ServiceProvider = serviceProvider;
CancellationTokenSource = new CancellationTokenSource();
var settings = Settings.GetInstance(configurationExtension);
Period = TimeSpan.FromMinutes(settings.Period.Value);
}

View File

@ -31,24 +31,21 @@ namespace ASC.ElasticSearch.Service
{
[Singletone]
public class Settings
{
public Settings()
{
public static Settings GetInstance(ConfigurationExtension configuration)
{
}
public Settings(ConfigurationExtension configuration)
{
var result = new Settings();
var cfg = configuration.GetSetting<Settings>("elastic");
Scheme = cfg.Scheme ?? "http";
Host = cfg.Host ?? "localhost";
Port = cfg.Port ?? 9200;
Period = cfg.Period ?? 1;
MaxContentLength = cfg.MaxContentLength ?? 100 * 1024 * 1024L;
MaxFileSize = cfg.MaxFileSize ?? 10 * 1024 * 1024L;
Threads = cfg.Threads ?? 1;
HttpCompression = cfg.HttpCompression ?? true;
}
result.Scheme = cfg.Scheme ?? "http";
result.Host = cfg.Host ?? "localhost";
result.Port = cfg.Port ?? 9200;
result.Period = cfg.Period ?? 1;
result.MaxContentLength = cfg.MaxContentLength ?? 100 * 1024 * 1024L;
result.MaxFileSize = cfg.MaxFileSize ?? 10 * 1024 * 1024L;
result.Threads = cfg.Threads ?? 1;
result.HttpCompression = cfg.HttpCompression ?? true;
return result;
}
public string Host { get; set; }

View File

@ -26,6 +26,7 @@
"deploy:personal": "shx rm -rf build/deploy/products && shx rm -rf build/deploy/public && shx rm -rf build/deploy/studio && lerna run deploy --parallel --scope {@appserver/studio,@appserver/people,@appserver/files,@appserver/editor} && shx cp -r public build/deploy",
"serve": "lerna run serve --parallel --ignore @appserver/common --ignore @appserver/components --ignore @appserver/browserslist-config-asc --ignore @appserver/debug-info",
"start": "lerna run start --parallel --ignore @appserver/common --ignore @appserver/components --ignore @appserver/browserslist-config-asc --ignore @appserver/debug-info",
"start:personal": "lerna run start --parallel --scope {@appserver/studio,@appserver/people,@appserver/files,@appserver/editor}",
"start-prod": "lerna run start-prod --parallel --ignore @appserver/common --ignore @appserver/components --ignore @appserver/browserslist-config-asc --ignore @appserver/debug-info",
"storybook": "yarn workspace @appserver/components storybook",
"storybook-build": "yarn workspace @appserver/components run storybook-build",

View File

@ -36,7 +36,7 @@ RectangleLoader.propTypes = {
backgroundOpacity: PropTypes.number,
foregroundOpacity: PropTypes.number,
speed: PropTypes.number,
animate: PropTypes.bool,
animate: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),
};
RectangleLoader.defaultProps = {

View File

@ -12,6 +12,7 @@ const StyledContainer = styled.div`
margin-bottom: 18px;
@media ${mobile}, ${tablet} {
margin-top: 23px;
grid-template-columns: 100px 1fr 42px;
}
`;

View File

@ -13,6 +13,7 @@ import equal from "fast-deep-equal/react";
import Hammer from "hammerjs";
import IconButton from "@appserver/components/icon-button";
import commonIconsStyles from "@appserver/components/utils/common-icons-style";
import { isDesktop } from "react-device-detect";
const StyledVideoViewer = styled(VideoViewer)`
z-index: 301;
@ -104,7 +105,7 @@ class MediaViewer extends React.Component {
document.getElementsByClassName("videoViewerOverlay")[0]
);
}
if (_this.hammer) {
if (_this.hammer && !isDesktop) {
_this.hammer.on("swipeleft", _this.nextMedia);
_this.hammer.on("swiperight", _this.prevMedia);
}

View File

@ -335,6 +335,7 @@ class PageLayout extends React.Component {
widthProp={width}
unpinArticle={this.unpinArticle}
pinned={isArticlePinned}
visible={isArticleVisible}
>
{isSectionHeaderAvailable && (
<SubSectionHeader
@ -357,7 +358,10 @@ class PageLayout extends React.Component {
paddingRight: "20px",
}}
></div>
<SubSectionFilter className="section-header_filter">
<SubSectionFilter
className="section-header_filter"
viewAs={viewAs}
>
{sectionFilterContent
? sectionFilterContent.props.children
: null}

View File

@ -10,6 +10,7 @@ const StyledArticleMainButton = styled.div`
line-height: 36px;
}
@media ${tablet} {
margin: 16px 0 0;
.main-button_drop-down {
line-height: 40px;
}

View File

@ -8,7 +8,7 @@ import { inject, observer } from "mobx-react";
import Scrollbar from "@appserver/components/scrollbar";
import DragAndDrop from "@appserver/components/drag-and-drop";
import { tablet } from "@appserver/components/utils/device";
import { tablet, desktop } from "@appserver/components/utils/device";
const commonStyles = css`
flex-grow: 1;
@ -21,7 +21,12 @@ const commonStyles = css`
flex: 1 0 auto;
padding: 17px 7px 16px 24px;
outline: none;
${(props) => props.viewAs == "tile" && "padding-right:0;"}
${(props) =>
props.viewAs == "tile" &&
css`
padding-right: 0;
padding-left: 20px;
`}
@media ${tablet} {
padding: 16px 0 16px 24px;
@ -36,6 +41,10 @@ const commonStyles = css`
.people-row-container,
.files-row-container {
margin-top: -22px;
@media ${desktop} {
${(props) => props.viewAs === "row" && `margin-top: -9px;`}
}
}
}
`;
@ -46,7 +55,6 @@ const StyledSectionBody = styled.div`
${(props) =>
props.withScroll &&
`
margin-left: -24px;
`}
`;

View File

@ -1,10 +1,20 @@
import React from "react";
import styled from "styled-components";
import styled, { css } from "styled-components";
import equal from "fast-deep-equal/react";
import { tablet } from "@appserver/components/utils/device";
import { tablet, desktop } from "@appserver/components/utils/device";
const StyledSectionFilter = styled.div`
margin: 11px 24px 9px 0;
margin: 11px 24px 0 0;
@media ${desktop} {
${(props) =>
(props.viewAs === "table" || props.viewAs === "tile") &&
css`
margin-left: -4px;
margin-right: 20px;
margin-bottom: 9px;
`};
}
@media ${tablet} {
margin-left: -4px;

View File

@ -19,13 +19,19 @@ const StyledSectionHeader = styled.div`
min-height: 48px;
max-height: 49px; */
width: ${(props) => !props.isLoaded && "100%"};
margin-top: 64px;
/* @media ${tablet} {
margin-top: 55px;
} */
margin-top: 62px;
@media ${tablet} {
margin-top: 48px;
}
`}
@media ${desktop} {
${(props) =>
(props.viewAs === "table" || props.viewAs === "tile") &&
"margin-left: -4px"};
}
@media ${tablet} {
${(props) =>
props.viewAs !== "tablet" &&

View File

@ -31,9 +31,13 @@ const StyledSection = styled.section`
right: 15px;
bottom: 21px;
@media ${tablet} {
bottom: 83px;
}
${(props) =>
!props.visible &&
css`
@media ${tablet} {
bottom: 83px;
}
`}
}
.layout-progress-second-bar {
@ -41,9 +45,13 @@ const StyledSection = styled.section`
right: 15px;
bottom: 83px;
@media ${tablet} {
bottom: 145px;
}
${(props) =>
!props.visible &&
css`
@media ${tablet} {
bottom: 145px;
}
`}
}
.section-header_filter {
@ -57,13 +65,11 @@ const StyledSection = styled.section`
padding: 0 0 0 16px;
${tabletProps};
}
${
isMobile &&
css`
${tabletProps};
min-width: 100px;
`
}
${isMobile &&
css`
${tabletProps};
min-width: 100px;
`}
`;
class Section extends React.Component {

View File

@ -53,8 +53,8 @@ class FirebaseHelper {
this.config["projectId"] &&
this.config["storageBucket"] &&
this.config["messagingSenderId"] &&
this.config["appId"] &&
this.config["measurementId"]
this.config["appId"] /*&&
this.config["measurementId"]*/
);
}

View File

@ -13,6 +13,7 @@ const Aside = React.memo((props) => {
zIndex,
className,
contentPaddingBottom,
withoutBodyScroll,
} = props;
return (
@ -23,7 +24,11 @@ const Aside = React.memo((props) => {
contentPaddingBottom={contentPaddingBottom}
className={`${className} not-selectable aside`}
>
<Scrollbar>{children}</Scrollbar>
{withoutBodyScroll ? (
children
) : (
<Scrollbar stype="mediumBlack">{children}</Scrollbar>
)}
</StyledAside>
);
});
@ -40,10 +45,12 @@ Aside.propTypes = {
PropTypes.arrayOf(PropTypes.node),
PropTypes.node,
]),
withoutBodyScroll: PropTypes.bool,
};
Aside.defaultProps = {
scale: false,
zIndex: 400,
withoutBodyScroll: false,
};
export default Aside;

View File

@ -311,7 +311,13 @@ class AvatarEditorBody extends React.Component {
const desktopMode = isDesktop();
return (
<Text as="span">
<Link type="action" isHovered color="#316DAA" onClick={this.openDialog}>
<Link
type="action"
fontWeight={600}
isHovered
color="#316DAA"
onClick={this.openDialog}
>
{selectNewPhotoLabel}
</Link>{" "}
{desktopMode && orDropFileHereLabel}

View File

@ -27,5 +27,4 @@ Default.args = {
source: "",
userName: "",
editing: false,
editLabel: "Edit photo",
};

View File

@ -4,7 +4,6 @@ import styled from "styled-components";
import { GuestIcon, AdministratorIcon, OwnerIcon } from "./svg";
import {
EditLink,
EmptyIcon,
EditContainer,
AvatarWrapper,
@ -13,7 +12,7 @@ import {
StyledImage,
StyledAvatar,
} from "./styled-avatar";
import Link from "../link";
import IconButton from "../icon-button";
import commonIconsStyles from "../utils/common-icons-style";
const whiteColor = "#FFFFFF";
@ -57,15 +56,7 @@ Initials.propTypes = {
// eslint-disable-next-line react/display-name
const Avatar = (props) => {
//console.log("Avatar render");
const {
size,
source,
userName,
role,
editing,
editLabel,
editAction,
} = props;
const { size, source, userName, role, editing, editAction } = props;
const avatarContent = source ? (
<StyledImage src={source} />
@ -83,21 +74,13 @@ const Avatar = (props) => {
{avatarContent}
</AvatarWrapper>
{editing && size === "max" && (
<EditContainer gradient={!!source}>
<EditLink>
<Link
type="action"
title={editLabel}
isTextOverflow={true}
isHovered={true}
fontSize="14px"
fontWeight={600}
color={whiteColor}
onClick={editAction}
>
{editLabel}
</Link>
</EditLink>
<EditContainer>
<IconButton
color={whiteColor}
iconName="/static/images/pencil.react.svg"
onClick={editAction}
size={16}
/>
</EditContainer>
)}
<RoleWrapper size={size}>{roleIcon}</RoleWrapper>
@ -112,8 +95,6 @@ Avatar.propTypes = {
role: PropTypes.oneOf(["owner", "admin", "guest", "user"]),
/** The address of the image for an image avatar */
source: PropTypes.string,
/** Displays avatar edit layer */
editLabel: PropTypes.string,
userName: PropTypes.string,
editing: PropTypes.bool,
/** Function called when the avatar change button is pressed */
@ -130,7 +111,6 @@ Avatar.defaultProps = {
size: "medium",
role: "",
source: "",
editLabel: "Edit photo",
userName: "",
editing: false,
};

View File

@ -5,23 +5,6 @@ import NoUserSelect from "../utils/commonStyles";
import { CameraIcon } from "./svg";
import commonIconsStyles from "../utils/common-icons-style";
const EditLink = styled.div`
padding-left: ${(props) => props.theme.avatar.editLink.paddingLeft};
padding-right: ${(props) => props.theme.avatar.editLink.paddingRight};
a:hover {
border-bottom: ${(props) => props.theme.avatar.editLink.borderBottom};
}
span {
display: ${(props) => props.theme.avatar.editLink.display};
max-width: ${(props) => props.theme.avatar.editLink.maxWidth};
text-decoration: ${(props) => props.theme.avatar.editLink.textDecoration};
}
`;
EditLink.defaultProps = { theme: Base };
const EmptyIcon = styled(CameraIcon)`
${commonIconsStyles}
border-radius: ${(props) => props.theme.avatar.image.borderRadius};
@ -29,21 +12,17 @@ const EmptyIcon = styled(CameraIcon)`
EmptyIcon.defaultProps = { theme: Base };
const EditContainer = styled.div`
box-sizing: ${(props) => props.theme.avatar.editContainer.boxSizing};
position: absolute;
width: ${(props) => props.theme.avatar.editContainer.width};
height: ${(props) => props.theme.avatar.editContainer.height};
top: ${(props) => props.theme.avatar.editContainer.top};
left: ${(props) => props.theme.avatar.editContainer.left};
transform: ${(props) => props.theme.avatar.editContainer.transform};
padding: ${(props) => props.theme.avatar.editContainer.padding};
text-align: ${(props) => props.theme.avatar.editContainer.textAlign};
line-height: ${(props) => props.theme.avatar.editContainer.lineHeight};
display: flex;
right: ${(props) => props.theme.avatar.editContainer.right};
bottom: ${(props) => props.theme.avatar.editContainer.bottom};
background-color: ${(props) =>
props.theme.avatar.editContainer.backgroundColor};
border-radius: ${(props) => props.theme.avatar.editContainer.borderRadius};
background: ${(props) =>
props.gradient
? props.theme.avatar.editContainer.linearGradient
: props.theme.avatar.editContainer.transparent};
height: ${(props) => props.theme.avatar.editContainer.height};
width: ${(props) => props.theme.avatar.editContainer.width};
align-items: center;
justify-content: center;
`;
EditContainer.defaultProps = { theme: Base };
@ -129,7 +108,6 @@ const StyledAvatar = styled.div`
StyledAvatar.defaultProps = { theme: Base };
export {
EditLink,
EmptyIcon,
EditContainer,
AvatarWrapper,

View File

@ -7,7 +7,7 @@ import Text from "../text";
import Loaders from "@appserver/common/components/Loaders";
const onButtonClick = (url) => {
window.location = url;
window.open(url, "_blank");
};
const CampaignsBanner = (props) => {

View File

@ -89,6 +89,7 @@ class ComboBox extends React.Component {
toggleAction,
textOverflow,
showDisabledItems,
offsetDropDownY,
} = this.props;
const { isOpen, selectedOption } = this.state;
@ -138,7 +139,7 @@ class ComboBox extends React.Component {
className="dropdown-container not-selectable"
directionX={directionX}
directionY={directionY}
manualY="102%"
manualY={offsetDropDownY}
open={isOpen}
clickOutsideAction={this.handleClickOutside}
{...dropDownMaxHeightProp}
@ -210,6 +211,8 @@ ComboBox.propTypes = {
textOverflow: PropTypes.bool,
/** Disables clicking on the icon */
disableIconClick: PropTypes.bool,
/** Y offset */
offsetDropDownY: PropTypes.string,
};
ComboBox.defaultProps = {
@ -221,6 +224,7 @@ ComboBox.defaultProps = {
size: "base",
disableIconClick: true,
showDisabledItems: false,
offsetDropDownY: "102%",
};
export default ComboBox;

View File

@ -32,7 +32,7 @@ class ContextMenuSub extends Component {
});
}
onItemClick(e, item) {
onItemClick(item, e) {
if (item.disabled) {
e.preventDefault();
return;
@ -157,13 +157,16 @@ class ContextMenuSub extends Component {
const dataKeys = Object.fromEntries(
Object.entries(item).filter((el) => el[0].indexOf("data-") === 0)
);
const onClick = (e) => {
this.onItemClick(item, e);
};
let content = (
<a
href={item.url || "#"}
className={linkClassName}
target={item.target}
{...dataKeys}
onClick={(event) => this.onItemClick(event, item, index)}
onClick={onClick}
role="menuitem"
>
{icon}
@ -174,7 +177,7 @@ class ContextMenuSub extends Component {
if (item.template) {
const defaultContentOptions = {
onClick: (event) => this.onItemClick(event, item, index),
onClick,
className: linkClassName,
labelClassName: "p-menuitem-text",
iconClassName,

View File

@ -80,7 +80,7 @@ class DropDown extends React.PureComponent {
const left = rects.left < 0 && rects.width < container.width;
const right =
rects.width &&
rects.left < 250 &&
rects.left < (rects.width || 250) &&
rects.left > rects.width &&
rects.width < container.width;
const top = rects.bottom > container.height && rects.top > rects.height;

View File

@ -105,9 +105,11 @@ class GroupButton extends React.Component {
? { maxHeight: dropDownMaxHeight }
: {};
const offsetSelectDropDown = isSelect
? { manualX: window.innerWidth <= 1024 ? "16px" : "24px" }
? { manualX: window.innerWidth <= 1024 ? "44px" : "50px" }
: {};
const manualY = window.innerWidth <= 1024 ? "60px" : "53px";
return (
<StyledGroupButton
ref={this.ref}
@ -140,7 +142,7 @@ class GroupButton extends React.Component {
<DropDown
{...dropDownMaxHeightProp}
{...offsetSelectDropDown}
manualY="72px"
manualY={manualY}
open={this.state.isOpen}
clickOutsideAction={this.clickOutsideAction}
showDisabledItems={true}

View File

@ -2,7 +2,7 @@
import React from "react";
import Scrollbar from "../scrollbar";
class CustomScrollbars extends React.Component {
export class CustomScrollbars extends React.Component {
refSetter = (scrollbarsRef, forwardedRef) => {
if (scrollbarsRef) {
forwardedRef(scrollbarsRef.view);

View File

@ -16,6 +16,11 @@ const StyledScrollbar = styled(Scrollbars)`
? props.color
: props.theme.scrollbar.backgroundColorHorizontal};
}
.nav-thumb-vertical:hover {
background-color: ${(props) =>
props.theme.scrollbar.hoverBackgroundColorVertical};
}
`;
StyledScrollbar.defaultProps = {

View File

@ -48,11 +48,11 @@ class SearchInput extends React.Component {
render() {
//console.log("Search input render");
let clearButtonSize = 15;
let clearButtonSize = 16;
switch (this.props.size) {
case "base":
clearButtonSize =
!!this.state.inputValue || this.props.showClearButton ? 12 : 15;
!!this.state.inputValue || this.props.showClearButton ? 12 : 16;
break;
case "middle":
clearButtonSize =
@ -60,7 +60,7 @@ class SearchInput extends React.Component {
break;
case "big":
clearButtonSize =
!!this.state.inputValue || this.props.showClearButton ? 19 : 21;
!!this.state.inputValue || this.props.showClearButton ? 18 : 22;
break;
case "huge":
clearButtonSize =

View File

@ -33,11 +33,10 @@ const StyledTableContainer = styled.div`
border-right: 2px solid #d0d5da;
}
.table-container_group-menu {
padding-left: 24px;
margin-left: -24px;
padding-right: 24px;
margin-right: -24px;
.table-container_group-menu,
.table-container_header {
padding: 0 24px;
margin: 0 -24px;
border-bottom: 1px solid;
border-image-slice: 1;
@ -138,7 +137,10 @@ const StyledTableHeaderCell = styled.div`
cursor: ${(props) => (props.showIcon ? "pointer" : "default")};
.header-container-text-icon {
padding: 16px 0 0 4px;
height: 8px;
width: 8px;
padding: 16px 0 16px 4px;
display: ${(props) =>
props.isActive && props.showIcon ? "block" : "none"};
@ -146,7 +148,7 @@ const StyledTableHeaderCell = styled.div`
props.sorted &&
css`
transform: scale(1, -1);
padding: 14px 0 0 4px;
padding: 14px 0 14px 4px;
`}
}

View File

@ -51,6 +51,7 @@ const TableGroupMenu = (props) => {
className="table-container_group-menu-combobox not-selectable"
options={[]}
selectedOption={{}}
offsetDropDownY="44px"
/>
<div className="table-container_group-menu-separator" />
{headerMenu.map((item, index) => {

View File

@ -136,7 +136,12 @@ class TableHeader extends React.Component {
const clearSize = gridTemplateColumns.map((c) => this.getSubstring(c));
const maxSize = Math.max.apply(Math, clearSize);
const defaultColSize = containerWidth / filterColumns.length;
const defaultSize = columns[activeColumnIndex - 1].defaultSize;
const defaultColSize = defaultSize
? defaultSize
: containerWidth / filterColumns.length;
const indexOfMaxSize = clearSize.findIndex((s) => s === maxSize);
const newSize = maxSize - defaultColSize;
@ -234,8 +239,8 @@ class TableHeader extends React.Component {
const storageSize =
!resetColumnsSize && localStorage.getItem(columnStorageName);
const defaultSize = this.props.columns.find((col) => col.defaultSize)
?.defaultSize;
// const defaultSize = this.props.columns.find((col) => col.defaultSize)
// ?.defaultSize;
//TODO: Fixed columns size if something went wrong
if (storageSize) {
@ -243,11 +248,16 @@ class TableHeader extends React.Component {
const isInvalid = splitStorage.some((s) => s === "NaNpx");
if (
(defaultSize &&
splitStorage[splitStorage.length - 2] !== `${defaultSize}px`) ||
isInvalid
) {
// if (
// (defaultSize &&
// splitStorage[splitStorage.length - 2] !== `${defaultSize}px`) ||
// isInvalid
// ) {
// localStorage.removeItem(columnStorageName);
// return this.onResize();
// }
if (isInvalid) {
localStorage.removeItem(columnStorageName);
return this.onResize();
}

View File

@ -478,8 +478,9 @@ const Base = {
},
scrollbar: {
backgroundColorVertical: "#e5e5e5",
backgroundColorVertical: "rgba(208, 213, 218, 1)",
backgroundColorHorizontal: "rgba(0, 0, 0, 0.1)",
hoverBackgroundColorVertical: "rgba(163, 169, 174, 1)",
},
modalDialog: {
@ -917,28 +918,12 @@ const Base = {
},
editContainer: {
boxSizing: "border-box",
width: "100%",
height: "100%",
top: "50%",
left: "50%",
transform: "translate(-50%, -50%)",
padding: "75% 16px 5px",
textAlign: "center",
lineHeight: "19px",
right: "0px",
bottom: "0px",
backgroundColor: "#265a8f",
borderRadius: "50%",
linearGradient:
"linear-gradient(180deg, rgba(6, 22, 38, 0) 24.48%, rgba(6, 22, 38, 0.75) 100%)",
transparent: "transparent",
},
editLink: {
paddingLeft: "10px",
paddingRight: "10px",
borderBottom: "none",
display: "inline-block",
maxWidth: "100%",
textDecoration: "underline dashed",
height: "32px",
width: "32px",
},
image: {
@ -1403,7 +1388,7 @@ const Base = {
maxWidth: "175px",
lineHeightWithoutBorder: "16px",
lineHeightTextDecoration: "underline dashed transparent",
lineHeightTextDecoration: "underline dashed",
},
childrenButton: {

View File

@ -444,8 +444,9 @@ const Dark = {
},
scrollbar: {
backgroundColorVertical: "rgba(255, 255, 255, 0.5)",
backgroundColorVertical: "rgba(208, 213, 218, 1)",
backgroundColorHorizontal: "rgba(255, 255, 255, 0.5)",
hoverBackgroundColorVertical: "rgba(163, 169, 174, 1)",
},
modalDialog: {
@ -880,29 +881,14 @@ const Dark = {
},
},
editContainer: {
boxSizing: "border-box",
width: "100%",
height: "100%",
top: "50%",
left: "50%",
transform: "translate(-50%, -50%)",
padding: "75% 16px 5px",
textAlign: "center",
lineHeight: "19px",
right: "0px",
bottom: "0px",
backgroundColor: "#265a8f",
borderRadius: "50%",
linearGradient:
"linear-gradient(180deg, rgba(6, 22, 38, 0) 24.48%, rgba(6, 22, 38, 0.75) 100%)",
transparent: "transparent",
height: "32px",
width: "32px",
},
editLink: {
paddingLeft: "10px",
paddingRight: "10px",
borderBottom: "none",
display: "inline-block",
maxWidth: "100%",
textDecoration: "underline dashed",
},
image: {
width: "100%",
height: "100%",
@ -1194,7 +1180,7 @@ const Dark = {
maxWidth: "175px",
lineHeightWithoutBorder: "16px",
lineHeightTextDecoration: "underline dashed transparent",
lineHeightTextDecoration: "underline dashed",
},
childrenButton: {

View File

@ -40,9 +40,7 @@ const lastItemStyle = css`
const IconWrapper = styled.div`
position: relative;
width: 32px;
height: 100%;
padding: 8px;
padding: 7px;
box-sizing: border-box;
border: 1px solid;
@ -80,8 +78,8 @@ const IconWrapper = styled.div`
`}
}
svg {
width: 15px;
height: 15px;
width: 16px;
height: 16px;
${(props) =>
!props.isDisabled

View File

@ -109,18 +109,19 @@ export default function withContent(WrappedContent) {
return this.completeAction(e);
};
onClickUpdateItem = (e) => {
onClickUpdateItem = (e, open = true) => {
const { fileActionType } = this.props;
fileActionType === FileAction.Create
? this.createItem(e)
? this.createItem(e, open)
: this.updateItem(e);
};
createItem = (e) => {
createItem = (e, open) => {
const {
createFile,
item,
setIsLoading,
isLoading,
openDocEditor,
isPrivacy,
isDesktop,
@ -131,6 +132,8 @@ export default function withContent(WrappedContent) {
} = this.props;
const { itemTitle } = this.state;
if (isLoading) return;
setIsLoading(true);
const itemId = e.currentTarget.dataset.itemid;
@ -141,7 +144,7 @@ export default function withContent(WrappedContent) {
}
let tab =
!isDesktop && item.fileExst
!isDesktop && item.fileExst && open
? window.open(
combineUrl(
AppServerConfig.proxyURL,
@ -170,10 +173,12 @@ export default function withContent(WrappedContent) {
encryptedFile,
true,
false
).then(() => openDocEditor(file.id, file.providerKey, tab));
).then(
() => open && openDocEditor(file.id, file.providerKey, tab)
);
});
}
return openDocEditor(file.id, file.providerKey, tab);
return open && openDocEditor(file.id, file.providerKey, tab);
})
.then(() => this.completeAction(itemId))
.catch((e) => toastr.error(e))
@ -315,6 +320,7 @@ export default function withContent(WrappedContent) {
const { editCompleteAction } = filesActionsStore;
const {
setIsLoading,
isLoading,
openDocEditor,
updateFile,
renameFolder,
@ -338,6 +344,7 @@ export default function withContent(WrappedContent) {
return {
setIsLoading,
isLoading,
isTrashFolder: isRecycleBinFolder,
openDocEditor,
updateFile,

View File

@ -248,9 +248,10 @@ export default function withContextOptions(WrappedComponent) {
};
onClickShare = () => {
const { onSelectItem, setSharingPanelVisible, id, isFolder } = this.props;
onSelectItem({ id, isFolder });
setSharingPanelVisible(true);
const { setSharingPanelVisible } = this.props;
setTimeout(() => {
setSharingPanelVisible(true);
}, 10); //TODO: remove delay after fix context menu callback
};
onClickMarkRead = () => {
@ -336,7 +337,7 @@ export default function withContextOptions(WrappedComponent) {
return {
key: option,
label: t("SharingSettings"),
icon: "/static/images/catalog.shared.react.svg",
icon: "/static/images/catalog.share.react.svg",
onClick: this.onClickShare,
disabled: !isShareable,
};

View File

@ -96,7 +96,7 @@ export default function withFileActions(WrappedFileItem) {
}
e.preventDefault();
setTooltipPosition(e.pageX, e.pageY);
setStartDrag(true);
!isFileName && setStartDrag(true);
!isActive && setBufferSelection(null);
};
@ -210,7 +210,7 @@ export default function withFileActions(WrappedFileItem) {
return;
}
return window.open(viewUrl, "_blank");
return window.open(viewUrl, "_self");
}
};

View File

@ -81,7 +81,7 @@ class TreeFolders extends React.Component {
iconUrl = "/static/images/catalog.user.react.svg";
break;
case FolderType.SHARE:
iconUrl = "/static/images/catalog.shared.react.svg";
iconUrl = "/static/images/catalog.share.react.svg";
break;
case FolderType.COMMON:
iconUrl = "/static/images/catalog.portfolio.react.svg";

View File

@ -46,6 +46,8 @@ const EditingWrapper = styled.div`
border-bottom: 1px solid #eceef1;
padding-bottom: 4px;
margin-top: 4px;
margin-left: -4px;
`}
${(props) =>
@ -118,7 +120,7 @@ const EditingWrapperComponent = (props) => {
renameTitle,
onClickUpdateItem,
cancelUpdateItem,
isLoading,
//isLoading,
viewAs,
elementIcon,
} = props;
@ -127,10 +129,14 @@ const EditingWrapperComponent = (props) => {
const [OkIconIsHovered, setIsHoveredOk] = useState(false);
const [CancelIconIsHovered, setIsHoveredCancel] = useState(false);
const [isLoading, setIsLoading] = useState(false);
const onKeyUpUpdateItem = (e) => {
if (isLoading) return;
var code = e.keyCode || e.which;
if (code === 13) {
if (!isLoading) setIsLoading(true);
return onClickUpdateItem(e);
}
//if (code === 27) return cancelUpdateItem(e);
@ -149,6 +155,11 @@ const EditingWrapperComponent = (props) => {
};
const onFocus = (e) => e.target.select();
const onBlur = (e) => {
if (e.relatedTarget && e.relatedTarget.classList.contains("edit-button"))
return false;
onClickUpdateItem(e, false);
};
return (
<EditingWrapper viewAs={viewAs}>
@ -161,9 +172,10 @@ const EditingWrapperComponent = (props) => {
tabIndex={1}
isAutoFocussed={true}
onChange={renameTitle}
onKeyUp={onKeyUpUpdateItem}
onKeyPress={onKeyUpUpdateItem}
onKeyDown={onEscapeKeyPress}
onFocus={onFocus}
onBlur={onBlur}
isDisabled={isLoading}
data-itemid={itemId}
withBorder={!isTable}

View File

@ -10,6 +10,7 @@ const SharedButton = ({
shared,
onSelectItem,
setSharingPanelVisible,
isSmallIcon = false,
}) => {
const color = shared ? "#657077" : "#a3a9ae";
@ -18,6 +19,10 @@ const SharedButton = ({
setSharingPanelVisible(true);
};
const icon = isSmallIcon
? "/static/images/catalog.share.small.react.svg"
: "/static/images/catalog.share.react.svg";
return (
<Text
className="share-button"
@ -33,8 +38,8 @@ const SharedButton = ({
className="share-button-icon"
color={color}
hoverColor="#657077"
size={18}
iconName="/static/images/catalog.shared.react.svg"
size={isSmallIcon ? 12 : 16}
iconName={icon}
/>
{t("Share")}
</Text>

View File

@ -52,7 +52,7 @@ class DownloadDialogComponent extends React.Component {
if (item.checked) {
if (item.fileExst) {
const format =
item.format === this.props.t("OriginalFormat")
!item.format || item.format === this.props.t("OriginalFormat")
? item.fileExst
: item.format;
if (!singleFileUrl) {

View File

@ -0,0 +1,131 @@
import React, { useEffect, useState, useCallback } from "react";
import Text from "@appserver/components/text";
import Link from "@appserver/components/link";
import TextInput from "@appserver/components/text-input";
import Textarea from "@appserver/components/textarea";
import copy from "copy-to-clipboard";
import toastr from "@appserver/components/toast/toastr";
import IconButton from "@appserver/components/icon-button";
import i18n from "./i18n";
import { withTranslation, I18nextProvider } from "react-i18next";
const EmbeddingBody = ({ embeddingLink, t }) => {
const [size, setSize] = useState("auto");
const [widthValue, setWidthValue] = useState("100%");
const [heightValue, setHeightValue] = useState("100%");
const getIframe = useCallback(
() =>
`<iframe src="${embeddingLink}" width="${widthValue}" height="${heightValue}" frameborder="0" scrolling="no" allowtransparency> </iframe>`,
[embeddingLink, widthValue, heightValue]
);
const [link, setLink] = useState(getIframe());
useEffect(() => {
const link = getIframe();
setLink(link);
}, [embeddingLink, widthValue, heightValue]);
const onSelectSizeMiddle = () => {
if (size === "600x800") return;
setSize("600x800");
setWidthValue("600");
setHeightValue("800");
};
const onSelectSizeSmall = () => {
if (size === "400x600") return;
setSize("400x600");
setWidthValue("400");
setHeightValue("600");
};
const onSelectSizeAuto = () => {
if (size === "auto") return;
setSize("auto");
setWidthValue("100%");
setHeightValue("100%");
};
const onChangeWidth = (e) => {
setWidthValue(e.target.value);
};
const onChangeHeight = (e) => {
setHeightValue(e.target.value);
};
const onCopyLink = () => {
copy(link);
toastr.success(t("CodeCopySuccess"));
};
return (
<div className="embedding-panel_body">
<Text className="embedding-panel_text">{t("Common:Size")}:</Text>
<div className="embedding-panel_links-container">
<Link
isHovered
type="action"
className="embedding-panel_link"
onClick={onSelectSizeMiddle}
>
600 x 800 px
</Link>
<Link
isHovered
type="action"
className="embedding-panel_link"
onClick={onSelectSizeSmall}
>
400 x 600 px
</Link>
<Link
isHovered
type="action"
className="embedding-panel_link"
onClick={onSelectSizeAuto}
>
{t("Auto")}
</Link>
</div>
<div className="embedding-panel_inputs-container">
<div>
<Text className="embedding-panel_text">{t("Width")}:</Text>
<TextInput
className="embedding-panel_input"
value={widthValue}
onChange={onChangeWidth}
/>
</div>
<div>
<Text className="embedding-panel_text">{t("Height")}:</Text>
<TextInput
className="embedding-panel_input"
value={heightValue}
onChange={onChangeHeight}
/>
</div>
</div>
<div className="embedding-panel_code-container">
<Text className="embedding-panel_text">{t("EmbedCode")}:</Text>
<IconButton
className="embedding-panel_copy-icon"
size="16"
iconName="/static/images/copy.react.svg"
color="#333"
onClick={onCopyLink}
/>
<Textarea color="#AEAEAE" isReadOnly value={link} />
</div>
</div>
);
};
const EmbeddingBodyWrapper = withTranslation("EmbeddingPanel")(EmbeddingBody);
export default (props) => (
<I18nextProvider i18n={i18n}>
<EmbeddingBodyWrapper {...props} />
</I18nextProvider>
);

View File

@ -4,33 +4,18 @@ import Backdrop from "@appserver/components/backdrop";
import Heading from "@appserver/components/heading";
import Aside from "@appserver/components/aside";
import IconButton from "@appserver/components/icon-button";
import Text from "@appserver/components/text";
import Link from "@appserver/components/link";
import TextInput from "@appserver/components/text-input";
import Textarea from "@appserver/components/textarea";
import toastr from "@appserver/components/toast/toastr";
import { withTranslation, I18nextProvider } from "react-i18next";
import i18n from "./i18n";
import {
StyledEmbeddingPanel,
StyledContent,
StyledHeaderContent,
StyledBody,
} from "../StyledPanels";
import copy from "copy-to-clipboard";
import i18n from "./i18n";
import EmbeddingBody from "./EmbeddingBody";
class EmbeddingPanelComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
size: "auto",
widthValue: "100%",
heightValue: "100%",
link: `<iframe src="${props.embeddingLink}" width="100%" height="100%" frameborder="0" scrolling="no" allowtransparency> </iframe>`,
};
}
onArrowClick = () => this.props.onClose();
onClosePanels = () => {
@ -38,81 +23,8 @@ class EmbeddingPanelComponent extends React.Component {
this.props.onSharingPanelClose();
};
onSelectSizeMiddle = () => {
this.state.size !== "600x800" &&
this.setState({ size: "600x800", widthValue: "600", heightValue: "800" });
};
onSelectSizeSmall = () => {
this.state.size !== "400x600" &&
this.setState({ size: "400x600", widthValue: "400", heightValue: "600" });
};
onSelectSizeAuto = () => {
this.state.size !== "auto" &&
this.setState({ size: "auto", widthValue: "100%", heightValue: "100%" });
};
onChangeWidth = (e) => {
this.setState({ widthValue: e.target.value });
};
onChangeHeight = (e) => {
this.setState({ heightValue: e.target.value });
};
onCopyLink = () => {
copy(this.state.link);
toastr.success(this.props.t("CodeCopySuccess"));
};
// shouldComponentUpdate(nextProps, nextState) {
// const { size, widthValue, heightValue, link } = this.state;
// const { visible, embeddingLink } = this.props;
// if (size !== nextState.size) {
// return true;
// }
// if (widthValue !== nextState.widthValue) {
// return true;
// }
// if (heightValue !== nextState.heightValue) {
// return true;
// }
// if (visible !== nextProps.visible) {
// return true;
// }
// if (embeddingLink !== nextProps.embeddingLink) {
// return true;
// }
// if (link !== nextState.link) {
// return true;
// }
// return false;
// }
componentDidUpdate(prevProps, prevState) {
const { embeddingLink } = this.props;
const { widthValue, heightValue } = this.state;
if (
prevProps.embeddingLink !== embeddingLink ||
widthValue !== prevState.widthValue ||
heightValue !== prevState.heightValue
) {
const link = `<iframe src="${embeddingLink}" width="${widthValue}" height="${heightValue}" frameborder="0" scrolling="no" allowtransparency> </iframe>`;
this.setState({ link });
}
}
render() {
const { visible, t } = this.props;
const { size, widthValue, heightValue, link } = this.state;
const zIndex = 310;
//console.log("EmbeddingPanel render");
@ -141,69 +53,8 @@ class EmbeddingPanelComponent extends React.Component {
{t("EmbeddingDocument")}
</Heading>
</StyledHeaderContent>
<StyledBody size={size}>
<div className="embedding-panel_body">
<Text className="embedding-panel_text">
{t("Common:Size")}:
</Text>
<div className="embedding-panel_links-container">
<Link
isHovered
type="action"
className="embedding-panel_link"
onClick={this.onSelectSizeMiddle}
>
600 x 800 px
</Link>
<Link
isHovered
type="action"
className="embedding-panel_link"
onClick={this.onSelectSizeSmall}
>
400 x 600 px
</Link>
<Link
isHovered
type="action"
className="embedding-panel_link"
onClick={this.onSelectSizeAuto}
>
{t("Auto")}
</Link>
</div>
<div className="embedding-panel_inputs-container">
<div>
<Text className="embedding-panel_text">{t("Width")}:</Text>
<TextInput
className="embedding-panel_input"
value={widthValue}
onChange={this.onChangeWidth}
/>
</div>
<div>
<Text className="embedding-panel_text">{t("Height")}:</Text>
<TextInput
className="embedding-panel_input"
value={heightValue}
onChange={this.onChangeHeight}
/>
</div>
</div>
<div className="embedding-panel_code-container">
<Text className="embedding-panel_text">
{t("EmbedCode")}:
</Text>
<IconButton
className="embedding-panel_copy-icon"
size="16"
iconName="/static/images/copy.react.svg"
color="#333"
onClick={this.onCopyLink}
/>
<Textarea color="#AEAEAE" isReadOnly value={link} />
</div>
</div>
<StyledBody>
<EmbeddingBody />
</StyledBody>
</StyledContent>
</Aside>
@ -218,12 +69,12 @@ EmbeddingPanelComponent.propTypes = {
onClose: PropTypes.func,
};
const EmbeddingPanel = withTranslation("EmbeddingPanel")(
const EmbeddingBodyWrapper = withTranslation("EmbeddingPanel")(
EmbeddingPanelComponent
);
export default (props) => (
<I18nextProvider i18n={i18n}>
<EmbeddingPanel {...props} />
<EmbeddingBodyWrapper {...props} />
</I18nextProvider>
);

View File

@ -19,6 +19,7 @@ import {
StyledFooter,
StyledHeaderContent,
StyledSharingBody,
StyledModalRowContainer,
} from "../StyledPanels";
import { AddUsersPanel, AddGroupsPanel, EmbeddingPanel } from "../index";
import SharingRow from "./SharingRow";
@ -26,9 +27,12 @@ import { inject, observer } from "mobx-react";
import config from "../../../../package.json";
import i18n from "./i18n";
import { I18nextProvider } from "react-i18next";
import { isMobile } from "react-device-detect";
import { isMobile, isMobileOnly } from "react-device-detect";
import Loaders from "@appserver/common/components/Loaders";
import withLoader from "../../../HOCs/withLoader";
import ModalDialogContainer from "../../dialogs/ModalDialogContainer";
import ModalDialog from "@appserver/components/modal-dialog";
import EmbeddingBody from "../EmbeddingPanel/EmbeddingBody";
const SharingBodyStyle = { height: `calc(100vh - 156px)` };
@ -50,6 +54,7 @@ class SharingPanelComponent extends React.Component {
showPanel: false,
accessOptions: [],
filesOwnerId: null,
showEmbeddingContent: false,
};
this.ref = React.createRef();
@ -74,6 +79,7 @@ class SharingPanelComponent extends React.Component {
newDataItems[0].access = rights;
this.setState({
shareDataItems: newDataItems,
showEmbeddingContent: false,
});
};
@ -320,6 +326,12 @@ class SharingPanelComponent extends React.Component {
shareLink: link,
});
onShowEmbeddingContainer = (link) =>
this.setState({
showEmbeddingContent: !this.state.showEmbeddingContent,
shareLink: link,
});
onShowGroupsPanel = () =>
this.setState({
showAddGroupsPanel: !this.state.showAddGroupsPanel,
@ -421,6 +433,7 @@ class SharingPanelComponent extends React.Component {
//showPanel,
accessOptions,
externalAccessOptions,
showEmbeddingContent,
} = this.state;
const visible = sharingPanelVisible;
@ -433,7 +446,66 @@ class SharingPanelComponent extends React.Component {
const internalLink =
selection.length === 1 && !isEncrypted && this.getInternalLink();
return (
return isPersonal && !isMobileOnly ? (
<ModalDialog
isLoading={!tReady}
visible={visible}
displayType="modal"
onClose={this.onClose}
>
<ModalDialog.Header>{t("SharingSettingsTitle")}</ModalDialog.Header>
<ModalDialog.Body>
<StyledModalRowContainer>
{!isLoading ? (
shareDataItems.map((item, index) => (
<SharingRow
t={t}
isPersonal={isPersonal}
index={index}
key={`${item.sharedTo.id}_${index}`}
selection={selection}
item={item}
isMyId={isMyId}
accessOptions={accessOptions}
externalAccessOptions={externalAccessOptions}
canShareOwnerChange={canShareOwnerChange}
onChangeItemAccess={this.onChangeItemAccess}
internalLink={internalLink}
onRemoveUserClick={this.onRemoveUserItemClick}
onShowEmbeddingPanel={this.onShowEmbeddingContainer}
onToggleLink={this.onToggleLink}
onShowChangeOwnerPanel={this.onShowChangeOwnerPanel}
isLoading={isLoading}
documentTitle={documentTitle}
/>
))
) : (
<Loaders.Rectangle
height="47px"
animate={0}
foregroundColor="#f8f9f9"
backgroundColor="#f8f9f9"
backgroundOpacity={1}
foregroundOpacity={1}
/>
)}
{showEmbeddingContent && (
<EmbeddingBody embeddingLink={shareLink} />
)}
</StyledModalRowContainer>
</ModalDialog.Body>
<ModalDialog.Footer>
<Button
className="sharing_panel-button"
label={t("Common:SaveButton")}
size="big"
primary
onClick={this.onSaveClick}
isDisabled={isLoading}
/>
</ModalDialog.Footer>
</ModalDialog>
) : (
<StyledAsidePanel visible={visible}>
<Backdrop
onClick={this.onClose}
@ -558,7 +630,8 @@ class SharingPanelComponent extends React.Component {
<Button
className="sharing_panel-button"
label={t("Common:SaveButton")}
size="big"
size={isMobile ? "big" : "medium"}
minwidth="100px"
primary
onClick={this.onSaveClick}
isDisabled={isLoading}

View File

@ -41,7 +41,11 @@ class LinkRow extends React.Component {
const isDisabled = isLoading || disableLink;
return (
<StyledLinkRow withToggle={withToggle} isDisabled={isDisabled}>
<StyledLinkRow
withToggle={withToggle}
isDisabled={isDisabled}
className="link-row__container"
>
<Row
className="link-row"
key={`${linkText.replace(" ", "-")}-key_${index}`}
@ -84,6 +88,7 @@ class LinkRow extends React.Component {
isChecked={isChecked}
onChange={this.onToggleButtonChange}
isDisabled={isLoading}
className="sharing-row__toggle-button"
/>
</div>
)}

View File

@ -1,6 +1,6 @@
import styled, { css } from "styled-components";
import Scrollbar from "@appserver/components/scrollbar";
import { tablet } from "@appserver/components/utils/device";
import { desktop, tablet } from "@appserver/components/utils/device";
const PanelStyles = css`
.panel_combo-box {
@ -92,11 +92,11 @@ const StyledVersionHistoryPanel = styled.div`
${PanelStyles}
.version-history-modal-dialog {
transform: translateX(${(props) => (props.visible ? "0" : "720px")});
width: 720px;
width: 500px;
}
.version-history-aside-panel {
transform: translateX(${(props) => (props.visible ? "0" : "720px")});
width: 720px;
width: 500px;
}
.version-history-panel-header {
height: 53px;
@ -251,7 +251,16 @@ const StyledHeaderContent = styled.div`
.sharing_panel-header {
font-weight: 700;
margin: 14px 0;
margin-left: 16px;
}
padding-right: 0;
@media ${desktop} {
.files-operations-header,
.sharing_panel-header {
margin: 12px 0;
font-size: 18px;
}
}
`;
@ -362,6 +371,21 @@ const StyledBody = styled.div`
const StyledSharingBody = styled(Scrollbar)`
position: relative;
padding: 16px 0;
width: calc(100% + 16px) !important;
.link-row__container {
height: 47px;
}
.link-row__container,
.sharing-row {
.styled-element {
margin-right: 0;
margin-left: 0;
}
}
.row_content {
overflow: visible;
height: auto;
@ -369,8 +393,11 @@ const StyledSharingBody = styled(Scrollbar)`
.sharing-row {
margin: 0 16px;
width: calc(100% - 16px);
//width: calc(100% - 16px);
box-sizing: border-box;
padding-right: 15px;
border-bottom: none;
}
.nav-thumb-vertical {
@ -455,6 +482,30 @@ const StyledSharingBody = styled(Scrollbar)`
right: 0;
margin: auto;
}
@media ${desktop} {
.link-row__container {
height: 41px;
.link-row {
min-height: 41px;
}
}
.sharing-row {
min-height: 41px;
//padding-right: 15px;
.sharing_panel-remove-icon {
font-size: 12px;
}
}
.sharing_panel-text,
.sharing_panel-link span {
font-size: 13px;
}
}
`;
const StyledFooter = styled.div`
@ -473,6 +524,7 @@ const StyledFooter = styled.div`
.sharing_panel-checkbox {
span {
font-weight: 600;
font-size: 14px;
}
.checkbox {
@ -486,6 +538,21 @@ const StyledFooter = styled.div`
.new_files_panel-button {
margin-right: 8px;
}
@media ${desktop} {
padding: 10px 0;
min-height: 57px;
.sharing_panel-checkbox {
span {
font-size: 13px;
}
}
.sharing_panel-button {
margin-top: 2px;
}
}
`;
const StyledLinkRow = styled.div`
@ -503,6 +570,11 @@ const StyledLinkRow = styled.div`
.link-row {
${(props) => !props.withToggle && "border-bottom:none;"}
}
.sharing-row__toggle-button {
margin-top: 1px;
}
.row_content {
display: grid;
grid-template-columns: 1fr 28px;
@ -512,6 +584,12 @@ const StyledLinkRow = styled.div`
.combo-button {
background: transparent;
}
@media ${desktop} {
.sharing-row__toggle-button {
margin-top: 0;
}
}
`;
const StyledSelectFolderPanel = styled.div`
@ -775,6 +853,125 @@ const StyledFilesList = styled.div`
grid-template-columns: 22px 32px 1fr;
}
`;
const StyledModalRowContainer = styled.div`
display: flex;
flex-direction: column;
min-height: 47px;
.link-row__container {
width: 100%;
.link-row {
border-bottom: none;
}
.link-row::after {
height: 0;
}
}
.panel_combo-box {
margin-left: 0px;
.combo-button {
height: 30px;
margin: 0;
padding: 0;
border: none;
}
.optionalBlock {
margin-right: 4px;
display: flex;
}
.combo-button-label {
margin: 0;
}
.sharing-access-combo-box-icon {
height: 16px;
path {
fill: ${(props) => (props.isDisabled ? "#D0D5DA" : "#A3A9AE")};
}
svg {
width: 16px;
min-width: 16px;
height: 16px;
min-height: 16px;
}
}
}
.embedding-panel_code-container {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.embedding-panel_text {
padding: 8px 0 4px 0;
}
.embedding-panel_copy-icon {
position: absolute;
z-index: 1;
margin: 8px;
right: 0px;
}
.embedding-panel_links-container {
display: flex;
.embedding-panel_link {
margin-right: 8px;
height: 32px;
background-color: #eceef1;
line-height: 30px;
padding: 0px 8px;
}
}
.embedding-panel_inputs-container {
display: flex;
.embedding-panel_input {
margin-right: 8px;
width: 94px;
}
}
.embedding-panel_code-container {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.embedding-panel_text {
padding: 8px 0 4px 0;
}
.embedding-panel_copy-icon {
position: absolute;
z-index: 1;
margin: 8px;
right: 0;
}
.panel-loader-wrapper {
margin-top: 8px;
padding-left: 32px;
}
.panel-loader {
display: inline;
margin-right: 10px;
}
@media (max-width: 1024px) {
.row_content {
height: 19px;
overflow: initial;
}
}
`;
export {
StyledAsidePanel,
StyledAddGroupsPanel,
@ -790,4 +987,5 @@ export {
StyledSelectFolderPanel,
StyledSelectFilePanel,
StyledFilesList,
StyledModalRowContainer,
};

View File

@ -1,10 +1,14 @@
import React from "react";
import CustomScrollbarsVirtualList from "@appserver/components/scrollbar/custom-scrollbars-virtual-list";
import CustomScrollbars from "@appserver/components/scrollbar/custom-scrollbars-virtual-list";
import AutoSizer from "react-virtualized-auto-sizer";
import { FixedSizeList as List } from "react-window";
import RowWrapper from "./RowWrapper";
import { inject, observer } from "mobx-react";
const CustomScrollbarsVirtualList = React.forwardRef((props, ref) => (
<CustomScrollbars stype="mediumBlack" {...props} forwardedRef={ref} />
));
const FileList = ({ uploadDataFiles }) => {
//console.log("FileList render");

View File

@ -1,5 +1,5 @@
import React from "react";
import styled from "styled-components";
import styled, { css } from "styled-components";
import Tooltip from "@appserver/components/tooltip";
import Row from "@appserver/components/row";
import Text from "@appserver/components/text";
@ -66,6 +66,14 @@ const StyledFileRow = styled(Row)`
.__react_component_tooltip.place-bottom::after {
border-bottom: 6px solid #f8f7bf !important;
}
.upload-panel_file-row-link {
${(props) =>
!props.isMediaActive &&
css`
cursor: default;
`}
}
`;
const FileRow = (props) => {
@ -84,6 +92,8 @@ const FileRow = (props) => {
isPersonal,
setMediaViewerData,
setUploadPanelVisible,
isMediaActive,
downloadInCurrentTab,
} = props;
const onCancelCurrentUpload = (e) => {
@ -96,7 +106,7 @@ const FileRow = (props) => {
};
const onMediaClick = (id) => {
console.log("id", id);
if (!isMediaActive) return;
const item = { visible: true, id: id };
setMediaViewerData(item);
setUploadPanelVisible(false);
@ -115,13 +125,15 @@ const FileRow = (props) => {
element={
<img className={item.error && "img_error"} src={fileIcon} alt="" />
}
isMediaActive={isMediaActive}
>
<>
{item.fileId ? (
isMedia ? (
<Link
className="upload-panel_file-row-link"
fontWeight="600"
color={item.error && "#A3A9AE"}
color={item.error || !isMediaActive ? "#A3A9AE" : ""}
truncate
onClick={() => onMediaClick(item.fileId)}
>
@ -133,7 +145,7 @@ const FileRow = (props) => {
color={item.error && "#A3A9AE"}
truncate
href={item.fileInfo ? item.fileInfo.webUrl : ""}
target="_blank"
target={downloadInCurrentTab ? "_self" : "_blank"}
>
{name}
</Link>
@ -211,10 +223,7 @@ const FileRow = (props) => {
};
export default inject(
(
{ auth, filesStore, formatsStore, uploadDataStore, mediaViewerDataStore },
{ item }
) => {
({ auth, formatsStore, uploadDataStore, mediaViewerDataStore }, { item }) => {
let ext;
let name;
let splitted;
@ -229,7 +238,12 @@ export default inject(
}
const { personal } = auth.settingsStore;
const { iconFormatsStore, mediaViewersFormatsStore } = formatsStore;
const {
iconFormatsStore,
mediaViewersFormatsStore,
docserviceStore,
} = formatsStore;
const { canViewedDocs } = docserviceStore;
const {
uploaded,
primaryProgressDataStore,
@ -237,8 +251,12 @@ export default inject(
cancelCurrentFileConversion,
setUploadPanelVisible,
} = uploadDataStore;
const { playlist, setMediaViewerData } = mediaViewerDataStore;
const { loadingFile: file } = primaryProgressDataStore;
const isMedia = mediaViewersFormatsStore.isMediaOrImage(ext);
const isMediaActive =
playlist.findIndex((el) => el.fileId === item.fileId) !== -1;
const fileIcon = iconFormatsStore.getIconSrc(ext, 24);
const loadingFile = !file || !file.uniqueId ? null : file;
@ -248,7 +266,9 @@ export default inject(
? loadingFile.percent
: null;
const { setMediaViewerData } = mediaViewerDataStore;
const { isArchive } = iconFormatsStore;
const downloadInCurrentTab = isArchive(ext) || !canViewedDocs(ext);
return {
isPersonal: personal,
@ -259,6 +279,8 @@ export default inject(
ext,
name,
loadingFile,
isMediaActive,
downloadInCurrentTab,
cancelCurrentUpload,
cancelCurrentFileConversion,

View File

@ -87,7 +87,11 @@ class UploadPanelComponent extends React.Component {
zIndex={zIndex}
isAside={true}
/>
<Aside className="header_aside-panel" visible={visible}>
<Aside
className="header_aside-panel"
visible={visible}
withoutBodyScroll
>
<StyledContent>
<StyledHeaderContent className="upload-panel_header-content">
<Heading className="upload_panel-header" size="medium" truncate>

View File

@ -72,7 +72,6 @@ const StyledSimpleFilesRow = styled(Row)`
.share-button-icon {
margin-right: 7px;
margin-top: -1px;
}
.share-button:hover,

View File

@ -63,6 +63,10 @@ const StyledTableRow = styled(TableRow)`
"url(images/cursor.palm.svg), auto"};
}
.table-container_element {
margin-left: ${(props) => (props.item.isFolder ? "-3px" : "-4px")};
}
&:hover {
.table-container_row-checkbox-wrapper {
${(props) => props.dragging && rowCheckboxDraggingHoverStyle}
@ -125,7 +129,8 @@ const StyledShare = styled.div`
}
.share-button-icon {
margin-right: 7px;
margin-right: 4px;
padding-top: 3px;
}
}
`;
@ -181,6 +186,7 @@ const FilesTableRow = (props) => {
id={item.id}
shared={item.shared}
isFolder={item.isFolder}
isSmallIcon={true}
/>
) : null;

View File

@ -9,6 +9,7 @@ import Text from "@appserver/components/text";
import TileContent from "./sub-components/TileContent";
import withContent from "../../../../../HOCs/withContent";
import withBadges from "../../../../../HOCs/withBadges";
import { isMobile } from "react-device-detect";
const SimpleFilesTileContent = styled(TileContent)`
.row-main-container {
@ -54,7 +55,8 @@ const SimpleFilesTileContent = styled(TileContent)`
}
.title-link {
font-size: 14px;
font-size: ${isMobile ? "15px" : "13px"};
margin-top: 2px;
}
.favorite,
@ -83,18 +85,14 @@ const FilesTileContent = ({
return (
<>
<SimpleFilesTileContent
sideColor="#333"
isFile={fileExst}
//disableSideInfo
>
<SimpleFilesTileContent sideColor="#333" isFile={fileExst}>
<Link
className="title-link item-file-name"
containerWidth="100%"
type="page"
title={title}
fontWeight="600"
fontSize="14px"
fontSize={isMobile ? "15px" : "13px"}
target="_blank"
{...linkStyles}
color="#333"
@ -106,7 +104,7 @@ const FilesTileContent = ({
className="badge-ext"
as="span"
color="#A3A9AE"
fontSize="14px"
fontSize={isMobile ? "15px" : "13px"}
fontWeight={600}
truncate={true}
>

View File

@ -6,6 +6,7 @@ import { ReactSVG } from "react-svg";
import styled, { css } from "styled-components";
import ContextMenu from "@appserver/components/context-menu";
import { tablet } from "@appserver/components/utils/device";
import { isDesktop, isMobile } from "react-device-detect";
import Link from "@appserver/components/link";
@ -100,9 +101,11 @@ const StyledTile = styled.div`
}
.checkbox {
display: flex;
opacity: ${(props) => (props.checked ? 1 : 0)};
flex: 0 0 16px;
margin-right: 4px;
justify-content: center;
@media ${tablet} {
opacity: 1;
@ -112,11 +115,18 @@ const StyledTile = styled.div`
.file-checkbox {
display: ${(props) => (props.checked ? "flex" : "none")};
flex: 0 0 16px;
margin-right: ${(props) => (props.isFolder ? "8px" : "4px")};
margin-top: 3px;
margin-left: ${(props) =>
isMobile
? css`
${props.isFolder ? "6px" : "12px"};
`
: css`
${props.isFolder ? "5px" : "8px"}
`};
@media ${tablet} {
display: flex;
margin-top: 2px;
}
}
@ -126,33 +136,47 @@ const StyledTile = styled.div`
flex: 0 0 auto;
margin-right: 4px;
user-select: none;
margin-top: 3px;
margin-top: ${(props) => (props.isFolder ? "-6px" : "-4px")};
margin-top: ${(props) => (props.isFolder ? "-8px" : "-6px")};
height: 32px;
width: 32px;
height: ${isMobile ? "32px" : "24px"};
width: ${isMobile ? "32px" : "24px"};
img {
height: 32px;
width: 32px;
height: ${isMobile ? "32px" : "24px"};
width: ${isMobile ? "32px" : "24px"};
}
@media ${tablet} {
display: none;
}
margin-left: ${(props) =>
isMobile
? css`
${props.isFolder ? "2px" : "4px"};
`
: css`
${props.isFolder ? "2px" : "4px"}
`};
}
.file-icon_container {
min-width: 36px;
min-width: ${isMobile ? "36px" : "28px"};
}
@media ${tablet} {
min-width: 28px;
}
.styled-content {
padding-left: 10px;
padding-left: ${(props) =>
isMobile
? css`
${props.isFolder ? "8px" : "12px"};
`
: css`
${props.isFolder ? "10px" : "13px"}
`};
}
:hover {
${(props) =>
!props.dragging &&
props.isDesktop &&
css`
.checkbox {
opacity: 1;
@ -173,8 +197,12 @@ const StyledFileTileTop = styled.div`
align-items: baseline;
background-color: #f8f9f9;
padding: 13px;
height: 157px;
height: ${(props) => (props.checked || props.isActive ? "156px" : "156px")};
position: relative;
border-bottom: ${(props) =>
props.checked || props.isActive
? "1px solid #D0D5DA"
: "1px solid transparent"};
.thumbnail-image,
.temporary-icon > .injected-svg {
@ -195,8 +223,6 @@ const StyledFileTileBottom = styled.div`
padding-right: 0;
min-height: 56px;
box-sizing: border-box;
border-top: ${(props) =>
(props.checked || props.isActive) && "1px solid #D0D5DA"};
`;
const StyledContent = styled.div`
@ -292,6 +318,13 @@ class Tile extends React.PureComponent {
onSelect && onSelect(e.target.checked, item);
};
onFileIconClick = () => {
if (isDesktop) return;
const { onSelect, item } = this.props;
onSelect && onSelect(true, item);
};
render() {
const {
checked,
@ -348,12 +381,18 @@ class Tile extends React.PureComponent {
isRecycleBin={isRecycleBin}
checked={checked}
isActive={isActive}
isDesktop={isDesktop}
>
{isFolder || (!fileExst && id === -1) ? (
<>
{renderElement && !(!fileExst && id === -1) && !isEdit && (
<div className="file-icon_container">
<StyledElement className="file-icon">{element}</StyledElement>
<StyledElement
className="file-icon"
onClick={this.onFileIconClick}
>
{element}
</StyledElement>
<Checkbox
className="checkbox file-checkbox"
isChecked={checked}
@ -363,6 +402,7 @@ class Tile extends React.PureComponent {
</div>
)}
<StyledContent
className="styled-content"
isFolder={(isFolder && !fileExst) || (!fileExst && id === -1)}
>
{children}
@ -386,11 +426,15 @@ class Tile extends React.PureComponent {
</>
) : (
<>
<StyledFileTileTop>{icon}</StyledFileTileTop>
<StyledFileTileBottom checked={checked} isActive={isActive}>
<StyledFileTileTop checked={checked} isActive={isActive}>
{icon}
</StyledFileTileTop>
<StyledFileTileBottom>
{id !== -1 && !isEdit && (
<div className="file-icon_container">
<div className="file-icon">{element}</div>
<div className="file-icon" onClick={this.onFileIconClick}>
{element}
</div>
<Checkbox
className="file-checkbox"
isChecked={checked}

View File

@ -1,35 +1,50 @@
/* eslint-disable react/display-name */
import React, { memo } from "react";
import styled from "styled-components";
import styled, { css } from "styled-components";
import PropTypes from "prop-types";
import { FixedSizeList as List, areEqual } from "react-window";
import AutoSizer from "react-virtualized-auto-sizer";
import Heading from "@appserver/components/heading";
import ContextMenu from "@appserver/components/context-menu";
import CustomScrollbarsVirtualList from "@appserver/components/scrollbar";
import { tablet } from "@appserver/components/utils/device";
import { tablet, desktop } from "@appserver/components/utils/device";
const foldersStyle = css`
grid-gap: 19px 14px;
@media ${desktop} {
margin-left: -1px;
padding-right: 1px;
}
@media ${tablet} {
grid-gap: 17px 12px;
margin-left: -1px;
}
`;
const filesStyle = css`
grid-gap: 14px 18px;
@media ${desktop} {
padding-right: 5px;
}
@media ${tablet} {
grid-gap: 12px 14px;
margin-left: -1px;
padding-right: 2px;
}
`;
const StyledGridWrapper = styled.div`
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
width: 100%;
grid-gap: ${(props) => (props.isFolders ? "13px 14px" : "16px 18px")};
padding-bottom: 24px;
padding-right: 2px;
box-sizing: border-box;
padding-left: 1px;
@media ${tablet} {
margin-left: -6px !important;
}
@media (min-width: 1024px) {
margin-left: -2px;
}
@media (max-width: 1024px) {
margin-left: -2px;
}
${(props) => (props.isFolders ? foldersStyle : filesStyle)};
`;
const StyledTileContainer = styled.div`
@ -59,6 +74,8 @@ const StyledTileContainer = styled.div`
&.files {
padding-top: 8px;
}
margin-left: -1px;
}
@media (min-width: 1024px) {
@ -68,6 +85,10 @@ const StyledTileContainer = styled.div`
}
}
}
@media ${tablet} {
margin-right: -3px;
}
`;
class TileContainer extends React.PureComponent {

View File

@ -9,6 +9,7 @@ import FilterInput from "@appserver/common/components/FilterInput";
import { withLayoutSize } from "@appserver/common/utils";
import { isMobileOnly, isMobile } from "react-device-detect";
import { inject, observer } from "mobx-react";
import withLoader from "../../../../HOCs/withLoader";
const getFilterType = (filterValues) => {
const filterType = result(
@ -333,20 +334,11 @@ class SectionFilterContent extends React.Component {
render() {
//console.log("Filter render");
const selectedFilterData = this.getSelectedFilterData();
const {
t,
sectionWidth,
tReady,
isFiltered,
viewAs,
personal,
} = this.props;
const { t, sectionWidth, isFiltered, viewAs, personal } = this.props;
const filterColumnCount =
window.innerWidth < 500 ? {} : { filterColumnCount: personal ? 2 : 3 };
return !isFiltered ? null : !tReady ? (
<Loaders.Filter />
) : (
return !isFiltered ? null : (
<FilterInput
sectionWidth={sectionWidth}
getFilterData={this.getData}
@ -417,7 +409,7 @@ export default inject(
withRouter(
withLayoutSize(
withTranslation(["Home", "Common", "Translations"])(
observer(SectionFilterContent)
withLoader(observer(SectionFilterContent))(<Loaders.Filter />)
)
)
)

View File

@ -37,6 +37,7 @@ const StyledContainer = styled.div`
: props.canCreate
? "auto 1fr auto auto"
: "auto 1fr auto"};
${(props) => !props.isLoading && "top: 7px;"}
}
`}
align-items: center;
@ -294,7 +295,7 @@ class SectionHeaderContent extends React.Component {
onBackToParentFolder = () => {
const { setIsLoading, parentId, filter, fetchFiles } = this.props;
setIsLoading(true);
fetchFiles(parentId, filter).finally(() => setIsLoading(false));
fetchFiles(parentId, null, true, false).finally(() => setIsLoading(false));
};
onCheck = (checked) => {
@ -354,7 +355,7 @@ class SectionHeaderContent extends React.Component {
} = this.props;
const menuItems = this.getMenuItems();
const isLoading = !title || !tReady;
return (
<Consumer>
{(context) => (
@ -365,6 +366,7 @@ class SectionHeaderContent extends React.Component {
title={title}
isDesktop={isDesktop}
isTabletView={isTabletView}
isLoading={isLoading}
>
{isHeaderVisible && viewAs !== "table" ? (
<div className="group-button-menu-container">
@ -383,7 +385,7 @@ class SectionHeaderContent extends React.Component {
</div>
) : (
<div className="header-container">
{!title || !tReady ? (
{isLoading ? (
<Loaders.SectionHeader />
) : (
<>

View File

@ -453,9 +453,17 @@ class FilesActionStore {
};
openLocationAction = (locationId, isFolder) => {
const { createNewExpandedKeys, setExpandedKeys } = this.treeFoldersStore;
const locationFilter = isFolder ? this.filesStore.filter : null;
this.filesStore.setBufferSelection(null);
return this.filesStore.fetchFiles(locationId, locationFilter);
return this.filesStore
.fetchFiles(locationId, locationFilter)
.then((data) => {
const pathParts = data.selectedFolder.pathParts;
const newExpandedKeys = createNewExpandedKeys(pathParts);
setExpandedKeys(newExpandedKeys);
});
/*.then(() =>
//isFolder ? null : this.selectRowAction(!checked, item)
);*/
@ -569,13 +577,14 @@ class FilesActionStore {
setConflictResolveDialogVisible,
setConflictResolveDialogItems,
} = this.dialogsStore;
const { setBufferSelection } = this.filesStore;
let conflicts;
try {
conflicts = await checkFileConflicts(destFolderId, folderIds, fileIds);
} catch (err) {
this.filesStore.setBufferSelection(null);
setBufferSelection(null);
return toastr.error(err.message ? err.message : err);
}
@ -587,10 +596,12 @@ class FilesActionStore {
try {
await this.uploadDataStore.itemOperationToFolder(operationData);
} catch (err) {
this.filesStore.setBufferSelection(null);
setBufferSelection(null);
return toastr.error(err.message ? err.message : err);
}
}
setBufferSelection(null);
};
isAvailableOption = (option) => {
@ -601,7 +612,7 @@ class FilesActionStore {
} = this.treeFoldersStore;
const {
isAccessedSelected,
isWebEditSelected,
canConvertSelected,
isThirdPartyRootSelection,
hasSelection,
} = this.filesStore;
@ -615,7 +626,7 @@ class FilesActionStore {
case "download":
return hasSelection;
case "downloadAs":
return isWebEditSelected && hasSelection;
return canConvertSelected;
case "moveTo":
return (
!isThirdPartyRootSelection &&

View File

@ -98,7 +98,7 @@ class FilesStore {
};
setStartDrag = (startDrag) => {
this.selection = this.selection.filter((x) => !x.isThirdPartyFolder); // removed root thirdparty folders
this.selection = this.selection.filter((x) => !x.providerKey); // removed root thirdparty folders
this.startDrag = startDrag;
};
@ -227,6 +227,9 @@ class FilesStore {
};
setSelected = (selected) => {
if (selected === "close" || selected === "none")
this.setBufferSelection(null);
this.selected = selected;
const files = this.files.concat(this.folders);
this.selection = this.getFilesBySelected(files, selected);
@ -426,6 +429,8 @@ class FilesStore {
const { isDesktopClient } = this.authStore.settingsStore;
if (isFile) {
const shouldEdit = canWebEdit(item.fileExst);
const shouldView = canViewedDocs(item.fileExst);
let fileOptions = [
//"open",
"edit",
@ -470,12 +475,12 @@ class FilesStore {
"unsubscribe",
]);
if (!this.isWebEditSelected && !canViewedDocs(item.fileExst)) {
if (!shouldEdit && !shouldView) {
fileOptions = this.removeOptions(fileOptions, ["sharing-settings"]);
}
}
if (!this.isWebEditSelected) {
if (!this.canConvertSelected) {
fileOptions = this.removeOptions(fileOptions, ["download-as"]);
}
@ -698,11 +703,7 @@ class FilesStore {
);
}
if (
!canWebEdit(item.fileExst) &&
!canViewedDocs(item.fileExst) &&
!fileOptions.includes("view")
) {
if (!shouldEdit && !shouldView && !fileOptions.includes("view")) {
fileOptions = this.removeOptions(fileOptions, [
"edit",
"preview",
@ -710,7 +711,7 @@ class FilesStore {
]);
}
if (!canWebEdit(item.fileExst) && canViewedDocs(item.fileExst)) {
if (!shouldEdit && shouldView) {
fileOptions = this.removeOptions(fileOptions, ["edit"]);
}
@ -1062,7 +1063,7 @@ class FilesStore {
const { getFileIcon, getFolderIcon } = this.formatsStore.iconFormatsStore;
if (items.length && items[0].id === -1) return; //TODO: if change media collection from state remove this;
const iconSize = this.viewAs === "tile" ? 32 : 24;
const iconSize = this.viewAs === "tile" && isMobile ? 32 : 24;
const icon = this.fileActionStore.extension
? getFileIcon(`.${this.fileActionStore.extension}`, iconSize)
: getFolderIcon(null, iconSize);
@ -1133,8 +1134,7 @@ class FilesStore {
const contextOptions = this.getFilesContextOptions(item, canOpenPlayer);
const isThirdPartyFolder = providerKey && id === rootFolderId;
//const isCanWebEdit = canWebEdit(item.fileExst);
const iconSize = this.viewAs === "tile" ? 32 : 24;
const iconSize = this.viewAs === "tile" && isMobile ? 32 : 24;
const icon = getIcon(iconSize, fileExst, providerKey, contentLength);
let isFolder = false;
@ -1203,7 +1203,6 @@ class FilesStore {
webUrl,
providerKey,
canOpenPlayer,
//canWebEdit: isCanWebEdit,
//canShare,
canShare,
canEdit,
@ -1367,7 +1366,7 @@ class FilesStore {
return !!withProvider;
}
get isWebEditSelected() {
get canConvertSelected() {
const { filesConverts } = this.formatsStore.docserviceStore;
const selection = this.selection.length

View File

@ -228,6 +228,102 @@ class IconFormatsStore {
}
};
getIconUrl = (extension, folderPath) => {
switch (extension) {
case ".avi":
return `${folderPath}/avi.svg`;
case ".csv":
return `${folderPath}/csv.svg`;
case ".djvu":
return `${folderPath}/djvu.svg`;
case ".doc":
return `${folderPath}/doc.svg`;
case ".docm":
return `${folderPath}/docm.svg`;
case ".docx":
return `${folderPath}/docx.svg`;
case ".dotx":
return `${folderPath}/dotx.svg`;
case ".dvd":
return `${folderPath}/dvd.svg`;
case ".epub":
return `${folderPath}/epub.svg`;
case ".pb2":
case ".fb2":
return `${folderPath}/fb2.svg`;
case ".flv":
return `${folderPath}/flv.svg`;
case ".fodt":
return `${folderPath}/fodt.svg`;
case ".iaf":
return `${folderPath}/iaf.svg`;
case ".ics":
return `${folderPath}/ics.svg`;
case ".m2ts":
return `${folderPath}/m2ts.svg`;
case ".mht":
return `${folderPath}/mht.svg`;
case ".mkv":
return `${folderPath}/mkv.svg`;
case ".mov":
return `${folderPath}/mov.svg`;
case ".mp4":
return `${folderPath}/mp4.svg`;
case ".mpg":
return `${folderPath}/mpg.svg`;
case ".odp":
return `${folderPath}/odp.svg`;
case ".ods":
return `${folderPath}/ods.svg`;
case ".odt":
return `${folderPath}/odt.svg`;
case ".otp":
return `${folderPath}/otp.svg`;
case ".ots":
return `${folderPath}/ots.svg`;
case ".ott":
return `${folderPath}/ott.svg`;
case ".pdf":
return `${folderPath}/pdf.svg`;
case ".pot":
return `${folderPath}/pot.svg`;
case ".pps":
return `${folderPath}/pps.svg`;
case ".ppsx":
return `${folderPath}/ppsx.svg`;
case ".ppt":
return `${folderPath}/ppt.svg`;
case ".pptm":
return `${folderPath}/pptm.svg`;
case ".pptx":
return `${folderPath}/pptx.svg`;
case ".rtf":
return `${folderPath}/rtf.svg`;
case ".svg":
return `${folderPath}/svg.svg`;
case ".txt":
return `${folderPath}/txt.svg`;
case ".webm":
return `${folderPath}/webm.svg`;
case ".xls":
return `${folderPath}/xls.svg`;
case ".xlsm":
return `${folderPath}/xlsm.svg`;
case ".xlsx":
return `${folderPath}/xlsx.svg`;
case ".xps":
return `${folderPath}/xps.svg`;
case ".xml":
return `${folderPath}/xml.svg`;
case ".oform":
return `${folderPath}/oform.svg`;
case ".docxf":
return `${folderPath}/docxf.svg`;
default:
return `${folderPath}/file.svg`;
}
};
getFileIcon = (
extension,
size = 32,
@ -246,96 +342,7 @@ class IconFormatsStore {
if (html) return `${folderPath}/html.svg`;
switch (extension) {
case ".avi":
return `${folderPath}/avi.svg`;
case ".csv":
return `${folderPath}/csv.svg`;
case ".djvu":
return `${folderPath}/djvu.svg`;
case ".doc":
return `${folderPath}/doc.svg`;
case ".docm":
return `${folderPath}/docm.svg`;
case ".docx":
return `${folderPath}/docx.svg`;
case ".dotx":
return `${folderPath}/dotx.svg`;
case ".dvd":
return `${folderPath}/dvd.svg`;
case ".epub":
return `${folderPath}/epub.svg`;
case ".pb2":
return `${folderPath}/fb2.svg`;
case ".fb2":
return `${folderPath}/fb2.svg`;
case ".flv":
return `${folderPath}/flv.svg`;
case ".fodt":
return `${folderPath}/fodt.svg`;
case ".iaf":
return `${folderPath}/iaf.svg`;
case ".ics":
return `${folderPath}/ics.svg`;
case ".m2ts":
return `${folderPath}/m2ts.svg`;
case ".mht":
return `${folderPath}/mht.svg`;
case ".mkv":
return `${folderPath}/mkv.svg`;
case ".mov":
return `${folderPath}/mov.svg`;
case ".mp4":
return `${folderPath}/mp4.svg`;
case ".mpg":
return `${folderPath}/mpg.svg`;
case ".odp":
return `${folderPath}/odp.svg`;
case ".ods":
return `${folderPath}/ods.svg`;
case ".odt":
return `${folderPath}/odt.svg`;
case ".otp":
return `${folderPath}/otp.svg`;
case ".ots":
return `${folderPath}/ots.svg`;
case ".ott":
return `${folderPath}/ott.svg`;
case ".pdf":
return `${folderPath}/pdf.svg`;
case ".pot":
return `${folderPath}/pot.svg`;
case ".pps":
return `${folderPath}/pps.svg`;
case ".ppsx":
return `${folderPath}/ppsx.svg`;
case ".ppt":
return `${folderPath}/ppt.svg`;
case ".pptm":
return `${folderPath}/pptm.svg`;
case ".pptx":
return `${folderPath}/pptx.svg`;
case ".rtf":
return `${folderPath}/rtf.svg`;
case ".svg":
return `${folderPath}/svg.svg`;
case ".txt":
return `${folderPath}/txt.svg`;
case ".webm":
return `${folderPath}/webm.svg`;
case ".xls":
return `${folderPath}/xls.svg`;
case ".xlsm":
return `${folderPath}/xlsm.svg`;
case ".xlsx":
return `${folderPath}/xlsx.svg`;
case ".xps":
return `${folderPath}/xps.svg`;
case ".xml":
return `${folderPath}/xml.svg`;
default:
return `${folderPath}/file.svg`;
}
return this.getIconUrl(extension, folderPath);
};
getIconSrc = (ext, size = 24) => {
@ -352,96 +359,7 @@ class IconFormatsStore {
const extension = ext.toLowerCase();
switch (extension) {
case ".avi":
return `${folderPath}/avi.svg`;
case ".csv":
return `${folderPath}/csv.svg`;
case ".djvu":
return `${folderPath}/djvu.svg`;
case ".doc":
return `${folderPath}/doc.svg`;
case ".docm":
return `${folderPath}/docm.svg`;
case ".docx":
return `${folderPath}/docx.svg`;
case ".dotx":
return `${folderPath}/dotx.svg`;
case ".dvd":
return `${folderPath}/dvd.svg`;
case ".epub":
return `${folderPath}/epub.svg`;
case ".pb2":
return `${folderPath}/fb2.svg`;
case ".fb2":
return `${folderPath}/fb2.svg`;
case ".flv":
return `${folderPath}/flv.svg`;
case ".fodt":
return `${folderPath}/fodt.svg`;
case ".iaf":
return `${folderPath}/iaf.svg`;
case ".ics":
return `${folderPath}/ics.svg`;
case ".m2ts":
return `${folderPath}/m2ts.svg`;
case ".mht":
return `${folderPath}/mht.svg`;
case ".mkv":
return `${folderPath}/mkv.svg`;
case ".mov":
return `${folderPath}/mov.svg`;
case ".mp4":
return `${folderPath}/mp4.svg`;
case ".mpg":
return `${folderPath}/mpg.svg`;
case ".odp":
return `${folderPath}/odp.svg`;
case ".ods":
return `${folderPath}/ods.svg`;
case ".odt":
return `${folderPath}/odt.svg`;
case ".otp":
return `${folderPath}/otp.svg`;
case ".ots":
return `${folderPath}/ots.svg`;
case ".ott":
return `${folderPath}/ott.svg`;
case ".pdf":
return `${folderPath}/pdf.svg`;
case ".pot":
return `${folderPath}/pot.svg`;
case ".pps":
return `${folderPath}/pps.svg`;
case ".ppsx":
return `${folderPath}/ppsx.svg`;
case ".ppt":
return `${folderPath}/ppt.svg`;
case ".pptx":
return `${folderPath}/pptx.svg`;
case ".pptm":
return `${folderPath}/pptm.svg`;
case ".rtf":
return `${folderPath}/rtf.svg`;
case ".svg":
return `${folderPath}/svg.svg`;
case ".txt":
return `${folderPath}/txt.svg`;
case ".webm":
return `${folderPath}/webm.svg`;
case ".xls":
return `${folderPath}/xls.svg`;
case ".xlsm":
return `${folderPath}/xlsm.svg`;
case ".xlsx":
return `${folderPath}/xlsx.svg`;
case ".xps":
return `${folderPath}/xps.svg`;
case ".xml":
return `${folderPath}/xml.svg`;
default:
return `${folderPath}/file.svg`;
}
return this.getIconUrl(extension, folderPath);
};
}

View File

@ -28,9 +28,9 @@ class MediaViewerDataStore {
get playlist() {
const { isMediaOrImage } = this.formatsStore.mediaViewersFormatsStore;
const { files, folders } = this.filesStore;
const { files } = this.filesStore;
const filesList = [...files, ...folders];
const filesList = [...files];
const playlist = [];
let id = 0;

View File

@ -389,7 +389,7 @@ class UploadDataStore {
this.uploadToFolder = null;
this.percent = 0;
}
if (this.converted) {
if (this.uploaded && this.converted) {
this.files = [];
this.filesToConversion = [];
}
@ -874,25 +874,25 @@ class UploadDataStore {
return;
}
let operationItem = null;
let operationItem = data;
let finished = data.finished;
while (progress !== 100) {
await this.getOperationProgress(data.id)
.then((item) => {
operationItem = item;
progress = item ? item.progress : 100;
while (!finished) {
const item = await this.getOperationProgress(data.id);
operationItem = item;
progress = item ? item.progress : 100;
finished = item.finished;
setSecondaryProgressBarData({
icon: pbData.icon,
label: pbData.label || label,
percent: progress,
visible: true,
alert: false,
});
})
.catch((err) => Promise.reject(err));
setSecondaryProgressBarData({
icon: pbData.icon,
label: pbData.label || label,
percent: progress,
visible: true,
alert: false,
});
}
return Promise.resolve(operationItem);
return operationItem;
};
moveToCopyTo = (destFolderId, pbData, isCopy) => {

View File

@ -34,6 +34,7 @@ using System.Threading.Tasks;
using ASC.Common;
using ASC.Common.Caching;
using ASC.Common.Utils;
using ASC.Core;
using ASC.Core.Common.EF;
using ASC.Core.Common.Settings;
@ -97,7 +98,7 @@ namespace ASC.Files.Core.Data
ChunkedUploadSessionHolder chunkedUploadSessionHolder,
ProviderFolderDao providerFolderDao,
CrossDao crossDao,
Settings settings)
ConfigurationExtension configurationExtension)
: base(
dbContextManager,
userManager,
@ -122,7 +123,7 @@ namespace ASC.Files.Core.Data
ChunkedUploadSessionHolder = chunkedUploadSessionHolder;
ProviderFolderDao = providerFolderDao;
CrossDao = crossDao;
Settings = settings;
Settings = Settings.GetInstance(configurationExtension);
}
public void InvalidateCache(int fileId)

View File

@ -515,6 +515,7 @@ namespace ASC.Files.Core.Data
var toInsert = FilesDbContext.Tree
.Where(r => r.FolderId == toFolderId)
.OrderBy(r => r.Level)
.ToList();
foreach (var subfolder in subfolders)
@ -525,7 +526,7 @@ namespace ASC.Files.Core.Data
{
FolderId = subfolder.Key,
ParentId = f.ParentId,
Level = f.Level + 1
Level = subfolder.Value + 1 + f.Level
};
FilesDbContext.AddOrUpdate(r => r.Tree, newTree);
}

View File

@ -31,6 +31,7 @@ using System.Threading.Tasks;
using ASC.Common;
using ASC.Common.Caching;
using ASC.Common.Logging;
using ASC.Common.Utils;
using ASC.Core;
using ASC.Core.Common.EF.Model;
using ASC.ElasticSearch;
@ -48,7 +49,7 @@ namespace ASC.Web.Files.Core.Search
public class FactoryIndexerFile : FactoryIndexer<DbFile>
{
private IDaoFactory DaoFactory { get; }
public Settings Settings { get; }
private Settings Settings { get; }
public FactoryIndexerFile(
IOptionsMonitor<ILog> options,
@ -59,11 +60,11 @@ namespace ASC.Web.Files.Core.Search
IServiceProvider serviceProvider,
IDaoFactory daoFactory,
ICache cache,
Settings settings)
ConfigurationExtension configurationExtension)
: base(options, tenantManager, searchSettingsHelper, factoryIndexer, baseIndexer, serviceProvider, cache)
{
DaoFactory = daoFactory;
Settings = settings;
Settings = Settings.GetInstance(configurationExtension);
}
public override void IndexAll()
@ -73,18 +74,22 @@ namespace ASC.Web.Files.Core.Search
(int, int, int) getCount(DateTime lastIndexed)
{
var dataQuery = GetBaseQuery(lastIndexed)
.Where(r => r.DbFile.Version == 1)
.OrderBy(r => r.DbFile.Id)
.Select(r => r.DbFile.Id);
var minid = dataQuery.FirstOrDefault();
dataQuery = GetBaseQuery(lastIndexed)
.Where(r => r.DbFile.Version == 1)
.OrderByDescending(r => r.DbFile.Id)
.Select(r => r.DbFile.Id);
var maxid = dataQuery.FirstOrDefault();
var count = GetBaseQuery(lastIndexed).Count();
var count = GetBaseQuery(lastIndexed)
.Where(r => r.DbFile.Version == 1)
.Count();
return new(count, maxid, minid);
}
@ -92,7 +97,7 @@ namespace ASC.Web.Files.Core.Search
List<DbFile> getData(long start, long stop, DateTime lastIndexed)
{
return GetBaseQuery(lastIndexed)
.Where(r => r.DbFile.Id >= start && r.DbFile.Id <= stop)
.Where(r => r.DbFile.Id >= start && r.DbFile.Id <= stop && r.DbFile.CurrentVersion)
.Select(r => r.DbFile)
.ToList();
@ -106,6 +111,7 @@ namespace ASC.Web.Files.Core.Search
{
var dataQuery = GetBaseQuery(lastIndexed)
.Where(r => r.DbFile.Id >= start)
.Where(r => r.DbFile.Version == 1)
.OrderBy(r => r.DbFile.Id)
.Select(r => r.DbFile.Id)
.Skip(BaseIndexer<DbFile>.QueryLimit);
@ -127,7 +133,6 @@ namespace ASC.Web.Files.Core.Search
IQueryable<FileTenant> GetBaseQuery(DateTime lastIndexed) => fileDao.FilesDbContext.Files
.Where(r => r.ModifiedOn >= lastIndexed)
.Where(r => r.CurrentVersion)
.Join(fileDao.FilesDbContext.Tenants, r => r.TenantId, r => r.Id, (f, t) => new FileTenant { DbFile = f, DbTenant = t })
.Where(r => r.DbTenant.Status == ASC.Core.Tenants.TenantStatus.Active);

View File

@ -32,6 +32,7 @@ using System.Threading.Tasks;
using ASC.Common;
using ASC.Common.Caching;
using ASC.Common.Logging;
using ASC.Common.Utils;
using ASC.Core;
using ASC.Core.Common.EF.Model;
using ASC.ElasticSearch;
@ -49,7 +50,7 @@ namespace ASC.Web.Files.Core.Search
public class FactoryIndexerFolder : FactoryIndexer<DbFolder>
{
private IDaoFactory DaoFactory { get; }
public Settings Settings { get; }
private Settings Settings { get; }
public FactoryIndexerFolder(
IOptionsMonitor<ILog> options,
@ -60,11 +61,11 @@ namespace ASC.Web.Files.Core.Search
IServiceProvider serviceProvider,
IDaoFactory daoFactory,
ICache cache,
Settings settings)
ConfigurationExtension configurationExtension)
: base(options, tenantManager, searchSettingsHelper, factoryIndexer, baseIndexer, serviceProvider, cache)
{
DaoFactory = daoFactory;
Settings = settings;
Settings = Settings.GetInstance(configurationExtension);
}
public override void IndexAll()

View File

@ -36,6 +36,7 @@ using ASC.Common.Threading;
using ASC.Common.Web;
using ASC.Core.Tenants;
using ASC.Files.Core;
using ASC.Files.Core.EF;
using ASC.Files.Core.Resources;
using ASC.MessagingSystem;
using ASC.Web.Core.Files;
@ -116,11 +117,44 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations
stream,
MimeMapping.GetMimeMapping(path),
"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(PROGRESS, 100);
TaskInfo.SetProperty(RESULT, Result);
TaskInfo.SetProperty(FINISHED, true);
}
FillDistributedTask();
TaskInfo.PublishChanges();
}
public override void PublishChanges(DistributedTask task)
{
var thirdpartyTask = ThirdPartyOperation.GetDistributedTask();
var daoTask = DaoOperation.GetDistributedTask();
var error1 = thirdpartyTask.GetProperty<string>(ERROR);
var error2 = daoTask.GetProperty<string>(ERROR);
if (!string.IsNullOrEmpty(error1))
{
Error = error1;
}
else if (!string.IsNullOrEmpty(error2))
{
Error = error2;
}
successProcessed = thirdpartyTask.GetProperty<int>(PROCESSED) + daoTask.GetProperty<int>(PROCESSED);
var progressSteps = ThirdPartyOperation.Total + DaoOperation.Total + 1;
var progress = (int)(successProcessed / (double)progressSteps * 100);
base.FillDistributedTask();
TaskInfo.SetProperty(PROGRESS, progress < 100 ? progress : progress);
TaskInfo.PublishChanges();
}
}
@ -145,7 +179,8 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations
{
if (!Files.Any() && !Folders.Any()) return;
entriesPathId = GetEntriesPathId(scope);
entriesPathId = GetEntriesPathId(scope);
if (entriesPathId == null || entriesPathId.Count == 0)
{
if (Files.Count > 0)
@ -156,7 +191,11 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations
throw new DirectoryNotFoundException(FilesCommonResource.ErrorMassage_FolderNotFound);
}
ReplaceLongPath(entriesPathId);
ReplaceLongPath(entriesPathId);
Total = entriesPathId.Count;
TaskInfo.PublishChanges();
}
private ItemNameValueCollection<T> ExecPathFromFile(IServiceScope scope, File<T> file, string path)
@ -236,7 +275,7 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations
}
return entriesPathId;
}
internal void CompressToZip(Stream stream, IServiceScope scope)
{
if (entriesPathId == null) return;
@ -345,6 +384,15 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations
}
compressTo.CloseEntry();
counter++;
if (!Equals(entryId, default(T)) && file != null)
{
ProcessedFile(entryId);
}
else
{
ProcessedFolder(default(T));
}
}
ProgressStep();

View File

@ -149,7 +149,7 @@ namespace ASC.Web.Files.Services.WCFService.FileOperations
base.FillDistributedTask();
}
public void PublishChanges(DistributedTask task)
public virtual void PublishChanges(DistributedTask task)
{
var thirdpartyTask = ThirdPartyOperation.GetDistributedTask();
var daoTask = DaoOperation.GetDistributedTask();

View File

@ -695,7 +695,7 @@ namespace ASC.Web.Files.Utils
if (filter != FilterType.FoldersOnly)
{
files = fileDao.GetFilesFiltered(fileIds, filter, subjectGroup, subjectId, searchText, searchInContent);
files = fileDao.GetFilesFiltered(fileIds, filter, subjectGroup, subjectId, searchText, searchInContent, true);
files = files.Where(file => file.RootFolderType != FolderType.TRASH).ToList();
files = fileSecurity.FilterRead(files).ToList();

View File

@ -74,8 +74,20 @@ namespace ASC.Files.Service
diHelper.TryAdd(typeof(ICacheNotify<>), typeof(KafkaCache<>));
diHelper.RegisterProducts(hostContext.Configuration, hostContext.HostingEnvironment.ContentRootPath);
services.AddHostedService<ServiceLauncher>();
diHelper.TryAdd<ServiceLauncher>();
if (!bool.TryParse(hostContext.Configuration["disable_elastic"], out var disableElastic))
{
disableElastic = false;
}
if (!disableElastic)
{
services.AddHostedService<ServiceLauncher>();
diHelper.TryAdd<ServiceLauncher>();
//diHelper.TryAdd<FileConverter>();
diHelper.TryAdd<FactoryIndexerFile>();
diHelper.TryAdd<FactoryIndexerFolder>();
}
services.AddHostedService<FeedAggregatorService>();
diHelper.TryAdd<FeedAggregatorService>();
@ -83,9 +95,6 @@ namespace ASC.Files.Service
services.AddHostedService<Launcher>();
diHelper.TryAdd<Launcher>();
//diHelper.TryAdd<FileConverter>();
diHelper.TryAdd<FactoryIndexerFile>();
diHelper.TryAdd<FactoryIndexerFolder>();
})
.ConfigureContainer<ContainerBuilder>((context, builder) =>
{

View File

@ -48,11 +48,11 @@ namespace ASC.Files.ThumbnailBuilder
private readonly ILog logger;
private IServiceProvider ServiceProvider { get; }
public BuilderQueue(IServiceProvider serviceProvider, IOptionsMonitor<ILog> log, ThumbnailSettings thumbnailSettings)
public BuilderQueue(IServiceProvider serviceProvider, IOptionsMonitor<ILog> log, ASC.Common.Utils.ConfigurationExtension configurationExtension)
{
logger = log.Get("ASC.Files.ThumbnailBuilder");
ServiceProvider = serviceProvider;
config = thumbnailSettings;
config = ThumbnailSettings.GetInstance(configurationExtension);
}
public void BuildThumbnails(IEnumerable<FileData<T>> filesWithoutThumbnails)
@ -62,13 +62,14 @@ namespace ASC.Files.ThumbnailBuilder
Parallel.ForEach(
filesWithoutThumbnails,
new ParallelOptions { MaxDegreeOfParallelism = config.MaxDegreeOfParallelism },
(fileData) => {
(fileData) =>
{
using var scope = ServiceProvider.CreateScope();
var commonLinkUtilitySettings = scope.ServiceProvider.GetService<CommonLinkUtilitySettings>();
commonLinkUtilitySettings.ServerUri = fileData.BaseUri;
var builder = scope.ServiceProvider.GetService<Builder<T>>();
builder.BuildThumbnail(fileData);
builder.BuildThumbnail(fileData);
}
);
}
@ -93,7 +94,7 @@ namespace ASC.Files.ThumbnailBuilder
private PathProvider PathProvider { get; }
public Builder(
ThumbnailSettings config,
Common.Utils.ConfigurationExtension configurationExtension,
TenantManager tenantManager,
IDaoFactory daoFactory,
DocumentServiceConnector documentServiceConnector,
@ -102,7 +103,7 @@ namespace ASC.Files.ThumbnailBuilder
PathProvider pathProvider,
IOptionsMonitor<ILog> log)
{
this.config = config;
this.config = ThumbnailSettings.GetInstance(configurationExtension);
TenantManager = tenantManager;
DaoFactory = daoFactory;
DocumentServiceConnector = documentServiceConnector;

View File

@ -42,13 +42,13 @@ namespace ASC.Files.ThumbnailBuilder
private readonly string cacheKey;
public FileDataProvider(
ThumbnailSettings thumbnailSettings,
Common.Utils.ConfigurationExtension configurationExtension,
ICache ascCache,
DbContextManager<FilesDbContext> dbContextManager,
DbContextManager<CoreDbContext> coredbContextManager
)
{
this.thumbnailSettings = thumbnailSettings;
thumbnailSettings = ThumbnailSettings.GetInstance(configurationExtension);
cache = ascCache;
LazyFilesDbContext = new Lazy<FilesDbContext>(() => dbContextManager.Get(thumbnailSettings.ConnectionStringName));
LazyCoreDbContext = new Lazy<CoreDbContext>(() => coredbContextManager.Get(thumbnailSettings.ConnectionStringName));
@ -112,13 +112,13 @@ namespace ASC.Files.ThumbnailBuilder
)
.GroupBy(r => r.tariff.Tenant)
.Select(r => new { tenant = r.Key, stamp = r.Max(b => b.tariff.Stamp) })
.Where(r=> r.stamp > DateTime.UtcNow);
result = search.Select(r=> r.tenant).ToArray();
cache.Insert(cacheKey, result, DateTime.UtcNow.AddHours(1));
return result;
.Where(r => r.stamp > DateTime.UtcNow);
result = search.Select(r => r.tenant).ToArray();
cache.Insert(cacheKey, result, DateTime.UtcNow.AddHours(1));
return result;
}
private IEnumerable<FileData<int>> GetFileData(Expression<Func<DbFile, bool>> where)

View File

@ -25,25 +25,22 @@ namespace ASC.Files.ThumbnailBuilder
[Singletone]
public class ThumbnailSettings
{
public ThumbnailSettings()
{
}
public ThumbnailSettings(ConfigurationExtension configuration)
public static ThumbnailSettings GetInstance(ConfigurationExtension configuration)
{
var result = new ThumbnailSettings();
var cfg = configuration.GetSetting<ThumbnailSettings>("thumbnail");
ServerRoot = cfg.ServerRoot ?? "http://localhost/";
LaunchFrequency = cfg.LaunchFrequency != 0 ? cfg.LaunchFrequency : 1;
ConnectionStringName = cfg.ConnectionStringName ?? "default";
Formats = cfg.Formats ?? ".pptx|.pptm|.ppt|.ppsx|.ppsm|.pps|.potx|.potm|.pot|.odp|.fodp|.otp|.gslides|.xlsx|.xlsm|.xls|.xltx|.xltm|.xlt|.ods|.fods|.ots|.gsheet|.csv|.docx|.docm|.doc|.dotx|.dotm|.dot|.odt|.fodt|.ott|.gdoc|.txt|.rtf|.mht|.html|.htm|.fb2|.epub|.pdf|.djvu|.xps|.bmp|.jpeg|.jpg|.png|.gif|.tiff|.tif|.ico";
SqlMaxResults = cfg.SqlMaxResults != 0 ? cfg.SqlMaxResults : 1000;
MaxDegreeOfParallelism = cfg.MaxDegreeOfParallelism != 0 ? cfg.MaxDegreeOfParallelism : 10;
AvailableFileSize = cfg.AvailableFileSize ?? 100L * 1024L * 1024L;
AttemptsLimit = cfg.AttemptsLimit ?? 3;
AttemptWaitInterval = cfg.AttemptWaitInterval != 0 ? cfg.AttemptWaitInterval : 1000;
ThumbnaillHeight = cfg.ThumbnaillHeight != 0 ? cfg.ThumbnaillHeight : 128;
ThumbnaillWidth = cfg.ThumbnaillWidth != 0 ? cfg.ThumbnaillWidth : 192;
result.ServerRoot = cfg.ServerRoot ?? "http://localhost/";
result.LaunchFrequency = cfg.LaunchFrequency != 0 ? cfg.LaunchFrequency : 1;
result.ConnectionStringName = cfg.ConnectionStringName ?? "default";
result.Formats = cfg.Formats ?? ".pptx|.pptm|.ppt|.ppsx|.ppsm|.pps|.potx|.potm|.pot|.odp|.fodp|.otp|.gslides|.xlsx|.xlsm|.xls|.xltx|.xltm|.xlt|.ods|.fods|.ots|.gsheet|.csv|.docx|.docm|.doc|.dotx|.dotm|.dot|.odt|.fodt|.ott|.gdoc|.txt|.rtf|.mht|.html|.htm|.fb2|.epub|.pdf|.djvu|.xps|.bmp|.jpeg|.jpg|.png|.gif|.tiff|.tif|.ico";
result.SqlMaxResults = cfg.SqlMaxResults != 0 ? cfg.SqlMaxResults : 1000;
result.MaxDegreeOfParallelism = cfg.MaxDegreeOfParallelism != 0 ? cfg.MaxDegreeOfParallelism : 10;
result.AvailableFileSize = cfg.AvailableFileSize ?? 100L * 1024L * 1024L;
result.AttemptsLimit = cfg.AttemptsLimit ?? 3;
result.AttemptWaitInterval = cfg.AttemptWaitInterval != 0 ? cfg.AttemptWaitInterval : 1000;
result.ThumbnaillHeight = cfg.ThumbnaillHeight != 0 ? cfg.ThumbnaillHeight : 128;
result.ThumbnaillWidth = cfg.ThumbnaillWidth != 0 ? cfg.ThumbnaillWidth : 192;
return result;
}
#region worker settings

View File

@ -40,10 +40,10 @@ namespace ASC.Files.ThumbnailBuilder
public Worker(
IServiceProvider serviceProvider,
IOptionsMonitor<ILog> options,
ThumbnailSettings thumbnailSettings)
Common.Utils.ConfigurationExtension configurationExtension)
{
this.serviceProvider = serviceProvider;
this.thumbnailSettings = thumbnailSettings;
this.thumbnailSettings = ThumbnailSettings.GetInstance(configurationExtension);
logger = options.Get("ASC.Files.ThumbnailBuilder");
}
@ -113,7 +113,6 @@ namespace ASC.Files.ThumbnailBuilder
services.TryAdd<FileDataProvider>();
services.TryAdd<BuilderQueue<int>>();
services.TryAdd<Builder<int>>();
services.TryAdd<ThumbnailSettings>();
}
}
}

View File

@ -11,7 +11,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="AppLimit.CloudComputing.SharpBox" Version="1.1.0.456" />
<PackageReference Include="AppLimit.CloudComputing.SharpBox" Version="1.1.0.457" />
<PackageReference Include="Autofac" Version="6.0.0" />
<PackageReference Include="Autofac.Configuration" Version="6.0.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.1.0" />

View File

@ -21,8 +21,6 @@ class ContactField extends React.Component {
}
render() {
console.log("ContactField render");
const {
isDisabled,

View File

@ -66,8 +66,6 @@ class ContactsField extends React.Component {
}
render() {
console.log("ContactsField render");
const {
pattern,
contacts,

View File

@ -9,8 +9,6 @@ class DateField extends React.Component {
}
render() {
console.log("DateField render");
const {
isRequired,
hasError,

View File

@ -16,8 +16,6 @@ class DepartmentField extends React.Component {
};
render() {
console.log("DepartmentField render");
const {
isRequired,
isDisabled,

View File

@ -9,8 +9,6 @@ class EmailField extends React.Component {
}
render() {
console.log("EmailField render");
const {
isRequired,
hasError,

View File

@ -22,7 +22,7 @@ const MainContainer = styled.div`
.departments-field {
position: relative;
margin: 0 0 40px 0;
margin: 0;
max-width: 835px;
.department-add-btn {
@ -47,6 +47,8 @@ const AvatarContainer = styled.div`
const MainFieldsContainer = styled.div`
flex-grow: 1;
${(props) => props.noSelect && NoUserSelect}
margin: ${(props) =>
`0 0 ${props.marginBottom ? props.marginBottom : "40px"} 0`};
`;
export { MainContainer, AvatarContainer, MainFieldsContainer };

View File

@ -1,9 +1,9 @@
import React from "react";
import styled from "styled-components";
import Heading from "@appserver/components/heading";
import PropTypes from "prop-types";
const Container = styled.div`
margin: 0 0 40px 0;
margin: ${(props) => `0 0 ${props.marginBottom} 0`};
max-width: 1024px;
`;
@ -13,10 +13,10 @@ const StyledHeader = styled(Heading)`
`;
const InfoFieldContainer = React.memo((props) => {
const { headerText, children } = props;
const { headerText, children, marginBottom } = props;
return (
<Container>
<Container marginBottom={marginBottom}>
<StyledHeader level={2} size="small">
{headerText}
</StyledHeader>
@ -25,4 +25,11 @@ const InfoFieldContainer = React.memo((props) => {
);
});
InfoFieldContainer.propTypes = {
marginBottom: PropTypes.string,
};
InfoFieldContainer.defaultProps = {
marginBottom: "40px",
};
export default InfoFieldContainer;

View File

@ -11,8 +11,6 @@ class PasswordField extends React.Component {
}
render() {
console.log("PasswordField render");
const {
isRequired,
hasError,

View File

@ -9,8 +9,6 @@ class RadioField extends React.Component {
}
render() {
//console.log("RadioField render");
const {
isRequired,
hasError,

View File

@ -18,8 +18,6 @@ class TextChangeField extends React.Component {
}
render() {
console.log("TextChangeField render");
const {
isRequired,
hasError,

View File

@ -9,8 +9,6 @@ class TextField extends React.Component {
}
render() {
console.log("TextField render");
const {
isRequired,
hasError,

View File

@ -451,6 +451,7 @@ class CreateUserForm extends React.Component {
croppedAvatar,
passwordSettings,
language,
isTabletView,
} = this.props;
const { regDateCaption, userPostCaption, groupCaption } = customNames;
@ -490,7 +491,10 @@ class CreateUserForm extends React.Component {
saveButtonLabel={t("Common:SaveButton")}
/>
</AvatarContainer>
<MainFieldsContainer ref={this.mainFieldsContainerRef}>
<MainFieldsContainer
ref={this.mainFieldsContainerRef}
{...(!isTabletView && { marginBottom: "32px" })}
>
<TextField
isRequired={true}
hasError={errors.firstName}
@ -638,7 +642,10 @@ class CreateUserForm extends React.Component {
/>
</MainFieldsContainer>
</MainContainer>
<InfoFieldContainer headerText={t("Translations:Comments")}>
<InfoFieldContainer
headerText={t("Translations:Comments")}
marginBottom={"42px"}
>
<Textarea
placeholder={t("WriteComment")}
name="notes"
@ -648,7 +655,10 @@ class CreateUserForm extends React.Component {
tabIndex={9}
/>
</InfoFieldContainer>
<InfoFieldContainer headerText={t("ContactInformation")}>
<InfoFieldContainer
headerText={t("ContactInformation")}
marginBottom={"42px"}
>
<ContactsField
pattern={pattern.contact}
contacts={contacts.contact}
@ -660,7 +670,10 @@ class CreateUserForm extends React.Component {
onItemRemove={this.onContactsItemRemove}
/>
</InfoFieldContainer>
<InfoFieldContainer headerText={t("Translations:SocialProfiles")}>
<InfoFieldContainer
headerText={t("Translations:SocialProfiles")}
{...(isTabletView && { marginBottom: "36px" })}
>
<ContactsField
pattern={pattern.social}
contacts={contacts.social}
@ -718,6 +731,7 @@ export default withRouter(
updateProfileInUsers: peopleStore.usersStore.updateProfileInUsers,
updateCreatedAvatar: peopleStore.targetUserStore.updateCreatedAvatar,
userFormValidation: auth.settingsStore.userFormValidation,
isTabletView: auth.settingsStore.isTabletView,
}))(
observer(
withTranslation(["ProfileAction", "Common", "Translations"])(

View File

@ -499,7 +499,6 @@ class UpdateUserForm extends React.Component {
this.setState({ isLoading: true });
const { profile, setAvatarMax, personal } = this.props;
console.log("profile", profile);
if (isUpdate) {
createThumbnailsAvatar(profile.id, {
x: Math.round(result.x * avatar.defaultWidth - result.width / 2),
@ -622,6 +621,7 @@ class UpdateUserForm extends React.Component {
isSelf,
language,
personal,
isTabletView,
} = this.props;
const {
guestCaption,
@ -727,7 +727,6 @@ class UpdateUserForm extends React.Component {
source={this.props.avatarMax || profile.avatarMax}
userName={profile.displayName}
editing={true}
editLabel={t("Common:EditAvatar")}
editAction={
isMobile ? this.openAvatarEditorPage : this.openAvatarEditor
}
@ -752,7 +751,11 @@ class UpdateUserForm extends React.Component {
saveButtonLoading={this.state.isLoading}
/>
</AvatarContainer>
<MainFieldsContainer ref={this.mainFieldsContainerRef} noSelect>
<MainFieldsContainer
ref={this.mainFieldsContainerRef}
noSelect
{...(!isTabletView && { marginBottom: "32px" })}
>
<TextChangeField
labelText={`${t("Common:Email")}:`}
inputName="email"
@ -940,7 +943,10 @@ class UpdateUserForm extends React.Component {
</MainFieldsContainer>
</MainContainer>
{!personal && (
<InfoFieldContainer headerText={t("Translations:Comments")}>
<InfoFieldContainer
headerText={t("Translations:Comments")}
marginBottom={"42px"}
>
<Textarea
placeholder={t("WriteComment")}
name="notes"
@ -951,7 +957,10 @@ class UpdateUserForm extends React.Component {
/>
</InfoFieldContainer>
)}
<InfoFieldContainer headerText={t("ContactInformation")}>
<InfoFieldContainer
headerText={t("ContactInformation")}
marginBottom={"42px"}
>
<ContactsField
pattern={pattern.contact}
contacts={contacts.contact}
@ -963,7 +972,10 @@ class UpdateUserForm extends React.Component {
onItemRemove={this.onContactsItemRemove}
/>
</InfoFieldContainer>
<InfoFieldContainer headerText={t("Translations:SocialProfiles")}>
<InfoFieldContainer
headerText={t("Translations:SocialProfiles")}
{...(isTabletView && { marginBottom: "36px" })}
>
<ContactsField
pattern={pattern.social}
contacts={contacts.social}
@ -1049,6 +1061,7 @@ export default withRouter(
personal: auth.settingsStore.personal,
setUserIsUpdate: auth.userStore.setUserIsUpdate,
userFormValidation: auth.settingsStore.userFormValidation,
isTabletView: auth.settingsStore.isTabletView,
}))(
observer(
withTranslation(["ProfileAction", "Common", "Translations"])(

View File

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M2 15.0004C1.44772 15.0004 0.996289 14.5511 1.03517 14.0002C1.52467 7.06536 7.065 1.52504 13.9999 1.03554C14.5508 0.996655 15 1.44808 15 2.00037V3.50198C15 4.05426 14.551 4.49699 14.0012 4.54936C9.06535 5.01959 5.02631 8.93795 4.55257 14.0013C4.50112 14.5512 4.0584 15.0004 3.50611 15.0004H2ZM7.99968 14.9996C7.4474 14.9996 6.99312 14.5497 7.06133 14.0016C7.51185 10.3813 10.3814 7.51179 14.0017 7.06127C14.5497 6.99306 14.9997 7.44733 14.9997 7.99962V13.9996C14.9997 14.5519 14.552 14.9996 13.9997 14.9996H7.99968Z" fill="#657077"/>
</svg>

After

Width:  |  Height:  |  Size: 686 B

View File

@ -0,0 +1,3 @@
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.993754 11.9997C0.44147 11.9997 -0.0105889 11.5505 0.0347815 11C0.515636 5.16648 5.16687 0.515247 11.0004 0.0343924C11.5509 -0.0109779 12.0001 0.441081 12.0001 0.993366V1.99634C12.0001 2.54863 11.5507 2.99053 11.0018 3.05162C6.87942 3.51043 3.51702 6.77606 3.0548 11.0013C2.99475 11.5503 2.55288 11.9997 2.00059 11.9997H0.993754ZM6.13907 11.9992C5.58678 11.9992 5.13141 11.5489 5.21096 11.0024C5.64635 8.01111 8.01178 5.64568 11.003 5.21029C11.5496 5.13074 11.9999 5.58611 11.9999 6.1384V10.9992C11.9999 11.5515 11.5521 11.9992 10.9999 11.9992H6.13907Z" fill="#657077"/>
</svg>

After

Width:  |  Height:  |  Size: 725 B

View File

@ -0,0 +1,20 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 1H16L21 7V23H3V1Z" fill="white"/>
<path d="M21 7L16 1H3V16H2V0H16L22 7V16H21V7Z" fill="#BFBFBF"/>
<path d="M15 8.5H19.5V12.5H4.5V3.5H14.5V8V8.5H15Z" fill="#F2F2F2" stroke="#BFBFBF"/>
<path d="M4 9L5 8V12L4 13V9Z" fill="white"/>
<path d="M8.77302 6.21967C9.06582 5.92678 9.54072 5.92678 9.83362 6.21967L10.8943 7.28033C11.1872 7.57322 11.1872 8.0481 10.8943 8.34099L6.82843 12.4069L4 13.114L4.70711 10.2855L8.77302 6.21967Z" fill="#A6A6A6"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.50811 8.13875L8.09391 9.55296C7.70338 9.94349 7.07022 9.94349 6.67969 9.55296L8.80101 7.43164L9.50811 8.13875Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1797 9.43164L7.67969 6.93164L8.17969 6.43164L10.6797 8.93164L10.1797 9.43164Z" fill="white"/>
<path opacity="0.3" d="M14 9V1H15V8H21V9H14Z" fill="black"/>
<path d="M21 15H3C2.44772 15 2 15.4477 2 16V23C2 23.5523 2.44772 24 3 24H21C21.5523 24 22 23.5523 22 23V16C22 15.4477 21.5523 15 21 15Z" fill="#007267"/>
<path d="M19 22L19 17H20H21V18L20 18V19L21 19V20H20L20 22H19Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 17.5V21.5V22H3.5H5V21H6V18H5V17H3.5H3V17.5ZM5 21V18H4V21H5Z" fill="white"/>
<rect x="5" y="17" width="1" height="1" fill="white"/>
<rect x="5" y="21" width="1" height="1" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.5 17H13.5V17.5H14V19H13V18H12V21H13V20H14V21.5H13.5V22H11.5V21.5H11V17.5H11.5V17Z" fill="white"/>
<path d="M5.5 17.5H6V17H5.5V17.5Z" fill="#007267"/>
<path d="M5.5 22H6V21.5H5.5V22Z" fill="#007267"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 17.5V21.5H7.5V22H9.5V21.5H10V17.5H9.5V17H7.5V17.5L7 17.5ZM9 21V18L8 18V21H9Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 17H16V18H15V17ZM17 18H16V21H15V22H16V21H17V22H18V21H17V18ZM17 18V17H18V18H17Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,14 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 1H16L21 7V23H3V1Z" fill="white"/>
<path d="M21 7L16 1H3V16H2V0H16L22 7V16H21V7Z" fill="#BFBFBF"/>
<path d="M15 8.5H19.5V12.5H4.5V3.5H14.5V8V8.5H15Z" fill="#F2F2F2" stroke="#BFBFBF"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M9 5V6L8 6V10H9V11H8L7.5 10.5L7 11H6V10H7V6L6 6V5H7L7.5 5.5L8 5H9Z" fill="#888888"/>
<path opacity="0.3" d="M14 9V1H15V8H21V9H14Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 17H16V18H15V17ZM17 18H16V21H15V22H16V21H17V22H18V21H17V18ZM17 18V17H18V18H17Z" fill="white"/>
<rect x="2" y="15" width="20" height="9" rx="1" fill="#2CA498"/>
<path d="M18 17V22H19V19L19.5 20L20 19V22H21V17H20L19.5 18L19 17H18Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 17.5V21.5H3.5V22H5.5V21.5H6V17.5H5.5V17H3.5V17.5L3 17.5ZM5 21V18L4 18V21H5Z" fill="white"/>
<path d="M7 22L7 17H8H9V18L8 18V19L9 19V20H8L8 22H7Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 21.5V17.5L10.5 17.5V17H12.5V17.5H13V21.5H12.5V22H10.5V21.5H10ZM12 18H11V21H12V18Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 17L14 22H15L15 20.5L16.5 22H17V21L16 20H17V17.5L16.5 17H14ZM16 18H15V19H16V18Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,46 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="32x32">
<g id="32X32 / Docf2">
<path id="background" d="M4.25 1L20.25 1L28.25 9V31H4.25V1Z" fill="white"/>
<path id="shadow" fill-rule="evenodd" clip-rule="evenodd" d="M4.25 31H28.25V9.5L19.75 1H4.25V31ZM20.25 0H3.25V32H29.25V9L20.25 0Z" fill="url(#paint0_linear_1467:7143)"/>
<g id="Group 78">
<path id="Rectangle 396" d="M6.25 4H18.25V11H25.25V17H6.25V4Z" fill="#F2F2F2"/>
<path id="Rectangle 398 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M6.25 3H19.25V10H26.25V17H6.25L7.25 16H25.25V11H18.25V4H7.25V9L6.25 10V3Z" fill="#BFBFBF"/>
<rect id="Rectangle 397" x="10.25" y="13.5" width="1" height="0.5" fill="#F2F2F2"/>
</g>
<path id="ear shadow" opacity="0.3" d="M18.25 11V1H19.25V10H28.25V11H18.25Z" fill="black"/>
<rect id="Rectangle 380" x="6.25" y="20" width="20" height="9" rx="1" fill="#007267"/>
<g id="Group 135">
<path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M7.25 22.5V26.5V27H7.75H9.25V26H10.25V23H9.25V22H7.75L7.25 22V22.5ZM9.25 26V23L8.25 23V26L9.25 26Z" fill="white"/>
<path id="Union_2" d="M22.25 27L22.25 22H23.25H25.25V23L23.25 23V24L24.25 24V25H23.25L23.25 27H22.25Z" fill="white"/>
<path id="Exclude" fill-rule="evenodd" clip-rule="evenodd" d="M11.25 26V23H12.25V22H13.25V23H14.25V26H13.25V27H12.25V26H11.25ZM13.25 23H12.25V26H13.25V23Z" fill="white"/>
<path id="Union_3" fill-rule="evenodd" clip-rule="evenodd" d="M16.25 22H17.25V23H16.25V22ZM16.25 26V23H15.25V26H16.25ZM16.25 26V27H17.25V26H16.25Z" fill="white"/>
<path id="Rectangle 411" opacity="0.4" d="M15.25 26H16.25V27H15.25V26Z" fill="white"/>
<path id="Rectangle 413" opacity="0.4" d="M9.25 26H10.25V27H9.25V26Z" fill="white"/>
<path id="Rectangle 415" opacity="0.4" d="M11.25 26H12.25V27H11.25V26Z" fill="white"/>
<path id="Rectangle 417" opacity="0.4" d="M13.25 26H14.25V27H13.25V26Z" fill="white"/>
<path id="Rectangle 412" opacity="0.4" d="M15.25 22H16.25V23H15.25V22Z" fill="white"/>
<path id="Rectangle 414" opacity="0.4" d="M9.25 22H10.25V23H9.25V22Z" fill="white"/>
<path id="Rectangle 416" opacity="0.4" d="M11.25 22H12.25V23H11.25V22Z" fill="white"/>
<path id="Rectangle 419" opacity="0.55" d="M18.25 23H19.25V24H18.25V23Z" fill="white"/>
<path id="Rectangle 421" opacity="0.55" d="M18.25 25H19.25V26H18.25V25Z" fill="white"/>
<path id="Rectangle 420" opacity="0.55" d="M20.25 23H21.25V24H20.25V23Z" fill="white"/>
<path id="Rectangle 422" opacity="0.55" d="M20.25 25H21.25V26H20.25V25Z" fill="white"/>
<path id="Rectangle 423" opacity="0.4" d="M24.25 24H25.25V25H24.25V24Z" fill="white"/>
<path id="Rectangle 418" opacity="0.4" d="M13.25 22H14.25V23H13.25V22Z" fill="white"/>
<path id="Union_4" fill-rule="evenodd" clip-rule="evenodd" d="M18.25 22H19.25V23H18.25V22ZM20.25 23H19.25V26H18.25V27H19.25V26H20.25V27H21.25V26H20.25V23ZM20.25 23V22H21.25V23H20.25Z" fill="white"/>
</g>
</g>
<g id="Group 40456">
<path id="Union_5" d="M13.027 7.7068C13.4175 7.31628 14.0507 7.31628 14.4412 7.7068L15.8554 9.12102C16.2459 9.51154 16.2459 10.1447 15.8554 10.5352L9.84499 16.5456L6.66301 16.8992L7.01656 13.7172L13.027 7.7068Z" fill="#A6A6A6"/>
<path id="Line 32 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M13.0269 10.5352L10.1985 13.3637C9.80798 13.7542 9.17481 13.7542 8.78429 13.3637L12.3198 9.82812L13.0269 10.5352Z" fill="white"/>
<path id="Line 33 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M14.4411 11.9496L11.6127 9.12117L12.3198 8.41406L15.1483 11.2425L14.4411 11.9496Z" fill="white"/>
</g>
</g>
<defs>
<linearGradient id="paint0_linear_1467:7143" x1="16.25" y1="0" x2="16.25" y2="32" gradientUnits="userSpaceOnUse">
<stop stop-color="#DADADA"/>
<stop offset="1" stop-color="#828282"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -0,0 +1,27 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="32X32 / html">
<path id="background" d="M4 1L19 1L28 9V31H4V1Z" fill="white"/>
<path id="shadow" fill-rule="evenodd" clip-rule="evenodd" d="M4 31H28V9L19 1L4.08333 1.06667L4 31ZM19 0H3V32H29V9L19 0Z" fill="url(#paint0_linear_1355:8104)"/>
<g id="Group 78">
<path id="Rectangle 287" d="M19 10.5H25.5V16.5H6.5V4.5H18.5V10V10.5H19Z" fill="#F2F2F2" stroke="#BFBFBF"/>
<path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M12 7V8L11 8V13H12V14H11H10H9V13H10V8L9 8V7H12Z" fill="#888888"/>
<rect id="Rectangle 396" x="10" y="7" width="1" height="0.5" fill="#F2F2F2"/>
<rect id="Rectangle 397" x="10" y="13.5" width="1" height="0.5" fill="#F2F2F2"/>
</g>
<path id="ear shadow" opacity="0.3" d="M18 11V1H18.9091V10H28V11H18Z" fill="black"/>
<g id="Group 135">
<rect id="Rectangle 380" x="6" y="20" width="20" height="9" rx="1" fill="#2CA498"/>
<path id="Union_2" d="M22 22V27H23V24L23.5 25L24 24V27H25V22H24L23.5 23L23 22H22Z" fill="white"/>
<path id="Union_3" fill-rule="evenodd" clip-rule="evenodd" d="M7 22.5V26.5H7.5V27H9.5V26.5H10V22.5H9.5V22H7.5V22.5L7 22.5ZM9 26V23L8 23V26H9Z" fill="white"/>
<path id="Union_4" d="M11 27L11 22H12H13V23L12 23V24L13 24V25H12L12 27H11Z" fill="white"/>
<path id="Exclude" fill-rule="evenodd" clip-rule="evenodd" d="M14 26.5V22.5L14.5 22.5V22H16.5V22.5H17V26.5H16.5V27H14.5V26.5H14ZM16 23H15V26H16V23Z" fill="white"/>
<path id="Union_5" fill-rule="evenodd" clip-rule="evenodd" d="M18 22L18 27H19L19 25.5L20.5 27H21V26L20 25H21V22.5L20.5 22H18ZM20 23H19V24H20V23Z" fill="white"/>
</g>
</g>
<defs>
<linearGradient id="paint0_linear_1355:8104" x1="16" y1="0" x2="16" y2="32" gradientUnits="userSpaceOnUse">
<stop stop-color="#DADADA"/>
<stop offset="1" stop-color="#828282"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,34 @@
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="64x64/ Docf">
<g id="Group 110">
<path id="Rectangle 383" d="M6.25 0H32.25H39.8333L58.25 18.5V64H6.25V0Z" fill="white"/>
<path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M39.8333 0L58.25 18.5V64H6.25V0H39.8333ZM7.25 63V1H39.2541L57.25 19V63H7.25Z" fill="url(#paint0_linear_1467:7570)"/>
<path id="Rectangle 405" d="M11.25 7H39.25V20H53.25V35H11.25V24.9242V23.3239V11.4811V7Z" fill="#F2F2F2"/>
<g id="Frame 160">
<rect x="10.25" y="39" width="43" height="19" rx="2" fill="#007267"/>
<g id="DOCXF">
<path d="M21.3338 48.4252C21.3338 49.8645 20.9328 50.9668 20.1308 51.7322C19.3327 52.4977 18.1783 53 16.6677 53H14.25V44H16.9305C18.3243 44 19.4066 44.5143 20.1775 45.2678C20.9484 46.0213 21.3338 47.0738 21.3338 48.4252ZM19.4534 48.4731C19.4534 46.5953 18.6436 45.6565 17.024 45.6565H16.0604V51.3495H16.8371C18.5813 51.3495 19.4534 50.3907 19.4534 48.4731Z" fill="white"/>
<path d="M30.1353 48.497C30.1353 49.9442 29.7849 51.0565 29.0841 51.8339C28.3833 52.6113 27.3788 53 26.0707 53C24.7625 53 23.7581 52.6113 23.0573 51.8339C22.3565 51.0565 22.0061 49.9402 22.0061 48.485C22.0061 47.0299 22.3565 45.9196 23.0573 45.1542C23.762 44.3847 24.7703 44 26.0824 44C27.3944 44 28.3969 44.3867 29.0899 45.1601C29.7868 45.9336 30.1353 47.0458 30.1353 48.497ZM23.9041 48.497C23.9041 49.4738 24.0851 50.2093 24.4472 50.7037C24.8093 51.198 25.3504 51.4452 26.0707 51.4452C27.5151 51.4452 28.2373 50.4625 28.2373 48.497C28.2373 46.5276 27.519 45.5429 26.0824 45.5429C25.3621 45.5429 24.819 45.792 24.453 46.2904C24.0871 46.7847 23.9041 47.5203 23.9041 48.497Z" fill="white"/>
<path d="M34.8137 45.5548C34.1324 45.5548 33.6049 45.8179 33.2311 46.3442C32.8574 46.8664 32.6705 47.596 32.6705 48.5329C32.6705 50.4824 33.3849 51.4571 34.8137 51.4571C35.4133 51.4571 36.1394 51.3037 36.992 50.9967V52.5515C36.2912 52.8505 35.5087 53 34.6444 53C33.4024 53 32.4524 52.6153 31.7945 51.8458C31.1365 51.0724 30.8075 49.9641 30.8075 48.5209C30.8075 47.612 30.9691 46.8166 31.2923 46.1349C31.6154 45.4492 32.0787 44.9249 32.6822 44.5621C33.2895 44.1953 34 44.012 34.8137 44.012C35.643 44.012 36.4761 44.2173 37.3132 44.6279L36.7292 46.1349C36.41 45.9794 36.0888 45.8439 35.7656 45.7282C35.4425 45.6126 35.1252 45.5548 34.8137 45.5548Z" fill="white"/>
<path d="M44.9992 52.8804H42.9319L40.9463 49.5734L38.9608 52.8804H37.0219L39.8543 48.3714L37.2029 44.1375H39.2002L41.0398 47.2831L42.8443 44.1375H44.7948L42.1143 48.4731L44.9992 52.8804Z" fill="white"/>
<path d="M46.9431 53H45.25V44H50.25V45.6565H46.9431V47.911H50.0339V49.4239H46.9431V53Z" fill="white"/>
</g>
</g>
<g id="Group 78">
<path id="Rectangle 287 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M53.25 35L10.25 34.9951L11.25 34H52.25V20H38.25V8H11.25L11.2373 20.0007L10.2373 21.0064L10.25 7H39.25V19H53.25V35Z" fill="#BFBFBF"/>
</g>
<path id="Union_2" fill-rule="evenodd" clip-rule="evenodd" d="M38.2539 0L38.2539 19.999H58.25V19H39.25V0H38.2539Z" fill="black" fill-opacity="0.35"/>
<g id="Group 40456">
<path id="Union_3" d="M22.8078 16.4429C23.5889 15.6619 24.8552 15.6619 25.6363 16.4429L28.4647 19.2713C29.2457 20.0524 29.2457 21.3187 28.4647 22.0998L17.1513 33.4131L10.5625 34.3086L11.4945 27.7563L22.8078 16.4429Z" fill="#A6A6A6"/>
<path id="Line 32 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M22.8078 22.0998L19.0365 25.871C17.9951 26.9124 16.5177 27.1234 15.7367 26.3424L21.3936 20.6855L22.8078 22.0998Z" fill="white"/>
<path id="Line 33 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M25.6362 24.9285L19.9793 19.2716L21.3936 17.8574L27.0504 23.5143L25.6362 24.9285Z" fill="white"/>
</g>
</g>
</g>
<defs>
<linearGradient id="paint0_linear_1467:7570" x1="32.25" y1="-1" x2="32.25" y2="64" gradientUnits="userSpaceOnUse">
<stop stop-color="#DADADA"/>
<stop offset="1" stop-color="#828282"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -0,0 +1,31 @@
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="64X64 / OFORM">
<path id="background" d="M7 1H38L57 20V63H7V1Z" fill="white"/>
<g id="Group 78">
<path id="Rectangle 287" d="M38 19.5H53.5V32.5H10.5V7.5H37.5V19V19.5H38Z" fill="#F2F2F2" stroke="#BFBFBF"/>
<g id="Group 137">
<rect id="Rectangle 398" x="16" y="13" width="3" height="1" fill="#888888"/>
<rect id="Rectangle 399" x="20" y="13" width="2.625" height="1" fill="#888888"/>
<rect id="Rectangle 400" x="16" y="26" width="3" height="1" fill="#888888"/>
<rect id="Rectangle 401" x="20" y="26" width="2.625" height="1" fill="#888888"/>
<rect id="Rectangle 402" width="12" height="1" transform="matrix(-4.37114e-08 1 1 4.37114e-08 19 14)" fill="#888888"/>
</g>
</g>
<path id="shadow" fill-rule="evenodd" clip-rule="evenodd" d="M7 63H57V20L38 1H7V63ZM38 0H6V64H58V20L38 0Z" fill="url(#paint0_linear_1357:6948)"/>
<rect id="Rectangle 389" x="10" y="39" width="44" height="20" rx="2" fill="#2CA498"/>
<g id="Group 130">
<path id="OFORM" d="M22.6 53H21V45H26V46.5H22.6V48.5H26V50H22.6V53Z" fill="white"/>
<path id="OFORM_2" d="M37.5 48.5721H38.0133C38.5288 48.5721 38.9092 48.4853 39.1546 48.3116C39.4001 48.138 39.5228 47.8651 39.5228 47.493C39.5228 47.1245 39.3966 46.8622 39.1441 46.7063C38.8952 46.5504 38.5077 46.4724 37.9818 46.4724H37.5V48.5721ZM37.5 50.1429V53H36V45H38.0975C39.1424 45 39.9155 45.3154 40.4169 45.7017C40.9183 46.0844 41.169 46.6673 41.169 47.4505C41.169 47.9076 41.0445 48.3152 40.7956 48.6731C40.5466 49.0275 40.1942 49.3056 39.7384 49.5076C40.8955 51.2547 41.6494 52.4897 42 53H40.1907L38.2022 50.1429H37.5Z" fill="white"/>
<path id="OFORM_3" d="M46.5751 53L44.7668 47.2857C44.7572 47.2857 44.7668 52.6911 44.7668 53H43V45H45.4299L47.4793 51.2857L49.5701 45H52V53H50.3359C50.3359 51.8043 50.4253 46.7366 50.4016 47.2857L48.3834 53H46.5751Z" fill="white"/>
<path id="OFORM_4" d="M19.9333 48.9464C19.9333 50.3132 19.5914 51.3637 18.9075 52.0979C18.2236 52.8321 17.2433 53.1992 15.9667 53.1992C14.69 53.1992 13.7098 52.8321 13.0259 52.0979C12.342 51.3637 12 50.3094 12 48.9351C12 47.5608 12.342 46.5122 13.0259 45.7893C13.7136 45.0626 14.6976 44.6992 15.9781 44.6992C17.2585 44.6992 18.2369 45.0644 18.9132 45.7949C19.5933 46.5254 19.9333 47.5759 19.9333 48.9464ZM13.8523 48.9464C13.8523 49.8689 14.0289 50.5636 14.3823 51.0304C14.7356 51.4973 15.2638 51.7308 15.9667 51.7308C17.3763 51.7308 18.0811 50.8027 18.0811 48.9464C18.0811 47.0864 17.3801 46.1564 15.9781 46.1564C15.2752 46.1564 14.7451 46.3917 14.388 46.8623C14.0308 47.3292 13.8523 48.0239 13.8523 48.9464Z" fill="white"/>
<path id="OFORM_5" d="M34.9333 48.9464C34.9333 50.3132 34.5914 51.3637 33.9075 52.0979C33.2236 52.8321 32.2433 53.1992 30.9667 53.1992C29.69 53.1992 28.7098 52.8321 28.0259 52.0979C27.342 51.3637 27 50.3094 27 48.9351C27 47.5608 27.342 46.5122 28.0259 45.7893C28.7136 45.0626 29.6976 44.6992 30.9781 44.6992C32.2585 44.6992 33.2369 45.0644 33.9132 45.7949C34.5933 46.5254 34.9333 47.5759 34.9333 48.9464ZM28.8523 48.9464C28.8523 49.8689 29.0289 50.5636 29.3823 51.0304C29.7356 51.4973 30.2638 51.7308 30.9667 51.7308C32.3763 51.7308 33.0811 50.8027 33.0811 48.9464C33.0811 47.0864 32.3801 46.1564 30.9781 46.1564C30.2752 46.1564 29.7451 46.3917 29.388 46.8623C29.0308 47.3292 28.8523 48.0239 28.8523 48.9464Z" fill="white"/>
</g>
<path id="ear shadow" opacity="0.3" d="M37 20V1H38V19H57L58 20H37Z" fill="black"/>
</g>
<defs>
<linearGradient id="paint0_linear_1357:6948" x1="32" y1="0" x2="32" y2="64" gradientUnits="userSpaceOnUse">
<stop stop-color="#DADADA"/>
<stop offset="1" stop-color="#828282"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,33 @@
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="96X96 / Docf" clip-path="url(#clip0_1467:7569)">
<path id="background" d="M10.25 1H57.25L86.25 30V95H10.25V1Z" fill="white"/>
<path id="shadow" fill-rule="evenodd" clip-rule="evenodd" d="M10.25 95H86.25V30L57.25 1H10.25V95ZM57.25 0H9.25V96H87.25V30L57.25 0Z" fill="url(#paint0_linear_1467:7569)"/>
<rect id="Rectangle 389" x="15.25" y="58" width="66" height="31" rx="2" fill="#007267"/>
<g id="DOCXF">
<path d="M31.8757 73.3879C31.8757 75.5467 31.2742 77.2002 30.0712 78.3483C28.874 79.4965 27.1425 80.25 24.8766 80.25H21.25V66.75H25.2708C27.3615 66.75 28.985 67.5214 30.1413 68.6517C31.2976 69.7819 31.8757 71.3606 31.8757 73.3879ZM29.055 73.4596C29.055 70.643 27.8403 69.2347 25.4109 69.2347H23.9656V77.7743H25.1306C27.7469 77.7743 29.055 76.336 29.055 73.4596Z" fill="white"/>
<path d="M45.0779 73.4955C45.0779 75.6663 44.5523 77.3347 43.5011 78.5008C42.4499 79.6669 40.9432 80.25 38.981 80.25C37.0188 80.25 35.5121 79.6669 34.4609 78.5008C33.4097 77.3347 32.8841 75.6603 32.8841 73.4776C32.8841 71.2949 33.4097 69.6294 34.4609 68.4812C35.5179 67.3271 37.0305 66.75 38.9985 66.75C40.9666 66.75 42.4704 67.3301 43.5099 68.4902C44.5552 69.6503 45.0779 71.3188 45.0779 73.4955ZM35.7311 73.4955C35.7311 74.9606 36.0027 76.064 36.5458 76.8055C37.0889 77.547 37.9006 77.9178 38.981 77.9178C41.1476 77.9178 42.2309 76.4437 42.2309 73.4955C42.2309 70.5414 41.1535 69.0643 38.9985 69.0643C37.9181 69.0643 37.1035 69.438 36.5545 70.1855C36.0056 70.9271 35.7311 72.0304 35.7311 73.4955Z" fill="white"/>
<path d="M52.0956 69.0822C51.0736 69.0822 50.2823 69.4769 49.7217 70.2663C49.161 71.0497 48.8807 72.144 48.8807 73.5493C48.8807 76.4736 49.9523 77.9357 52.0956 77.9357C52.9949 77.9357 54.0841 77.7055 55.363 77.245V79.5772C54.3118 80.0257 53.138 80.25 51.8415 80.25C49.9786 80.25 48.5537 79.6729 47.5667 78.5188C46.5798 77.3586 46.0863 75.6962 46.0863 73.5314C46.0863 72.1679 46.3287 70.9749 46.8134 69.9523C47.2981 68.9238 47.993 68.1374 48.8982 67.5932C49.8093 67.043 50.875 66.7679 52.0956 66.7679C53.3395 66.7679 54.5892 67.0759 55.8448 67.6919L54.9688 69.9523C54.4899 69.7191 54.0081 69.5158 53.5234 69.3424C53.0387 69.1689 52.5628 69.0822 52.0956 69.0822Z" fill="white"/>
<path d="M67.3738 80.0706H64.2728L61.2945 75.1101L58.3161 80.0706H55.4079L59.6564 73.3071L55.6794 66.9563H58.6753L61.4346 71.6746L64.1414 66.9563H67.0672L63.0465 73.4596L67.3738 80.0706Z" fill="white"/>
<path d="M70.2897 80.25H67.75V66.75H75.25V69.2347H70.2897V72.6164H74.9259V74.8859H70.2897V80.25Z" fill="white"/>
</g>
<g id="Group 40457">
<path id="Rectangle 405" d="M17.25 11H56.25V30H80.25V48H17.25V37.8864V35.4858V17.7216V11Z" fill="#F2F2F2"/>
<path id="Rectangle 287 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M81.25 49L16.75 48.9926L18.25 48H80.25V30H56.25V11H17.25V29.8909L16.25 30.9788V10H57.25V29H81.25V49Z" fill="#BFBFBF"/>
</g>
<g id="Group 40456">
<path id="Union" d="M36.0887 20.9231C37.2603 19.7516 39.1598 19.7516 40.3314 20.9231L44.574 25.1658C45.7456 26.3374 45.7456 28.2369 44.574 29.4084L27.604 46.3785L17.7207 47.7217L19.1187 37.8932L36.0887 20.9231Z" fill="#A6A6A6"/>
<path id="Line 32 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M36.0886 29.4084L30.4318 35.0653C28.8697 36.6274 26.6536 36.944 25.482 35.7724L33.9673 27.2871L36.0886 29.4084Z" fill="white"/>
<path id="Line 33 (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M40.3312 33.6515L31.846 25.1662L33.9673 23.0449L42.4526 31.5302L40.3312 33.6515Z" fill="white"/>
</g>
<path id="ear shadow" opacity="0.3" d="M56.25 30V1H57.25V29H86.25L87.25 30H56.25Z" fill="black"/>
</g>
<defs>
<linearGradient id="paint0_linear_1467:7569" x1="48.25" y1="0" x2="48.25" y2="96" gradientUnits="userSpaceOnUse">
<stop stop-color="#DADADA"/>
<stop offset="1" stop-color="#828282"/>
</linearGradient>
<clipPath id="clip0_1467:7569">
<rect width="96" height="96" fill="white" transform="translate(0.25)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -0,0 +1,34 @@
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="96X96 / OFORM" clip-path="url(#clip0_1357:6951)">
<path id="background" d="M10 1H57L86 30V95H10V1Z" fill="white"/>
<path id="shadow" fill-rule="evenodd" clip-rule="evenodd" d="M10 95H86V30L57 1H10V95ZM57 0H9V96H87V30L57 0Z" fill="url(#paint0_linear_1357:6951)"/>
<rect id="Rectangle 389" x="15" y="58" width="66" height="31" rx="2" fill="#2CA498"/>
<g id="Group 130">
<path id="OFORM" d="M33.48 79.4H31V67H38.75V69.325H33.48V72.425H38.75V74.75H33.48V79.4Z" fill="white"/>
<path id="OFORM_2" d="M56.325 72.5367H57.1207C57.9196 72.5367 58.5092 72.4022 58.8897 72.133C59.2701 71.8639 59.4603 71.4409 59.4603 70.8642C59.4603 70.2929 59.2647 69.8865 58.8734 69.6448C58.4875 69.4031 57.887 69.2823 57.0717 69.2823H56.325V72.5367ZM56.325 74.9714V79.4H54V67H57.2511C58.8707 67 60.069 67.4889 60.8462 68.0876C61.6234 68.6808 62.012 69.5844 62.012 70.7983C62.012 71.5068 61.819 72.1385 61.4332 72.6933C61.0473 73.2426 60.5011 73.6738 59.7946 73.9868C61.588 76.6948 62.7565 78.609 63.3 79.4H60.4957L57.4135 74.9714H56.325Z" fill="white"/>
<path id="OFORM_3" d="M70.5414 79.4L67.7386 70.5429C67.7237 70.5429 67.7386 78.9212 67.7386 79.4H65V67H68.7664L71.9429 76.7429L75.1836 67H78.95V79.4H76.3706C76.3706 77.5467 76.5092 69.6917 76.4725 70.5429L73.3443 79.4H70.5414Z" fill="white"/>
<path id="OFORM_4" d="M29.2967 73.0831C29.2967 75.2016 28.7666 76.8299 27.7066 77.9679C26.6465 79.106 25.1271 79.675 23.1483 79.675C21.1696 79.675 19.6501 79.106 18.5901 77.9679C17.53 76.8299 17 75.1958 17 73.0656C17 70.9354 17.53 69.3101 18.5901 68.1896C19.656 67.0632 21.1813 66.5 23.166 66.5C25.1507 66.5 26.6671 67.0661 27.7154 68.1983C28.7696 69.3305 29.2967 70.9588 29.2967 73.0831ZM19.871 73.0831C19.871 74.513 20.1448 75.5897 20.6925 76.3134C21.2402 77.0371 22.0588 77.3989 23.1483 77.3989C25.3332 77.3989 26.4257 75.9603 26.4257 73.0831C26.4257 70.2001 25.3391 68.7586 23.166 68.7586C22.0765 68.7586 21.255 69.1233 20.7014 69.8528C20.1478 70.5765 19.871 71.6533 19.871 73.0831Z" fill="white"/>
<path id="OFORM_5" d="M52.3435 73.0831C52.3435 75.2016 51.8135 76.8299 50.7535 77.9679C49.6934 79.106 48.174 79.675 46.1952 79.675C44.2164 79.675 42.697 79.106 41.637 77.9679C40.5769 76.8299 40.0469 75.1958 40.0469 73.0656C40.0469 70.9354 40.5769 69.3101 41.637 68.1896C42.7029 67.0632 44.2282 66.5 46.2129 66.5C48.1975 66.5 49.714 67.0661 50.7623 68.1983C51.8165 69.3305 52.3435 70.9588 52.3435 73.0831ZM42.9179 73.0831C42.9179 74.513 43.1917 75.5897 43.7394 76.3134C44.2871 77.0371 45.1057 77.3989 46.1952 77.3989C48.3801 77.3989 49.4726 75.9603 49.4726 73.0831C49.4726 70.2001 48.386 68.7586 46.2129 68.7586C45.1234 68.7586 44.3018 69.1233 43.7482 69.8528C43.1947 70.5765 42.9179 71.6533 42.9179 73.0831Z" fill="white"/>
</g>
<g id="Group 78">
<path id="Rectangle 287" d="M57 29.5H80.5V48.5H15.5V10.5H56.5V29V29.5H57Z" fill="#F2F2F2" stroke="#BFBFBF"/>
<g id="Group 137">
<rect id="Rectangle 398" x="25" y="19" width="4" height="2" fill="#888888"/>
<rect id="Rectangle 399" x="31" y="19" width="4" height="2" fill="#888888"/>
<rect id="Rectangle 400" x="25" y="39" width="4" height="2" fill="#888888"/>
<rect id="Rectangle 401" x="31" y="39" width="4" height="2" fill="#888888"/>
<rect id="Rectangle 402" width="20" height="2" transform="matrix(-4.37114e-08 1 1 4.37114e-08 29 20)" fill="#888888"/>
</g>
</g>
<path id="ear shadow" opacity="0.3" d="M56 30V1H57V29H86L87 30H56Z" fill="black"/>
</g>
<defs>
<linearGradient id="paint0_linear_1357:6951" x1="48" y1="0" x2="48" y2="96" gradientUnits="userSpaceOnUse">
<stop stop-color="#DADADA"/>
<stop offset="1" stop-color="#828282"/>
</linearGradient>
<clipPath id="clip0_1357:6951">
<rect width="96" height="96" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -0,0 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.35866 11.0127L0.366956 14.6494C0.204108 15.2466 0.752062 15.7945 1.34924 15.6317L4.98595 14.64C5.32177 14.5484 5.62787 14.3708 5.87399 14.1247L12.7918 7.20689L8.79177 3.20689L1.87399 10.1247C1.62787 10.3708 1.45024 10.6769 1.35866 11.0127ZM10.2059 1.79264L14.2059 5.79264L14.9985 4.99999C16.103 3.89541 16.103 2.1046 14.9985 1.00006C13.8939 -0.104537 12.103 -0.104507 10.9984 1.00012L10.2059 1.79264Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 572 B

Some files were not shown because too many files have changed in this diff Show More