Merge branch 'release/v2.5.0' of https://github.com/ONLYOFFICE/DocSpace-client into release/v2.5.0
This commit is contained in:
commit
b41e0d05cf
@ -44,6 +44,7 @@
|
||||
"RoleUserDescription": "Пользователи могут получить доступ только к тем комнатам, в которые их пригласили администраторы. Они не могут создавать собственные комнаты, папки или файлы.",
|
||||
"RoleViewer": "Зритель",
|
||||
"RoleViewerDescription": "Просмотр файлов",
|
||||
"SearchByHeadOfGroup": "Искать по главе группы",
|
||||
"SearchByOwner": "Поиск по владельцам",
|
||||
"Spreadsheets": "Таблицы",
|
||||
"SubNewForm": "Пустая",
|
||||
|
@ -162,7 +162,7 @@ class CommonStore {
|
||||
};
|
||||
|
||||
getWhiteLabelLogoText = async () => {
|
||||
const res = await api.settings.getLogoText();
|
||||
const res = await api.settings.getLogoText(isManagement());
|
||||
this.setLogoText(res);
|
||||
this.defaultLogoTextWhiteLabel = res;
|
||||
return res;
|
||||
@ -178,7 +178,7 @@ class CommonStore {
|
||||
};
|
||||
|
||||
getIsDefaultWhiteLabel = async () => {
|
||||
const res = await api.settings.getIsDefaultWhiteLabel();
|
||||
const res = await api.settings.getIsDefaultWhiteLabel(isManagement());
|
||||
const enableRestoreButton = res.map((item) => item.default).includes(false);
|
||||
this.enableRestoreButton = enableRestoreButton;
|
||||
};
|
||||
|
@ -245,8 +245,8 @@ class MediaViewerDataStore {
|
||||
if (filesList.length > 0) {
|
||||
filesList.forEach((file) => {
|
||||
const canOpenPlayer =
|
||||
file.viewAccessibility.ImageView ||
|
||||
file.viewAccessibility.MediaView ||
|
||||
file.viewAccessibility?.ImageView ||
|
||||
file.viewAccessibility?.MediaView ||
|
||||
(file.fileExst === ".pdf" && window.DocSpaceConfig.pdfViewer);
|
||||
|
||||
if (canOpenPlayer) {
|
||||
@ -266,7 +266,7 @@ class MediaViewerDataStore {
|
||||
file.thumbnailStatus === thumbnailStatuses.WAITING;
|
||||
|
||||
const isVideoOrImage =
|
||||
file.viewAccessibility.ImageView || isVideo(file.fileExst);
|
||||
file.viewAccessibility?.ImageView || isVideo(file.fileExst);
|
||||
|
||||
if (thumbnailIsNotCreated && isVideoOrImage)
|
||||
itemsWithoutThumb.push(file);
|
||||
|
@ -302,17 +302,24 @@ export function deleteAppearanceTheme(id) {
|
||||
});
|
||||
}
|
||||
|
||||
export function getLogoText() {
|
||||
export function getLogoText(isManagement: boolean = false) {
|
||||
const url = "/settings/whitelabel/logotext";
|
||||
|
||||
return request({
|
||||
method: "get",
|
||||
url: `/settings/whitelabel/logotext`,
|
||||
url: isManagement ? `${url}?isDefault=true` : url,
|
||||
});
|
||||
}
|
||||
|
||||
export async function getLogoUrls(headers = null) {
|
||||
export async function getLogoUrls(
|
||||
headers = null,
|
||||
isManagement: boolean = false,
|
||||
) {
|
||||
const url = "/settings/whitelabel/logos";
|
||||
|
||||
const options: AxiosRequestConfig = {
|
||||
method: "get",
|
||||
url: `/settings/whitelabel/logos`,
|
||||
url: isManagement ? `${url}?isDefault=true` : url,
|
||||
};
|
||||
|
||||
if (headers) options.headers = headers;
|
||||
@ -324,7 +331,7 @@ export async function getLogoUrls(headers = null) {
|
||||
return res;
|
||||
}
|
||||
|
||||
export function setWhiteLabelSettings(data, isManagement) {
|
||||
export function setWhiteLabelSettings(data, isManagement: boolean = false) {
|
||||
const url = "/settings/whitelabel/save";
|
||||
|
||||
const options = {
|
||||
@ -336,14 +343,16 @@ export function setWhiteLabelSettings(data, isManagement) {
|
||||
return request(options);
|
||||
}
|
||||
|
||||
export function getIsDefaultWhiteLabel() {
|
||||
export function getIsDefaultWhiteLabel(isManagement: boolean = false) {
|
||||
const url = "/settings/whitelabel/logos/isdefault";
|
||||
|
||||
return request({
|
||||
method: "get",
|
||||
url: `/settings/whitelabel/logos/isdefault`,
|
||||
url: isManagement ? `${url}?isDefault=true` : url,
|
||||
});
|
||||
}
|
||||
|
||||
export function restoreWhiteLabelSettings(isManagement) {
|
||||
export function restoreWhiteLabelSettings(isManagement: boolean = false) {
|
||||
const url = "/settings/whitelabel/restore";
|
||||
|
||||
return request({
|
||||
|
@ -365,9 +365,10 @@ const compare = (
|
||||
prevProps.displayType === nextProps.displayType &&
|
||||
prevProps.isDisabled === nextProps.isDisabled
|
||||
) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
export const ContextMenuButton = React.memo(ContextMenuButtonPure, compare);
|
||||
|
@ -645,6 +645,14 @@ const StyledBox = styled.div<{
|
||||
grid-template-columns: minmax(1px, max-content) auto;
|
||||
}
|
||||
|
||||
.title-block-text {
|
||||
margin-top: 1px;
|
||||
|
||||
@media ${tablet} {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media ${tablet} {
|
||||
width: ${({ dropBoxWidth }) => `${dropBoxWidth}px`};
|
||||
${(props) =>
|
||||
|
@ -168,6 +168,7 @@ const Navigation = ({
|
||||
<div className="title-block">
|
||||
{titleIcon && <ReactSVG className="title-icon" src={titleIcon} />}
|
||||
<Text
|
||||
className="title-block-text"
|
||||
title={title}
|
||||
isOpen={isOpen}
|
||||
isRootFolder={isRootFolder}
|
||||
|
@ -54,12 +54,14 @@ import {
|
||||
getShowText,
|
||||
isPublicRoom,
|
||||
insertTagManager,
|
||||
isManagement,
|
||||
} from "../utils/common";
|
||||
import { setCookie, getCookie } from "../utils/cookie";
|
||||
import { combineUrl } from "../utils/combineUrl";
|
||||
import FirebaseHelper from "../utils/firebase";
|
||||
import SocketIOHelper from "../utils/socket";
|
||||
import { TWhiteLabel } from "../utils/whiteLabelHelper";
|
||||
|
||||
import { ThemeKeys, TenantStatus, DeviceType, UrlActionType } from "../enums";
|
||||
import {
|
||||
LANGUAGE,
|
||||
@ -726,7 +728,7 @@ class SettingsStore {
|
||||
};
|
||||
|
||||
getWhiteLabelLogoUrls = async () => {
|
||||
const res = await api.settings.getLogoUrls();
|
||||
const res = await api.settings.getLogoUrls(null, isManagement());
|
||||
|
||||
this.setLogoUrls(Object.values(res));
|
||||
this.setLogoUrl(Object.values(res));
|
||||
|
@ -895,22 +895,21 @@ export const toUrlParams = (
|
||||
export function getObjectByLocation(location: Location) {
|
||||
if (!location.search || !location.search.length) return null;
|
||||
|
||||
const searchUrl = location.search.substring(1);
|
||||
const decodedString = decodeURIComponent(searchUrl)
|
||||
.replace(/\["/g, '["')
|
||||
.replace(/"\]/g, '"]')
|
||||
.replace(/"/g, '\\"')
|
||||
.replace(/&/g, '","')
|
||||
.replace(/=/g, '":"')
|
||||
.replace(/\\/g, "\\\\")
|
||||
.replace(/\[\\\\"/g, '["')
|
||||
.replace(/\\\\"\]/g, '"]')
|
||||
.replace(/"\[/g, "[")
|
||||
.replace(/\]"/g, "]")
|
||||
.replace(/\\\\",\\\\"/g, '","')
|
||||
.replace(/\\\\\\\\"/g, '\\"');
|
||||
|
||||
try {
|
||||
const searchUrl = location.search.substring(1);
|
||||
const decodedString = decodeURIComponent(searchUrl)
|
||||
.replace(/\["/g, '["')
|
||||
.replace(/"\]/g, '"]')
|
||||
.replace(/"/g, '\\"')
|
||||
.replace(/&/g, '","')
|
||||
.replace(/=/g, '":"')
|
||||
.replace(/\\/g, "\\\\")
|
||||
.replace(/\[\\\\"/g, '["')
|
||||
.replace(/\\\\"\]/g, '"]')
|
||||
.replace(/"\[/g, "[")
|
||||
.replace(/\]"/g, "]")
|
||||
.replace(/\\\\",\\\\"/g, '","')
|
||||
.replace(/\\\\\\\\"/g, '\\"');
|
||||
const object = JSON.parse(`{"${decodedString}"}`);
|
||||
return object;
|
||||
} catch (e) {
|
||||
|
@ -159,6 +159,7 @@
|
||||
"FullAccess": "Полный доступ",
|
||||
"Gigabyte": "Гб",
|
||||
"GoBack": "Назад",
|
||||
"Group": "Группа",
|
||||
"Groups": "Группы",
|
||||
"HasFullAccess": "У него есть полный доступ в комнату",
|
||||
"HeadOfGroup": "Глава группы",
|
||||
@ -305,6 +306,7 @@
|
||||
"SelectFile": "Выбрать файл",
|
||||
"SelectFiles": "Выбрать файлы",
|
||||
"SelectorEmptyScreenHeader": "Здесь пока нет файлов и папок",
|
||||
"SelectRoom": "Выбрать комнату",
|
||||
"SendButton": "Отправить",
|
||||
"Sending": "Отправка...",
|
||||
"SendRequest": "Отправить запрос",
|
||||
|
Loading…
Reference in New Issue
Block a user