Web: move logo from client to public
@ -4,7 +4,7 @@ import PropTypes from "prop-types";
|
||||
import styled from "styled-components";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import NoUserSelect from "@docspace/components/utils/commonStyles";
|
||||
import { getLogoFromPath } from "SRC_DIR/helpers/utils";
|
||||
import { getLogoFromPath } from "@docspace/common/utils";
|
||||
const LogoItem = styled.div`
|
||||
display: flex;
|
||||
min-width: 48px;
|
||||
|
@ -5,15 +5,6 @@ import { useEffect, useState } from "react";
|
||||
import { CategoryType } from "./constants";
|
||||
import { FolderType } from "@docspace/common/constants";
|
||||
|
||||
import LoginPageSvgUrl from "ASSETS_DIR/images/logo/loginpage.svg?url";
|
||||
import DarkLoginPageSvgUrl from "ASSETS_DIR/images/logo/dark_loginpage.svg?url";
|
||||
import LeftMenuSvgUrl from "ASSETS_DIR/images/logo/leftmenu.svg?url";
|
||||
import DocseditorSvgUrl from "ASSETS_DIR/images/logo/docseditor.svg?url";
|
||||
import LightSmallSvgUrl from "ASSETS_DIR/images/logo/lightsmall.svg?url";
|
||||
import DocsEditoRembedSvgUrl from "ASSETS_DIR/images/logo/docseditorembed.svg?url";
|
||||
import DarkLightSmallSvgUrl from "ASSETS_DIR/images/logo/dark_lightsmall.svg?url";
|
||||
import FaviconIcoUrl from "ASSETS_DIR/images/logo/favicon.ico?url";
|
||||
|
||||
export const setDocumentTitle = (subTitle = null) => {
|
||||
const { isAuthenticated, settingsStore, product: currentModule } = authStore;
|
||||
const { organizationName } = settingsStore;
|
||||
@ -202,35 +193,3 @@ export const getCategoryUrl = (categoryType, folderId = null) => {
|
||||
throw new Error("Unknown category type");
|
||||
}
|
||||
};
|
||||
|
||||
export const getLogoFromPath = (path) => {
|
||||
if (!path || path.indexOf("images/logo/") === -1) return path;
|
||||
|
||||
const name = path.split("/").pop();
|
||||
|
||||
switch (name) {
|
||||
case "aboutpage.svg":
|
||||
case "loginpage.svg":
|
||||
return LoginPageSvgUrl;
|
||||
case "dark_loginpage.svg":
|
||||
return DarkLoginPageSvgUrl;
|
||||
case "leftmenu.svg":
|
||||
case "dark_leftmenu.svg":
|
||||
return LeftMenuSvgUrl;
|
||||
case "dark_aboutpage.svg":
|
||||
case "dark_lightsmall.svg":
|
||||
return DarkLightSmallSvgUrl;
|
||||
case "docseditor.svg":
|
||||
return DocseditorSvgUrl;
|
||||
case "lightsmall.svg":
|
||||
return LightSmallSvgUrl;
|
||||
case "docseditorembed.svg":
|
||||
return DocsEditoRembedSvgUrl;
|
||||
case "favicon.ico":
|
||||
return FaviconIcoUrl;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return path;
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { getLogoFromPath } from "SRC_DIR/helpers/utils";
|
||||
import { getLogoFromPath } from "@docspace/common/utils";
|
||||
|
||||
import Text from "@docspace/components/text";
|
||||
import Link from "@docspace/components/link";
|
||||
|
@ -1,10 +1,11 @@
|
||||
import LoginPageSvgUrl from "../../client/public/images/logo/loginpage.svg?url";
|
||||
import DarkLoginPageSvgUrl from "../../client/public/images/logo/dark_loginpage.svg?url";
|
||||
import LeftMenuSvgUrl from "../../client/public/images/logo/leftmenu.svg?url";
|
||||
import DocseditorSvgUrl from "../../client/public/images/logo/docseditor.svg?url";
|
||||
import LightSmallSvgUrl from "../../client/public/images/logo/lightsmall.svg?url";
|
||||
import DocsEditoRembedSvgUrl from "../../client/public/images/logo/docseditorembed.svg?url";
|
||||
import DarkLightSmallSvgUrl from "../../client/public/images/logo/dark_lightsmall.svg?url";
|
||||
import LoginPageSvgUrl from "../../../public/images/logo/loginpage.svg?url";
|
||||
import DarkLoginPageSvgUrl from "../../../public/images/logo/dark_loginpage.svg?url";
|
||||
import LeftMenuSvgUrl from "../../../public/images/logo/leftmenu.svg?url";
|
||||
import DocseditorSvgUrl from "../../../public/images/logo/docseditor.svg?url";
|
||||
import LightSmallSvgUrl from "../../../public/images/logo/lightsmall.svg?url";
|
||||
import DocsEditoRembedSvgUrl from "../../../public/images/logo/docseditorembed.svg?url";
|
||||
import DarkLightSmallSvgUrl from "../../../public/images/logo/dark_lightsmall.svg?url";
|
||||
import FaviconIcoUrl from "../../../public/images/logo/favicon.ico?url";
|
||||
|
||||
import BackgroundPatternReactSvgUrl from "../../../public/images/background.pattern.react.svg?url";
|
||||
import BackgroundPatternOrangeReactSvgUrl from "../../../public/images/background.pattern.orange.react.svg?url";
|
||||
@ -181,16 +182,14 @@ export const getUserRole = (user) => {
|
||||
else return "manager";
|
||||
};
|
||||
|
||||
|
||||
|
||||
export const combineUrl = combineUrlFunc;
|
||||
|
||||
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;
|
||||
@ -365,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)
|
||||
);
|
||||
}
|
||||
@ -500,6 +499,7 @@ export const getLogoFromPath = (path) => {
|
||||
if (!path || path.indexOf("images/logo/") === -1) return path;
|
||||
|
||||
const name = path.split("/").pop();
|
||||
|
||||
switch (name) {
|
||||
case "aboutpage.svg":
|
||||
case "loginpage.svg":
|
||||
@ -518,6 +518,8 @@ export const getLogoFromPath = (path) => {
|
||||
return LightSmallSvgUrl;
|
||||
case "docseditorembed.svg":
|
||||
return DocsEditoRembedSvgUrl;
|
||||
case "favicon.ico":
|
||||
return FaviconIcoUrl;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |