mirror of
https://github.com/wassname/talk.git
synced 2026-09-11 12:51:33 +08:00
[CORL-161, CORL-240] Message Box (#2222)
* feat: Message Box * test: do all the testing stuff * fix: removed old messageBox * Update src/core/client/stream/tabs/configure/components/MessageBoxConfig.tsx Co-Authored-By: wyattjoh <wyattjoh@gmail.com> * fix: addressed space error
This commit is contained in:
+2
-2
@@ -2,6 +2,7 @@ import { Localized } from "fluent-react/compat";
|
||||
import React, { StatelessComponent, Suspense } from "react";
|
||||
import { Field } from "react-final-form";
|
||||
|
||||
import { MarkdownEditor } from "talk-framework/components/loadables";
|
||||
import {
|
||||
HorizontalGutter,
|
||||
Spinner,
|
||||
@@ -10,7 +11,6 @@ import {
|
||||
} from "talk-ui/components";
|
||||
|
||||
import Header from "../../../components/Header";
|
||||
import LazyMarkdown from "./LazyMarkdown";
|
||||
|
||||
interface Props {
|
||||
disabled: boolean;
|
||||
@@ -39,7 +39,7 @@ const ClosedStreamMessageConfig: StatelessComponent<Props> = ({ disabled }) => (
|
||||
{({ input, meta }) => (
|
||||
<>
|
||||
<Suspense fallback={<Spinner />}>
|
||||
<LazyMarkdown
|
||||
<MarkdownEditor
|
||||
id="configure-general-closedStreamMessage-content"
|
||||
name={input.name}
|
||||
onChange={input.onChange}
|
||||
|
||||
+3
-2
@@ -14,8 +14,9 @@ import {
|
||||
} from "talk-ui/components";
|
||||
|
||||
import OnOffField from "talk-admin/routes/configure/components/OnOffField";
|
||||
import { MarkdownEditor } from "talk-framework/components/loadables";
|
||||
|
||||
import Header from "../../../components/Header";
|
||||
import LazyMarkdown from "./LazyMarkdown";
|
||||
|
||||
interface Props {
|
||||
disabled: boolean;
|
||||
@@ -60,7 +61,7 @@ const GuidelinesConfig: StatelessComponent<Props> = ({ disabled }) => (
|
||||
{({ input, meta }) => (
|
||||
<>
|
||||
<Suspense fallback={<Spinner />}>
|
||||
<LazyMarkdown
|
||||
<MarkdownEditor
|
||||
id="configure-general-guidelines-content"
|
||||
name={input.name}
|
||||
onChange={input.onChange}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
export function loadMarkdownEditor() {
|
||||
return import("talk-framework/components/loadables/MarkdownEditor" /* webpackChunkName: "markdownEditor" */);
|
||||
}
|
||||
|
||||
export default React.lazy(loadMarkdownEditor);
|
||||
+3
-2
@@ -13,8 +13,9 @@ import {
|
||||
} from "talk-ui/components";
|
||||
|
||||
import OnOffField from "talk-admin/routes/configure/components/OnOffField";
|
||||
import { MarkdownEditor } from "talk-framework/components/loadables";
|
||||
|
||||
import Header from "../../../components/Header";
|
||||
import LazyMarkdown from "./LazyMarkdown";
|
||||
|
||||
interface Props {
|
||||
disabled: boolean;
|
||||
@@ -73,7 +74,7 @@ const SitewideCommentingConfig: StatelessComponent<Props> = ({ disabled }) => (
|
||||
{({ input, meta }) => (
|
||||
<>
|
||||
<Suspense fallback={<Spinner />}>
|
||||
<LazyMarkdown
|
||||
<MarkdownEditor
|
||||
id="configure-general-sitewideCommenting-message"
|
||||
name={input.name}
|
||||
onChange={input.onChange}
|
||||
|
||||
+1
-1
@@ -3,10 +3,10 @@ import React from "react";
|
||||
import { graphql } from "react-relay";
|
||||
|
||||
import { GeneralConfigRouteContainerQueryResponse } from "talk-admin/__generated__/GeneralConfigRouteContainerQuery.graphql";
|
||||
import { loadMarkdownEditor } from "talk-framework/components/loadables";
|
||||
import { withRouteConfig } from "talk-framework/lib/router";
|
||||
import { Delay, Spinner } from "talk-ui/components";
|
||||
|
||||
import { loadMarkdownEditor } from "../components/LazyMarkdown";
|
||||
import GeneralConfigContainer from "./GeneralConfigContainer";
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -2,6 +2,8 @@ import { merge } from "lodash";
|
||||
|
||||
export const settings = {
|
||||
id: "settings",
|
||||
moderation: "POST",
|
||||
premodLinksEnable: false,
|
||||
wordList: {
|
||||
suspect: ["idiot", "stupid"],
|
||||
banned: ["fuck"],
|
||||
|
||||
Reference in New Issue
Block a user