Merge branch 'release/v1.0.0' of https://github.com/ONLYOFFICE/DocSpace into release/v1.0.0

This commit is contained in:
Maria Sukhova 2023-04-11 17:12:34 +03:00
commit cd2b62ab7e
3 changed files with 16 additions and 10 deletions

View File

@ -103,7 +103,7 @@ const SocialNetworks = (props) => {
<div key={`${item.provider}ProviderItem`}>
<SocialButton
iconName={icon}
label={getProviderTranslation(label, t)}
label={getProviderTranslation(label, t, item.linked)}
$iconOptions={iconOptions}
onClick={(e) => onClick(e)}
size="small"

View File

@ -192,8 +192,8 @@ export function getCookie(name) {
let matches = document.cookie.match(
new RegExp(
"(?:^|; )" +
name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\\$1") +
"=([^;]*)"
name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, "\\$1") +
"=([^;]*)"
)
);
return matches ? decodeURIComponent(matches[1]) : undefined;
@ -262,7 +262,12 @@ export function toCommunityHostname(hostname) {
return communityHostname;
}
export function getProviderTranslation(provider, t) {
export function getProviderTranslation(provider, t, linked = false) {
const capitalizeProvider = provider.charAt(0).toUpperCase() + provider.slice(1);
if (linked) {
return `${t("Common:Disconnect")} ${capitalizeProvider}`
}
switch (provider) {
case "google":
return t("Common:SignInWithGoogle");
@ -359,7 +364,7 @@ export function isElementInViewport(el) {
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <=
(window.innerHeight || document.documentElement.clientHeight) &&
(window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
);
}

View File

@ -291,11 +291,12 @@ const Dark = {
background: black,
disableBackgroundColor: "rgba(0, 0, 0, 0.08)",
connectBackground: "#3B72A7",
connectBackground:
"linear-gradient(0deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)), #333333",
hoverBackground: "#292929",
hoverConnectBackground: "#265A8F",
hoverConnectBackground: "#FFFFFF",
activeBackground: "#292929",
hoverBorder: "#292929",
hoverBorder: "#858585",
boxShadow: "none",
hoverBoxShadow: "none",
@ -317,7 +318,7 @@ const Dark = {
whiteSpace: "nowrap",
color: grayMaxLight,
hoverColor: grayMaxLight,
connectColor: white,
connectColor: darkBlack,
},
svg: {
@ -326,7 +327,7 @@ const Dark = {
height: "18px",
minWidth: "18px",
minHeight: "18px",
fill: white,
fill: darkBlack,
},
},