Merge branch 'feature/langs-updates_0524' of https://github.com/ONLYOFFICE/DocSpace-client into feature/langs-updates_0524
This commit is contained in:
commit
26ef649358
@ -335,7 +335,7 @@ const FilesSelectorWrapper = ({
|
||||
isThirdParty={isThirdParty}
|
||||
rootThirdPartyId={rootThirdPartyId}
|
||||
roomsFolderId={roomsFolderId}
|
||||
currentFolderId={currentFolderId || 0}
|
||||
currentFolderId={currentFolderId}
|
||||
parentId={parentId}
|
||||
rootFolderType={rootFolderType || FolderType.Rooms}
|
||||
currentDeviceType={currentDeviceType}
|
||||
@ -481,7 +481,7 @@ export default inject(
|
||||
(rootFolderType === FolderType.Archive ||
|
||||
rootFolderType === FolderType.TRASH
|
||||
? undefined
|
||||
: selectedId !== selectionsWithoutEditing[0]?.id
|
||||
: selectedId === selectionsWithoutEditing[0]?.id
|
||||
? parentId
|
||||
: selectedId);
|
||||
|
||||
|
@ -53,6 +53,7 @@ const Accounts = (props) => {
|
||||
setPeopleBufferSelection,
|
||||
|
||||
showStorageInfo,
|
||||
standalone,
|
||||
} = props;
|
||||
|
||||
const navigate = useNavigate();
|
||||
@ -233,18 +234,22 @@ const Accounts = (props) => {
|
||||
</Text>
|
||||
{typeData}
|
||||
|
||||
<Text className={"info_field"} noSelect title={t("UserStatus")}>
|
||||
{t("UserStatus")}
|
||||
</Text>
|
||||
<Text
|
||||
className={"info_data first-row"}
|
||||
fontSize={"13px"}
|
||||
fontWeight={600}
|
||||
noSelect
|
||||
title={statusLabel}
|
||||
>
|
||||
{statusText}
|
||||
</Text>
|
||||
{!standalone && (
|
||||
<>
|
||||
<Text className={"info_field"} noSelect title={t("UserStatus")}>
|
||||
{t("UserStatus")}
|
||||
</Text>
|
||||
<Text
|
||||
className={"info_data first-row"}
|
||||
fontSize={"13px"}
|
||||
fontWeight={600}
|
||||
noSelect
|
||||
title={statusLabel}
|
||||
>
|
||||
{statusText}
|
||||
</Text>
|
||||
</>
|
||||
)}
|
||||
{showStorageInfo && (
|
||||
<>
|
||||
<Text
|
||||
@ -310,6 +315,7 @@ export default inject(
|
||||
accessRightsStore,
|
||||
infoPanelStore,
|
||||
currentQuotaStore,
|
||||
settingsStore,
|
||||
}) => {
|
||||
const { isOwner, isAdmin, id: selfId } = userStore.user;
|
||||
const { changeType: changeUserType, usersStore } = peopleStore;
|
||||
@ -323,6 +329,8 @@ export default inject(
|
||||
} = peopleStore.selectionStore;
|
||||
|
||||
const { showStorageInfo } = currentQuotaStore;
|
||||
const { standalone } = settingsStore;
|
||||
|
||||
return {
|
||||
isOwner,
|
||||
isAdmin,
|
||||
@ -335,6 +343,7 @@ export default inject(
|
||||
setPeopleSelection,
|
||||
setPeopleBufferSelection,
|
||||
showStorageInfo,
|
||||
standalone,
|
||||
};
|
||||
},
|
||||
)(
|
||||
|
@ -42,6 +42,7 @@ import { Button } from "@docspace/shared/components/button";
|
||||
import { FieldContainer } from "@docspace/shared/components/field-container";
|
||||
import ErrorContainer from "@docspace/shared/components/error-container/ErrorContainer";
|
||||
import { FileInput } from "@docspace/shared/components/file-input";
|
||||
import { Scrollbar } from "@docspace/shared/components/scrollbar";
|
||||
|
||||
import { Loader } from "@docspace/shared/components/loader";
|
||||
|
||||
@ -314,207 +315,209 @@ const Wizard = (props) => {
|
||||
return (
|
||||
<Wrapper>
|
||||
<div className="bg-cover"></div>
|
||||
<StyledContent>
|
||||
<WizardContainer>
|
||||
<DocspaceLogo className="docspace-logo" />
|
||||
<Text
|
||||
as="div"
|
||||
fontWeight={700}
|
||||
fontSize="23px"
|
||||
className="welcome-text"
|
||||
>
|
||||
{t("WelcomeTitle")}
|
||||
</Text>
|
||||
<FormWrapper>
|
||||
<Text fontWeight={600} fontSize="16px" className="form-header">
|
||||
{t("Desc")}
|
||||
<Scrollbar id="customScrollBar">
|
||||
<StyledContent>
|
||||
<WizardContainer>
|
||||
<DocspaceLogo className="docspace-logo" />
|
||||
<Text
|
||||
as="div"
|
||||
fontWeight={700}
|
||||
fontSize="23px"
|
||||
className="welcome-text"
|
||||
>
|
||||
{t("WelcomeTitle")}
|
||||
</Text>
|
||||
<FieldContainer
|
||||
className="wizard-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={hasErrorEmail}
|
||||
errorMessage={t("ErrorEmail")}
|
||||
>
|
||||
<EmailInput
|
||||
name="wizard-email"
|
||||
tabIndex={1}
|
||||
size="large"
|
||||
scale={true}
|
||||
placeholder={t("Common:Email")}
|
||||
emailSettings={emailSettings}
|
||||
hasError={hasErrorEmail}
|
||||
onValidateInput={onEmailChangeHandler}
|
||||
isDisabled={isCreated}
|
||||
/>
|
||||
</FieldContainer>
|
||||
|
||||
<FieldContainer
|
||||
className="wizard-field password-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={hasErrorPass}
|
||||
errorMessage={t("ErrorPassword")}
|
||||
>
|
||||
<PasswordInput
|
||||
ref={refPassInput}
|
||||
tabIndex={2}
|
||||
size="large"
|
||||
scale={true}
|
||||
inputValue={password}
|
||||
passwordSettings={passwordSettings}
|
||||
isDisabled={isCreated}
|
||||
placeholder={t("Common:Password")}
|
||||
hideNewPasswordButton={true}
|
||||
isDisableTooltip={true}
|
||||
isTextTooltipVisible={false}
|
||||
hasError={hasErrorPass}
|
||||
onChange={onChangePassword}
|
||||
autoComplete="current-password"
|
||||
onValidateInput={isValidPassHandler}
|
||||
/>
|
||||
</FieldContainer>
|
||||
<StyledLink>
|
||||
<IconButton
|
||||
size="12"
|
||||
iconName={RefreshReactSvgUrl}
|
||||
onClick={generatePassword}
|
||||
/>
|
||||
<Link
|
||||
className="generate-password-link"
|
||||
type="action"
|
||||
fontWeight={600}
|
||||
isHovered={true}
|
||||
onClick={generatePassword}
|
||||
>
|
||||
{t("GeneratePassword")}
|
||||
</Link>
|
||||
</StyledLink>
|
||||
|
||||
{isLicenseRequired && (
|
||||
<FormWrapper>
|
||||
<Text fontWeight={600} fontSize="16px" className="form-header">
|
||||
{t("Desc")}
|
||||
</Text>
|
||||
<FieldContainer
|
||||
className="license-filed"
|
||||
className="wizard-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={hasErrorLicense}
|
||||
errorMessage={
|
||||
invalidLicense
|
||||
? t("ErrorLicenseBody")
|
||||
: t("ErrorUploadLicenseFile")
|
||||
}
|
||||
hasError={hasErrorEmail}
|
||||
errorMessage={t("ErrorEmail")}
|
||||
>
|
||||
<FileInput
|
||||
scale
|
||||
<EmailInput
|
||||
name="wizard-email"
|
||||
tabIndex={1}
|
||||
size="large"
|
||||
accept={[".lic"]}
|
||||
placeholder={t("PlaceholderLicense")}
|
||||
onInput={onLicenseFileHandler}
|
||||
hasError={hasErrorLicense}
|
||||
scale={true}
|
||||
placeholder={t("Common:Email")}
|
||||
emailSettings={emailSettings}
|
||||
hasError={hasErrorEmail}
|
||||
onValidateInput={onEmailChangeHandler}
|
||||
isDisabled={isCreated}
|
||||
/>
|
||||
</FieldContainer>
|
||||
)}
|
||||
<StyledInfo>
|
||||
<Text color="#A3A9AE" fontWeight={400}>
|
||||
{t("Common:Domain")}
|
||||
</Text>
|
||||
<Text fontWeight={600} className="machine-name">
|
||||
{machineName}
|
||||
</Text>
|
||||
</StyledInfo>
|
||||
<StyledInfo>
|
||||
<Text color="#A3A9AE" fontWeight={400}>
|
||||
{t("Common:Language")}
|
||||
</Text>
|
||||
<div className="wrapper__language-selector">
|
||||
|
||||
<FieldContainer
|
||||
className="wizard-field password-field"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={hasErrorPass}
|
||||
errorMessage={t("ErrorPassword")}
|
||||
>
|
||||
<PasswordInput
|
||||
ref={refPassInput}
|
||||
tabIndex={2}
|
||||
size="large"
|
||||
scale={true}
|
||||
inputValue={password}
|
||||
passwordSettings={passwordSettings}
|
||||
isDisabled={isCreated}
|
||||
placeholder={t("Common:Password")}
|
||||
hideNewPasswordButton={true}
|
||||
isDisableTooltip={true}
|
||||
isTextTooltipVisible={false}
|
||||
hasError={hasErrorPass}
|
||||
onChange={onChangePassword}
|
||||
autoComplete="current-password"
|
||||
onValidateInput={isValidPassHandler}
|
||||
/>
|
||||
</FieldContainer>
|
||||
<StyledLink>
|
||||
<IconButton
|
||||
size="12"
|
||||
iconName={RefreshReactSvgUrl}
|
||||
onClick={generatePassword}
|
||||
/>
|
||||
<Link
|
||||
className="generate-password-link"
|
||||
type="action"
|
||||
fontWeight={600}
|
||||
isHovered={true}
|
||||
onClick={generatePassword}
|
||||
>
|
||||
{t("GeneratePassword")}
|
||||
</Link>
|
||||
</StyledLink>
|
||||
|
||||
{isLicenseRequired && (
|
||||
<FieldContainer
|
||||
className="license-filed"
|
||||
isVertical={true}
|
||||
labelVisible={false}
|
||||
hasError={hasErrorLicense}
|
||||
errorMessage={
|
||||
invalidLicense
|
||||
? t("ErrorLicenseBody")
|
||||
: t("ErrorUploadLicenseFile")
|
||||
}
|
||||
>
|
||||
<FileInput
|
||||
scale
|
||||
size="large"
|
||||
accept={[".lic"]}
|
||||
placeholder={t("PlaceholderLicense")}
|
||||
onInput={onLicenseFileHandler}
|
||||
hasError={hasErrorLicense}
|
||||
/>
|
||||
</FieldContainer>
|
||||
)}
|
||||
<StyledInfo>
|
||||
<Text color="#A3A9AE" fontWeight={400}>
|
||||
{t("Common:Domain")}
|
||||
</Text>
|
||||
<Text fontWeight={600} className="machine-name">
|
||||
{machineName}
|
||||
</Text>
|
||||
</StyledInfo>
|
||||
<StyledInfo>
|
||||
<Text color="#A3A9AE" fontWeight={400}>
|
||||
{t("Common:Language")}
|
||||
</Text>
|
||||
<div className="wrapper__language-selector">
|
||||
<ComboBox
|
||||
withoutPadding
|
||||
directionY="both"
|
||||
options={cultureNames || []}
|
||||
selectedOption={selectedLanguage || {}}
|
||||
onSelect={onLanguageSelect}
|
||||
isDisabled={isCreated}
|
||||
scaled={isMobile()}
|
||||
scaledOptions={false}
|
||||
size="content"
|
||||
showDisabledItems={true}
|
||||
dropDownMaxHeight={364}
|
||||
manualWidth="250px"
|
||||
isDefaultMode={!isMobile()}
|
||||
withBlur={isMobile()}
|
||||
fillIcon={false}
|
||||
modernView={true}
|
||||
/>
|
||||
{selectedLanguage?.isBeta && (
|
||||
<BetaBadge withOutFeedbackLink place="bottom" />
|
||||
)}
|
||||
</div>
|
||||
</StyledInfo>
|
||||
<StyledInfo>
|
||||
<Text color="#A3A9AE" fontWeight={400}>
|
||||
{t("Timezone")}
|
||||
</Text>
|
||||
<ComboBox
|
||||
textOverflow
|
||||
withoutPadding
|
||||
directionY="both"
|
||||
options={cultureNames || []}
|
||||
selectedOption={selectedLanguage || {}}
|
||||
onSelect={onLanguageSelect}
|
||||
options={timezones || []}
|
||||
selectedOption={selectedTimezone || {}}
|
||||
onSelect={onTimezoneSelect}
|
||||
isDisabled={isCreated}
|
||||
scaled={isMobile()}
|
||||
scaledOptions={false}
|
||||
size="content"
|
||||
showDisabledItems={true}
|
||||
dropDownMaxHeight={364}
|
||||
manualWidth="250px"
|
||||
manualWidth="350px"
|
||||
isDefaultMode={!isMobile()}
|
||||
withBlur={isMobile()}
|
||||
fillIcon={false}
|
||||
modernView={true}
|
||||
/>
|
||||
{selectedLanguage?.isBeta && (
|
||||
<BetaBadge withOutFeedbackLink place="bottom" />
|
||||
)}
|
||||
</div>
|
||||
</StyledInfo>
|
||||
<StyledInfo>
|
||||
<Text color="#A3A9AE" fontWeight={400}>
|
||||
{t("Timezone")}
|
||||
</Text>
|
||||
<ComboBox
|
||||
textOverflow
|
||||
withoutPadding
|
||||
directionY="both"
|
||||
options={timezones || []}
|
||||
selectedOption={selectedTimezone || {}}
|
||||
onSelect={onTimezoneSelect}
|
||||
isDisabled={isCreated}
|
||||
scaled={isMobile()}
|
||||
scaledOptions={false}
|
||||
size="content"
|
||||
showDisabledItems={true}
|
||||
dropDownMaxHeight={364}
|
||||
manualWidth="350px"
|
||||
isDefaultMode={!isMobile()}
|
||||
withBlur={isMobile()}
|
||||
fillIcon={false}
|
||||
modernView={true}
|
||||
/>
|
||||
</StyledInfo>
|
||||
</StyledInfo>
|
||||
|
||||
<StyledAcceptTerms>
|
||||
<Checkbox
|
||||
className="wizard-checkbox"
|
||||
id="license"
|
||||
name="confirm"
|
||||
label={t("License")}
|
||||
isChecked={agreeTerms}
|
||||
onChange={onAgreeTermsChange}
|
||||
isDisabled={isCreated}
|
||||
hasError={hasErrorAgree}
|
||||
/>
|
||||
<Link
|
||||
type="page"
|
||||
color={
|
||||
hasErrorAgree
|
||||
? theme.checkbox.errorColor
|
||||
: theme.client.wizard.linkColor
|
||||
}
|
||||
fontSize="13px"
|
||||
target="_blank"
|
||||
href={
|
||||
urlLicense
|
||||
? urlLicense
|
||||
: "https://gnu.org/licenses/gpl-3.0.html"
|
||||
}
|
||||
>
|
||||
{t("LicenseLink")}
|
||||
</Link>
|
||||
</StyledAcceptTerms>
|
||||
<StyledAcceptTerms>
|
||||
<Checkbox
|
||||
className="wizard-checkbox"
|
||||
id="license"
|
||||
name="confirm"
|
||||
label={t("License")}
|
||||
isChecked={agreeTerms}
|
||||
onChange={onAgreeTermsChange}
|
||||
isDisabled={isCreated}
|
||||
hasError={hasErrorAgree}
|
||||
/>
|
||||
<Link
|
||||
type="page"
|
||||
color={
|
||||
hasErrorAgree
|
||||
? theme.checkbox.errorColor
|
||||
: theme.client.wizard.linkColor
|
||||
}
|
||||
fontSize="13px"
|
||||
target="_blank"
|
||||
href={
|
||||
urlLicense
|
||||
? urlLicense
|
||||
: "https://gnu.org/licenses/gpl-3.0.html"
|
||||
}
|
||||
>
|
||||
{t("LicenseLink")}
|
||||
</Link>
|
||||
</StyledAcceptTerms>
|
||||
|
||||
<Button
|
||||
size="medium"
|
||||
scale={true}
|
||||
primary
|
||||
label={t("Common:ContinueButton")}
|
||||
isLoading={isCreated}
|
||||
onClick={onContinueClick}
|
||||
/>
|
||||
</FormWrapper>
|
||||
</WizardContainer>
|
||||
</StyledContent>
|
||||
<Button
|
||||
size="medium"
|
||||
scale={true}
|
||||
primary
|
||||
label={t("Common:ContinueButton")}
|
||||
isLoading={isCreated}
|
||||
onClick={onContinueClick}
|
||||
/>
|
||||
</FormWrapper>
|
||||
</WizardContainer>
|
||||
</StyledContent>
|
||||
</Scrollbar>
|
||||
</Wrapper>
|
||||
);
|
||||
};
|
||||
|
@ -141,7 +141,7 @@ const Editor = ({
|
||||
)?.["Editor"] as {
|
||||
[key: string]: string;
|
||||
}
|
||||
)?.["FileLocation"];
|
||||
)?.["FileLocation"]; // t("FileLocation");
|
||||
|
||||
if (editorGoBack === "false" || user?.isVisitor || !user) {
|
||||
} else if (editorGoBack === "event") {
|
||||
@ -294,3 +294,4 @@ const Editor = ({
|
||||
};
|
||||
|
||||
export default Editor;
|
||||
|
||||
|
@ -126,6 +126,7 @@ export const StyledBody = styled.div`
|
||||
|
||||
max-width: 960px;
|
||||
width: 100vw;
|
||||
margin-bottom: 16px;
|
||||
|
||||
@media ${mobile} {
|
||||
margin: 0 auto;
|
||||
|
@ -194,7 +194,7 @@ const Login: React.FC<ILoginProps> = ({
|
||||
: window.open(
|
||||
url,
|
||||
"login",
|
||||
"width=800,height=500,status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=no"
|
||||
"width=800,height=500,status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=no,popup=yes"
|
||||
);
|
||||
|
||||
const code: string = await getOAuthToken(tokenGetterWin);
|
||||
|
@ -107,6 +107,7 @@ export type UseFilesHelpersProps = {
|
||||
value: number | string | undefined | TBreadCrumb[],
|
||||
) => void;
|
||||
isRoomsOnly: boolean;
|
||||
isUserOnly?: boolean;
|
||||
rootThirdPartyId?: string;
|
||||
getRoomList?: (
|
||||
startIndex: number,
|
||||
@ -149,6 +150,7 @@ export type FilesSelectorProps = (
|
||||
value: number | string | undefined | TBreadCrumb[],
|
||||
) => void;
|
||||
isUserOnly?: boolean;
|
||||
openRoot?: boolean;
|
||||
isRoomsOnly: boolean;
|
||||
isThirdParty: boolean;
|
||||
rootThirdPartyId?: string;
|
||||
|
@ -65,6 +65,7 @@ const useFilesHelper = ({
|
||||
getRootData,
|
||||
onSetBaseFolderPath,
|
||||
isRoomsOnly,
|
||||
isUserOnly,
|
||||
rootThirdPartyId,
|
||||
getRoomList,
|
||||
getIcon,
|
||||
@ -141,7 +142,7 @@ const useFilesHelper = ({
|
||||
}
|
||||
}
|
||||
|
||||
const id = selectedItemId || "";
|
||||
const id = isUserOnly ? "@my" : selectedItemId || "";
|
||||
|
||||
filter.folder = id.toString();
|
||||
|
||||
@ -149,7 +150,7 @@ const useFilesHelper = ({
|
||||
folderId: string | number,
|
||||
isErrorPath = false,
|
||||
) => {
|
||||
if (initRef.current && getRootData) {
|
||||
if (initRef.current && getRootData && folderId !== "@my") {
|
||||
const folder = await getFolderInfo(folderId, true);
|
||||
|
||||
const isArchive = folder.rootFolderType === FolderType.Archive;
|
||||
@ -247,7 +248,7 @@ const useFilesHelper = ({
|
||||
// if (item.roomType) breadCrumbs[idx].isRoom = true;
|
||||
// });
|
||||
|
||||
if (!isThirdParty && !isRoomsOnly)
|
||||
if (!isThirdParty && !isRoomsOnly && !isUserOnly)
|
||||
breadCrumbs.unshift({ ...DEFAULT_BREAD_CRUMB });
|
||||
|
||||
onSetBaseFolderPath?.(isErrorPath ? [] : breadCrumbs);
|
||||
@ -308,6 +309,7 @@ const useFilesHelper = ({
|
||||
setIsNextPageLoading,
|
||||
searchValue,
|
||||
filterParam,
|
||||
isUserOnly,
|
||||
selectedItemId,
|
||||
getRootData,
|
||||
setSelectedItemSecurity,
|
||||
|
@ -76,6 +76,7 @@ const FilesSelector = ({
|
||||
onSetBaseFolderPath,
|
||||
isUserOnly,
|
||||
isRoomsOnly,
|
||||
openRoot,
|
||||
isThirdParty,
|
||||
rootThirdPartyId,
|
||||
roomsFolderId,
|
||||
@ -186,6 +187,7 @@ const FilesSelector = ({
|
||||
setIsRoot,
|
||||
searchValue,
|
||||
isRoomsOnly,
|
||||
|
||||
onSetBaseFolderPath,
|
||||
isInit,
|
||||
setIsInit,
|
||||
@ -211,6 +213,7 @@ const FilesSelector = ({
|
||||
getRootData,
|
||||
onSetBaseFolderPath,
|
||||
isRoomsOnly,
|
||||
isUserOnly,
|
||||
rootThirdPartyId,
|
||||
getRoomList,
|
||||
getIcon,
|
||||
@ -289,7 +292,7 @@ const FilesSelector = ({
|
||||
return;
|
||||
}
|
||||
|
||||
if (!currentFolderId) {
|
||||
if (!currentFolderId && !isUserOnly && !openRoot) {
|
||||
setSelectedItemType("rooms");
|
||||
return;
|
||||
}
|
||||
@ -311,9 +314,11 @@ const FilesSelector = ({
|
||||
currentFolderId,
|
||||
isRoomsOnly,
|
||||
isThirdParty,
|
||||
isUserOnly,
|
||||
parentId,
|
||||
roomsFolderId,
|
||||
rootFolderType,
|
||||
openRoot,
|
||||
setIsFirstLoad,
|
||||
]);
|
||||
|
||||
@ -439,10 +444,24 @@ const FilesSelector = ({
|
||||
);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (selectedItemType === "rooms") getRoomList(0);
|
||||
if (selectedItemType === "rooms") {
|
||||
getRoomList(0);
|
||||
return;
|
||||
}
|
||||
if (openRoot && !selectedItemId) {
|
||||
getRootData();
|
||||
return;
|
||||
}
|
||||
if (selectedItemType === "files" && typeof selectedItemId !== "undefined")
|
||||
getFileList(0);
|
||||
}, [getFileList, getRoomList, selectedItemType, selectedItemId]);
|
||||
}, [
|
||||
getFileList,
|
||||
getRoomList,
|
||||
selectedItemType,
|
||||
selectedItemId,
|
||||
getRootData,
|
||||
openRoot,
|
||||
]);
|
||||
|
||||
const headerProps: TSelectorHeader = withHeader
|
||||
? { withHeader, headerProps: { headerLabel } }
|
||||
|
Loading…
Reference in New Issue
Block a user