Skip to content

Commit

Permalink
4.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Fi1osof committed May 1, 2020
1 parent 7f60a41 commit 6922d26
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 3 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
4.0.6
============================================
- Added CallRequestButtons

4.0.5
============================================
- Fix schema
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prisma-cms/boilerplate",
"version": "4.0.5",
"version": "4.0.6",
"description": "Opensource framework CMS powered by GraphQL, Prisma, MySQL, React & Apollo GraphQL",
"private": false,
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import React from 'react';

import EditorComponent from '@prisma-cms/front-editor/lib/components/App/components/';

import {
CallRequestButtons as WebRtcCallRequestButtons,
} from '@prisma-cms/webrtc';

export class CallRequestButtons extends EditorComponent {

static Name = 'CallRequestButtons';

static defaultProps = {
...EditorComponent.defaultProps,
hide_wrapper_in_default_mode: true,
}


renderPanelView(content) {

const {
classes,
} = this.getEditorContext();

return super.renderPanelView(
content ||
<div
className={classes.panelButton}
>
CallRequestButtons
</div>
);
}


getRootElement() {

return super.getRootElement();
}


canBeParent(parent) {

return super.canBeParent(parent);
}


canBeChild(child) {

// return super.canBeChild(child);
return false;
}


renderChildren() {

// const {
// } = this.context;

// const {
// } = this.getEditorContext();

// const {
// ...other
// } = this.getComponentProps(this);

// return super.renderChildren();

return <WebRtcCallRequestButtons
key="CallRequestButtons"
/>
}

}

export default CallRequestButtons;
5 changes: 3 additions & 2 deletions src/components/Renderer/pages/Root/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import React from 'react';

import PrismaCmsComponent from "@prisma-cms/component";
import RootConnector from '@prisma-cms/front-editor/lib/components/Root';
Expand All @@ -9,6 +8,7 @@ import CreateUserPage from './components/pages/Users/User/Create';
import ChatRooms from './components/pages/ChatRooms';
import NoticesMenu from './components/society/NoticesMenu';
import ChatRoom from './components/pages/ChatRooms/ChatRoom';
import CallRequestButtons from './components/webrtc/CallRequestButtons';



Expand All @@ -29,6 +29,7 @@ class RootPage extends PrismaCmsComponent {
ChatRooms,
ChatRoom,
// PdfView,
CallRequestButtons,
])}
{...other}
/>
Expand Down

0 comments on commit 6922d26

Please sign in to comment.