Merge pull request #1390 from ONLYOFFICE/feature/thirdparty

Feature/thirdparty
This commit is contained in:
Alexey Safronov 2023-04-27 17:02:34 +04:00 committed by GitHub
commit d42d8505d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 19 deletions

View File

@ -8,7 +8,7 @@ import RoomType from "./RoomType";
import PermanentSettings from "./PermanentSettings";
import InputParam from "./Params/InputParam";
// import ThirdPartyStorage from "./ThirdPartyStorage";
import ThirdPartyStorage from "./ThirdPartyStorage";
// import IsPrivateParam from "./IsPrivateParam";
import withLoader from "@docspace/client/src/HOCs/withLoader";
@ -117,8 +117,7 @@ const SetRoomParams = ({
/>
)} */}
{/* //TODO: Uncomment when third-party storages will be stable
{!isEdit && enableThirdParty && (
{!isEdit && enableThirdParty && (
<ThirdPartyStorage
t={t}
roomTitle={roomParams.title}
@ -128,7 +127,7 @@ const SetRoomParams = ({
setIsOauthWindowOpen={setIsOauthWindowOpen}
isDisabled={isDisabled}
/>
)} */}
)}
<div>
<Text fontWeight={600} className="icon-editor_text">
{t("Icon")}

View File

@ -14,17 +14,17 @@ const Tags = ({ id, className, style, tags, columnCount, onSelectTag }) => {
if (!columnCount) return;
const newTags = [];
const containerWidth = tagsRef.current.offsetWidth;
if (tags.length === 1) {
if (tags[0]?.isDefault || tags[0]?.isThirdParty) {
if (tags[0]?.isDefault) {
const tag = { ...tags[0], maxWidth: `100%` };
newTags.push(tag);
} else if (tags[0]?.isThirdParty) {
const tag = { ...tags[0], maxWidth: `36px` };
newTags.push(tag);
} else {
const tag = { label: tags[0], maxWidth: `100%` };
const tag = { label: tags[0].label || tags[0], maxWidth: `100%` };
newTags.push(tag);
}
@ -50,15 +50,12 @@ const Tags = ({ id, className, style, tags, columnCount, onSelectTag }) => {
for (let i = 0; i < tags.length; i++) {
if (tags[i]?.isThirdParty) {
const tag = { ...tags[i], maxWidth: `36px` };
newTags.push(tag);
} else if (tags[i].isDefault) {
} else if (tags[i]?.isDefault) {
const tag = { ...tags[i], maxWidth: `${maxWidthPercent}%` };
newTags.push(tag);
} else {
const tag = { label: tags[i], maxWidth: `${maxWidthPercent}%` };
newTags.push(tag);
}
}
@ -79,15 +76,12 @@ const Tags = ({ id, className, style, tags, columnCount, onSelectTag }) => {
for (let i = 0; i < columnCount; i++) {
if (tags[i]?.isThirdParty) {
const tag = { ...tags[i], maxWidth: `36px` };
newTags.push(tag);
} else if (tags[i]?.isDefault) {
const tag = { ...tags[i], maxWidth: `${maxWidthPercent}%` };
newTags.push(tag);
} else {
const tag = { label: tags[i], maxWidth: `${maxWidthPercent}%` };
newTags.push(tag);
}
}

View File

@ -99,10 +99,10 @@ export const FileType = Object.freeze({
* @readonly
*/
export const RoomsType = Object.freeze({
//FillingFormsRoom: 1, //TODO: Restore when certs will be done
// FillingFormsRoom: 1, //TODO: Restore when certs will be done
EditingRoom: 2,
//ReviewRoom: 3, //TODO: Restore when certs will be done
//ReadOnlyRoom: 4, //TODO: Restore when certs will be done
// ReviewRoom: 3, //TODO: Restore when certs will be done
// ReadOnlyRoom: 4, //TODO: Restore when certs will be done
CustomRoom: 5,
});