Merge branch 'release/v1.0.0' of https://github.com/ONLYOFFICE/DocSpace into release/v1.0.0
This commit is contained in:
commit
38028ca481
@ -1,7 +1,7 @@
|
||||
{
|
||||
"ClickHere": "Click here",
|
||||
"ConfirmEmailDescription": "Use the link provided in the activation email. Haven't received an email with the activation link?",
|
||||
"ConfirmEmailHeader": "Please activate your email to get access to the DocSpace features.",
|
||||
"ConfirmEmailHeader": "Please activate your email ({{ email }}) to get access to the DocSpace features.",
|
||||
"RequestActivation": "Request activation once again",
|
||||
"RoomQuotaDescription": "You can archive the unnecessary rooms or <1>{{clickHere}}</1> to find a more suitable pricing plan for your DocSpace.",
|
||||
"RoomQuotaHeader": "The number of rooms is about to be exceeded: {{currentValue}} / {{maxValue}}",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"ClickHere": "Кликните сюда",
|
||||
"ConfirmEmailDescription": "Используйте ссылку, указанную в письме активации. Не получили письмо со ссылкой для активации?",
|
||||
"ConfirmEmailHeader": "Пожалуйста, активируйте свою электронную почту, чтобы получить доступ ко всем функциям DocSpace.",
|
||||
"ConfirmEmailHeader": "Пожалуйста, активируйте свою электронную почту ({{ email }}), чтобы получить доступ ко всем функциям DocSpace.",
|
||||
"RequestActivation": "Запросить активацию еще раз",
|
||||
"RoomQuotaDescription": "Вы можете заархивировать ненужные комнаты или <1>{{clickHere}}</1> , чтобы найти лучший тарифный план для DocSpace.",
|
||||
"RoomQuotaHeader": "Количество комнат скоро будет превышено: {{currentValue}} / {{maxValue}}",
|
||||
|
@ -298,9 +298,9 @@ const ArticleMainButtonContent = (props) => {
|
||||
},
|
||||
];
|
||||
|
||||
const actions = isAccountsPage
|
||||
const addAdmin = isOwner
|
||||
? [
|
||||
isOwner && {
|
||||
{
|
||||
id: "invite_doc-space-administrator",
|
||||
className: "main-button_drop-down",
|
||||
icon: PersonAdminReactSvgUrl,
|
||||
@ -309,6 +309,12 @@ const ArticleMainButtonContent = (props) => {
|
||||
action: EmployeeType.Admin,
|
||||
key: "administrator",
|
||||
},
|
||||
]
|
||||
: [];
|
||||
|
||||
const actions = isAccountsPage
|
||||
? [
|
||||
...addAdmin,
|
||||
{
|
||||
id: "invite_room-admin",
|
||||
className: "main-button_drop-down",
|
||||
|
@ -22,6 +22,7 @@ const Bar = (props) => {
|
||||
firstLoad,
|
||||
|
||||
isAdmin,
|
||||
userEmail,
|
||||
setMaintenanceExist,
|
||||
withActivationBar,
|
||||
sendActivationLink,
|
||||
@ -277,6 +278,7 @@ const Bar = (props) => {
|
||||
/>
|
||||
) : withActivationBar && barVisible.confirmEmail && tReady ? (
|
||||
<ConfirmEmailBar
|
||||
userEmail={userEmail}
|
||||
currentColorScheme={currentColorScheme}
|
||||
onLoad={onLoad}
|
||||
onClick={sendActivationLinkAction}
|
||||
@ -336,5 +338,6 @@ export default inject(({ auth, profileActionsStore }) => {
|
||||
|
||||
currentColorScheme,
|
||||
setMainBarVisible,
|
||||
userEmail: user.email,
|
||||
};
|
||||
})(withTranslation(["Profile", "Common"])(withRouter(observer(Bar))));
|
||||
|
@ -13,11 +13,12 @@ const ConfirmEmailBar = ({
|
||||
onClose,
|
||||
onLoad,
|
||||
currentColorScheme,
|
||||
userEmail,
|
||||
}) => {
|
||||
return (
|
||||
tReady && (
|
||||
<SnackBar
|
||||
headerText={t("ConfirmEmailHeader")}
|
||||
headerText={t("ConfirmEmailHeader", { email: userEmail })}
|
||||
text={
|
||||
<>
|
||||
{t("ConfirmEmailDescription")}{" "}
|
||||
|
@ -213,7 +213,9 @@ const StyledDeleteIcon = styled(DeleteIcon)`
|
||||
|
||||
StyledDeleteIcon.defaultProps = { theme: Base };
|
||||
|
||||
const StyledHelpButton = styled(HelpButton)``;
|
||||
const StyledHelpButton = styled(HelpButton)`
|
||||
margin-right: 8px;
|
||||
`;
|
||||
|
||||
const StyledButtons = styled(Box)`
|
||||
padding: 16px 16px 16px 16px;
|
||||
@ -239,10 +241,6 @@ const StyledToggleButton = styled(ToggleButton)`
|
||||
margin-top: -4px;
|
||||
`;
|
||||
|
||||
const StyledText = styled(Text)`
|
||||
flex-basis: 72%;
|
||||
`;
|
||||
|
||||
export {
|
||||
StyledBlock,
|
||||
StyledHeading,
|
||||
@ -265,6 +263,5 @@ export {
|
||||
ScrollList,
|
||||
StyledAccessSelector,
|
||||
StyledToggleButton,
|
||||
StyledText,
|
||||
StyledDescription,
|
||||
};
|
||||
|
@ -2,6 +2,7 @@
|
||||
import AtReactSvgUrl from "PUBLIC_DIR/images/@.react.svg?url";
|
||||
import React, { useState, useEffect } from "react";
|
||||
import Avatar from "@docspace/components/avatar";
|
||||
import Text from "@docspace/components/text";
|
||||
|
||||
import { parseAddresses } from "@docspace/components/utils/email";
|
||||
import { getAccessOptions } from "../utils";
|
||||
@ -14,7 +15,6 @@ import {
|
||||
StyledCrossIcon,
|
||||
StyledHelpButton,
|
||||
StyledDeleteIcon,
|
||||
StyledText,
|
||||
} from "../StyledInvitePanel";
|
||||
import { filterUserRoleOptions } from "SRC_DIR/helpers/utils";
|
||||
|
||||
@ -114,9 +114,9 @@ const Item = ({
|
||||
|
||||
const displayBody = (
|
||||
<>
|
||||
<StyledText {...textProps} truncate noSelect>
|
||||
<Text {...textProps} truncate noSelect>
|
||||
{inputValue}
|
||||
</StyledText>
|
||||
</Text>
|
||||
{hasError ? (
|
||||
<>
|
||||
<StyledHelpButton
|
||||
|
@ -40,7 +40,7 @@ const StyledContainer = styled.div`
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
|
||||
width: calc(100% + 40px);
|
||||
height: 68px;
|
||||
height: 67px;
|
||||
|
||||
@media ${tablet} {
|
||||
height: 60px;
|
||||
|
@ -214,7 +214,7 @@ const CreateUserForm = (props) => {
|
||||
const { FirstName, LastName, EMail, Serialized } = profile;
|
||||
|
||||
const signupAccount = {
|
||||
EmployeeType: null,
|
||||
EmployeeType: linkData.emplType || null,
|
||||
FirstName: FirstName,
|
||||
LastName: LastName,
|
||||
Email: EMail,
|
||||
@ -287,8 +287,15 @@ const CreateUserForm = (props) => {
|
||||
};
|
||||
|
||||
const onSocialButtonClick = useCallback((e) => {
|
||||
const providerName = e.target.dataset.providername;
|
||||
const url = e.target.dataset.url;
|
||||
const { target } = e;
|
||||
let targetElement = target;
|
||||
|
||||
if (!(targetElement instanceof HTMLButtonElement) && target.parentElement) {
|
||||
targetElement = target.parentElement;
|
||||
}
|
||||
|
||||
const providerName = targetElement.dataset.providername;
|
||||
const url = targetElement.dataset.url || "";
|
||||
|
||||
try {
|
||||
const tokenGetterWin = isDesktop
|
||||
|
@ -91,6 +91,10 @@ const StyledAccountContent = styled.div`
|
||||
.type-combobox {
|
||||
margin-left: -8px;
|
||||
|
||||
.combo-button {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
.backdrop-active {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
@ -22,7 +22,11 @@ const Logo = (props) => {
|
||||
<div>
|
||||
<div className="logo-item">
|
||||
{title && (
|
||||
<Text fontSize="13px" fontWeight="600">
|
||||
<Text
|
||||
fontSize="13px"
|
||||
fontWeight="600"
|
||||
className="settings_unavailable"
|
||||
>
|
||||
{title}
|
||||
</Text>
|
||||
)}
|
||||
|
@ -77,7 +77,7 @@ const PortalDeactivation = (props) => {
|
||||
/>
|
||||
{notActivatedEmail && (
|
||||
<Text fontSize="12px" fontWeight="600">
|
||||
{t("MainBar:ConfirmEmailHeader")}
|
||||
{t("MainBar:ConfirmEmailHeader", { email: owner.email })}
|
||||
<Link
|
||||
className="request-again-link"
|
||||
color={currentColorScheme?.main?.accent}
|
||||
|
@ -89,7 +89,7 @@ const PortalDeletion = (props) => {
|
||||
/>
|
||||
{notActivatedEmail && (
|
||||
<Text fontSize="12px" fontWeight="600">
|
||||
{t("MainBar:ConfirmEmailHeader")}
|
||||
{t("MainBar:ConfirmEmailHeader", { email: owner.email })}
|
||||
<Link
|
||||
className="request-again-link"
|
||||
color={currentColorScheme?.main?.accent}
|
||||
|
@ -136,6 +136,13 @@ class ThirdPartyServices extends React.Component {
|
||||
const { dialogVisible, isLoading } = this.state;
|
||||
const { onModalClose, onModalOpen, setConsumer, onChangeLoading } = this;
|
||||
|
||||
const filteredConsumers = consumers.filter(
|
||||
(consumer) =>
|
||||
consumer.title !== "Bitly" &&
|
||||
consumer.title !== "WordPress" &&
|
||||
consumer.title !== "DocuSign"
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<RootContainer className="RootContainer">
|
||||
@ -162,24 +169,22 @@ class ThirdPartyServices extends React.Component {
|
||||
</Box>
|
||||
|
||||
<div className="consumers-list-container">
|
||||
{consumers
|
||||
.filter((consumer) => consumer.title !== "Bitly")
|
||||
.map((consumer) => (
|
||||
<Box className="consumer-item-wrapper" key={consumer.name}>
|
||||
<ConsumerItem
|
||||
consumer={consumer}
|
||||
dialogVisible={dialogVisible}
|
||||
isLoading={isLoading}
|
||||
onChangeLoading={onChangeLoading}
|
||||
onModalClose={onModalClose}
|
||||
onModalOpen={onModalOpen}
|
||||
setConsumer={setConsumer}
|
||||
updateConsumerProps={updateConsumerProps}
|
||||
t={t}
|
||||
isThirdPartyAvailable={isThirdPartyAvailable}
|
||||
/>
|
||||
</Box>
|
||||
))}
|
||||
{filteredConsumers.map((consumer) => (
|
||||
<Box className="consumer-item-wrapper" key={consumer.name}>
|
||||
<ConsumerItem
|
||||
consumer={consumer}
|
||||
dialogVisible={dialogVisible}
|
||||
isLoading={isLoading}
|
||||
onChangeLoading={onChangeLoading}
|
||||
onModalClose={onModalClose}
|
||||
onModalOpen={onModalOpen}
|
||||
setConsumer={setConsumer}
|
||||
updateConsumerProps={updateConsumerProps}
|
||||
t={t}
|
||||
isThirdPartyAvailable={isThirdPartyAvailable}
|
||||
/>
|
||||
</Box>
|
||||
))}
|
||||
</div>
|
||||
</RootContainer>
|
||||
{dialogVisible && (
|
||||
|
@ -27,6 +27,7 @@ const Header = (props) => {
|
||||
history,
|
||||
isAdmin,
|
||||
isVisitor,
|
||||
isCollaborator,
|
||||
filter,
|
||||
|
||||
setFilter,
|
||||
@ -88,9 +89,9 @@ const Header = (props) => {
|
||||
return (
|
||||
<StyledHeader
|
||||
showContextButton={(isAdmin && !profile?.isOwner) || isMe}
|
||||
isVisitor={isVisitor}
|
||||
isVisitor={isVisitor || isCollaborator}
|
||||
>
|
||||
{!isVisitor && (
|
||||
{!(isVisitor || isCollaborator) && (
|
||||
<IconButton
|
||||
iconName={ArrowPathReactSvgUrl}
|
||||
size="17"
|
||||
@ -131,7 +132,7 @@ export default withRouter(
|
||||
inject(({ auth, peopleStore }) => {
|
||||
const { isAdmin } = auth;
|
||||
|
||||
const { isVisitor } = auth.userStore.user;
|
||||
const { isVisitor, isCollaborator } = auth.userStore.user;
|
||||
|
||||
const { targetUserStore, filterStore } = peopleStore;
|
||||
|
||||
@ -148,6 +149,7 @@ export default withRouter(
|
||||
return {
|
||||
isAdmin,
|
||||
isVisitor,
|
||||
isCollaborator,
|
||||
filter,
|
||||
|
||||
setFilter: setFilterParams,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { makeAutoObservable } from "mobx";
|
||||
import { makeAutoObservable, runInAction } from "mobx";
|
||||
import authStore from "@docspace/common/store/AuthStore";
|
||||
import api from "@docspace/common/api";
|
||||
|
||||
@ -57,7 +57,10 @@ class CommonStore {
|
||||
};
|
||||
|
||||
getGreetingSettingsIsDefault = async () => {
|
||||
this.greetingSettingsIsDefault = await api.settings.getGreetingSettingsIsDefault();
|
||||
const isDefault = await api.settings.getGreetingSettingsIsDefault();
|
||||
runInAction(() => {
|
||||
this.greetingSettingsIsDefault = isDefault;
|
||||
});
|
||||
};
|
||||
|
||||
getWhiteLabelLogoUrls = async () => {
|
||||
|
@ -1156,18 +1156,17 @@ class ContextOptionsStore {
|
||||
if (isRoomsFolder || isArchiveFolder) {
|
||||
const isPinOption = selection.filter((item) => !item.pinned).length > 0;
|
||||
|
||||
const canDelete =
|
||||
selection.findIndex((k) => k.contextOptions.includes("delete")) !== -1;
|
||||
const canDelete = selection.every((k) =>
|
||||
k.contextOptions.includes("delete")
|
||||
);
|
||||
|
||||
const canArchiveRoom =
|
||||
selection.findIndex((k) =>
|
||||
k.contextOptions.includes("archive-room")
|
||||
) !== -1;
|
||||
const canArchiveRoom = selection.every((k) =>
|
||||
k.contextOptions.includes("archive-room")
|
||||
);
|
||||
|
||||
const canRestoreRoom =
|
||||
selection.findIndex((k) =>
|
||||
k.contextOptions.includes("unarchive-room")
|
||||
) !== -1;
|
||||
const canRestoreRoom = selection.every((k) =>
|
||||
k.contextOptions.includes("unarchive-room")
|
||||
);
|
||||
|
||||
let archiveOptions;
|
||||
|
||||
|
@ -1455,9 +1455,9 @@ class FilesActionStore {
|
||||
|
||||
switch (option) {
|
||||
case "copy":
|
||||
const canCopy = selection.map((s) => s.security?.Copy).filter((s) => s);
|
||||
const canCopy = selection.every((s) => s.security?.Copy);
|
||||
|
||||
return hasSelection && canCopy.length > 0;
|
||||
return hasSelection && canCopy;
|
||||
case "showInfo":
|
||||
case "download":
|
||||
return hasSelection;
|
||||
@ -1475,18 +1475,13 @@ class FilesActionStore {
|
||||
|
||||
case "archive":
|
||||
case "unarchive":
|
||||
const canArchive = selection
|
||||
.map((s) => s.security?.Move)
|
||||
.filter((s) => s);
|
||||
const canArchive = selection.every((s) => s.security?.Move);
|
||||
|
||||
return canArchive.length > 0;
|
||||
return canArchive;
|
||||
case "delete-room":
|
||||
const canRemove = selection
|
||||
.map((s) => s.security?.Delete)
|
||||
.filter((r) => r);
|
||||
|
||||
return canRemove.length > 0;
|
||||
const canRemove = selection.every((s) => s.security?.Delete);
|
||||
|
||||
return canRemove;
|
||||
case "delete":
|
||||
const canDelete = selection.every((s) => s.security?.Delete);
|
||||
|
||||
@ -1989,7 +1984,7 @@ class FilesActionStore {
|
||||
.finally(() => setIsLoading(false));
|
||||
} else {
|
||||
if (canConvert) {
|
||||
setConvertItem(item);
|
||||
setConvertItem({ ...item, isOpen: true });
|
||||
setConvertDialogVisible(true);
|
||||
return;
|
||||
}
|
||||
|
@ -1253,7 +1253,9 @@ class FilesStore {
|
||||
(rootFolderType === Rooms || rootFolderType === Archive);
|
||||
|
||||
if (parentId === rootFolderId) {
|
||||
this.isMuteCurrentRoomNotifications = mute;
|
||||
runInAction(() => {
|
||||
this.isMuteCurrentRoomNotifications = mute;
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -94,8 +94,9 @@ class ProfileActionsStore {
|
||||
onProfileClick = () => {
|
||||
//TODO: add check manager
|
||||
const { isAdmin, isOwner } = this.authStore.userStore.user;
|
||||
const { isRoomAdmin } = this.authStore;
|
||||
|
||||
if (isAdmin || isOwner) {
|
||||
if (isAdmin || isOwner || isRoomAdmin) {
|
||||
this.selectedFolderStore.setSelectedFolder(null);
|
||||
this.treeFoldersStore.setSelectedNode(["accounts"]);
|
||||
}
|
||||
|
@ -515,7 +515,7 @@ class UploadDataStore {
|
||||
if (progress === 100) {
|
||||
if (!error) error = data[0].error;
|
||||
|
||||
if (isOpen && data && data[0]) {
|
||||
if (!error && isOpen && data && data[0]) {
|
||||
let tab =
|
||||
!this.authStore.settingsStore.isDesktopClient && fileInfo.fileExst
|
||||
? window.open(
|
||||
|
@ -548,9 +548,13 @@ class SettingsStore {
|
||||
this.currentProductId = currentProductId;
|
||||
};
|
||||
|
||||
setPortalOwner = (owner) => {
|
||||
this.owner = owner;
|
||||
};
|
||||
|
||||
getPortalOwner = async () => {
|
||||
const owner = await api.people.getUserById(this.ownerId);
|
||||
this.owner = owner;
|
||||
this.setPortalOwner(owner);
|
||||
return owner;
|
||||
};
|
||||
|
||||
|
@ -81,6 +81,10 @@ app.use(logger("dev", { stream: winston.stream }));
|
||||
if (IS_DEVELOPMENT) {
|
||||
app.use(devMiddleware);
|
||||
|
||||
app.get("/health", (req, res) => {
|
||||
res.send({ status: "Healthy" });
|
||||
});
|
||||
|
||||
app.get("/doceditor", async (req, res) => {
|
||||
const { i18n, initialEditorState, assets } = req;
|
||||
const userLng = getLanguage(initialEditorState?.user?.cultureName) || "en";
|
||||
@ -147,6 +151,10 @@ if (IS_DEVELOPMENT) {
|
||||
winston.error(e.message);
|
||||
}
|
||||
|
||||
app.get("/health", (req, res) => {
|
||||
res.send({ status: "Healthy" });
|
||||
});
|
||||
|
||||
app.get("/doceditor", async (req, res) => {
|
||||
const { i18n } = req;
|
||||
let initialEditorState;
|
||||
|
@ -51,6 +51,10 @@ app.get("*", async (req: ILoginRequest, res: Response, next) => {
|
||||
let assets: assetsType;
|
||||
let standalone = false;
|
||||
|
||||
if (url === "/health") {
|
||||
return res.send({ status: "Healthy" });
|
||||
}
|
||||
|
||||
initSSR(headers);
|
||||
|
||||
try {
|
||||
|
@ -3,15 +3,16 @@
|
||||
constructor() {
|
||||
this.browser = {};
|
||||
this.unsupportedBrowsers = {
|
||||
Chrome: 107,
|
||||
Firefox: 107,
|
||||
Chrome: 102,
|
||||
Firefox: 102,
|
||||
IE: 11,
|
||||
Edge: 107,
|
||||
Opera: 93,
|
||||
Safari: 13,
|
||||
SafariMobile: 12,
|
||||
Edge: 102,
|
||||
Opera: 90,
|
||||
Safari: 14,
|
||||
SafariMobile: 13,
|
||||
AscDesktopEditor: 6,
|
||||
SamsungBrowser: 3,
|
||||
SamsungBrowser: 4,
|
||||
UCBrowser: 12,
|
||||
};
|
||||
|
||||
this.detectBrowser();
|
||||
@ -33,7 +34,7 @@
|
||||
|
||||
if (match[1] === "Chrome") {
|
||||
temp = agent.match(
|
||||
/\b(OPR|Edge|AscDesktopEditor|SamsungBrowser)\/(\d+)/
|
||||
/\b(OPR|Edge|AscDesktopEditor|SamsungBrowser|UCBrowser)\/(\d+)/
|
||||
);
|
||||
if (temp != null) {
|
||||
return { name: temp[1].replace("OPR", "Opera"), version: temp[2] };
|
||||
@ -65,13 +66,13 @@
|
||||
isSupported() {
|
||||
if (this.unsupportedBrowsers.hasOwnProperty(this.browser.name)) {
|
||||
if (
|
||||
+this.browser.version > this.unsupportedBrowsers[this.browser.name]
|
||||
+this.browser.version < this.unsupportedBrowsers[this.browser.name]
|
||||
) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user