mirror of
https://github.com/wassname/talk.git
synced 2026-08-12 12:30:39 +08:00
Adds plugin for question box.
This commit is contained in:
@@ -112,6 +112,10 @@ class Embed extends Component {
|
||||
content={asset.settings.infoBoxContent}
|
||||
enable={asset.settings.infoBoxEnable}
|
||||
/>
|
||||
<QuestionBox
|
||||
content={asset.settings.questionBoxContent}
|
||||
enable={asset.settings.questionBoxEnable}
|
||||
/>
|
||||
<RestrictedContent restricted={banned} restrictedComp={
|
||||
<SuspendedAccount
|
||||
canEditName={user && user.canEditName}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import React from 'react';
|
||||
const packagename = 'coral-plugin-questionbox';
|
||||
|
||||
const QuestionBox = ({enable, content}) =>
|
||||
<div
|
||||
className={`${packagename}-info ${enable ? null : ', hidden'}` }>
|
||||
{content}
|
||||
</div>;
|
||||
|
||||
export default QuestionBox;
|
||||
@@ -28,6 +28,14 @@ const SettingSchema = new Schema({
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
questionBoxEnable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
questionBoxContent: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
organizationName: {
|
||||
type: String
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user