Merge pull request #1734 from ONLYOFFICE/feature/add-new-link-dialog

Web: Files: Changed translations for add new link dialog
This commit is contained in:
Alexey Safronov 2023-09-14 13:17:07 +04:00 committed by GitHub
commit 046d708214
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 14 deletions

View File

@ -3,6 +3,7 @@
"AddMembersDescription": "You can add new team members manually or invite them via link.",
"AddNewExternalLink": "Add new external link",
"AddNewLink": "Add new link",
"CreateNewLink": "Create new link",
"All": "All",
"AllFiles": "All files",
"AllLinksAreDisabled": "All links are disabled",
@ -71,6 +72,7 @@
"InviteUsersInRoom": "Invite users in room",
"LimitByTimePeriod": "Limit by time period",
"LinkAddedSuccessfully": "Link added successfully",
"LinkCreatedSuccessfully": "Link successfully created",
"LinkDeletedSuccessfully": "Link deleted successfully",
"LinkDisabledSuccessfully": "Link disabled successfully",
"LinkEditedSuccessfully": "Link edited successfully",

View File

@ -26,7 +26,7 @@ export const getHeaderLabel = (
return t("Translations:CreateMasterFormFromFile");
if (!!filterParam) return t("Common:SelectFile");
return t("Common:Save");
return t("Common:SaveButton");
};
export const getAcceptButtonLabel = (

View File

@ -7,6 +7,7 @@ import FieldContainer from "@docspace/components/field-container";
const LinkBlock = (props) => {
const {
t,
isEdit,
isLoading,
shareLink,
linkNameValue,
@ -40,16 +41,18 @@ const LinkBlock = (props) => {
isDisabled={isLoading}
/>
<TextInput
scale
size="base"
withBorder
isDisabled
isReadOnly
className="edit-link_link-input"
value={linkValue}
placeholder={t("ExternalLink")}
/>
{isEdit && (
<TextInput
scale
size="base"
withBorder
isDisabled
isReadOnly
className="edit-link_link-input"
value={linkValue}
placeholder={t("ExternalLink")}
/>
)}
</div>
);
};

View File

@ -113,7 +113,7 @@ const EditLinkPanel = (props) => {
} else {
copy(link?.sharedTo?.shareLink);
toastr.success(t("Files:LinkAddedSuccessfully"));
toastr.success(t("Files:LinkCreatedSuccessfully"));
}
})
.catch((err) => toastr.error(err?.message))
@ -179,13 +179,14 @@ const EditLinkPanel = (props) => {
>
<div className="edit-link_header">
<Heading className="edit-link_heading">
{isEdit ? t("Files:EditLink") : t("Files:AddNewLink")}
{isEdit ? t("Files:EditLink") : t("Files:CreateNewLink")}
</Heading>
</div>
<StyledScrollbar stype="mediumBlack">
<div className="edit-link_body">
<LinkBlock
t={t}
isEdit={isEdit}
isLoading={isLoading}
shareLink={shareLink}
linkNameValue={linkNameValue}
@ -230,7 +231,7 @@ const EditLinkPanel = (props) => {
scale
primary
size="normal"
label={t("Common:SaveButton")}
label={isEdit ? t("Common:SaveButton") : t("Common:Create")}
isDisabled={isLoading || !linkNameIsValid || isExpired}
onClick={onSave}
/>

View File

@ -174,6 +174,8 @@ const StyledContainer = styled.div`
.title-icon {
min-width: 16px;
min-height: 16px;
width: 16px;
height: 16px;
svg {
path,

View File

@ -248,6 +248,8 @@ class TableHeader extends React.Component {
? containerRef.current
: document.getElementById("table-container");
if (!container) return;
// // 400 - it is desktop info panel width
// const minSize = infoPanelVisible ? size.tablet - 400 : size.tablet;