mirror of
https://github.com/wassname/talk.git
synced 2026-08-08 11:28:12 +08:00
Integrate with embed
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
import { Localized } from "fluent-react/compat";
|
||||
import * as React from "react";
|
||||
import { StatelessComponent } from "react";
|
||||
|
||||
import { Typography } from "talk-ui/components";
|
||||
|
||||
export interface LogoProps {
|
||||
className?: string;
|
||||
gutterBottom?: boolean;
|
||||
}
|
||||
|
||||
const Logo: StatelessComponent<LogoProps> = props => {
|
||||
return (
|
||||
<Localized id="stream-logo">
|
||||
<Typography variant="heading1" gutterBottom={props.gutterBottom}>
|
||||
Talk NEO
|
||||
</Typography>
|
||||
</Localized>
|
||||
);
|
||||
};
|
||||
|
||||
export default Logo;
|
||||
@@ -4,7 +4,6 @@
|
||||
margin: calc(0.5 * var(--spacing-unit)) auto;
|
||||
}
|
||||
|
||||
.comment,
|
||||
.commentNotFound {
|
||||
margin: calc(5 * var(--spacing-unit)) auto;
|
||||
.button {
|
||||
margin-bottom: calc(2 * var(--spacing-unit));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import React, { StatelessComponent } from "react";
|
||||
|
||||
import Logo from "talk-stream/components/Logo";
|
||||
import { Button, Flex, Typography } from "talk-ui/components";
|
||||
|
||||
import CommentContainer from "../containers/CommentContainer";
|
||||
@@ -17,44 +16,25 @@ const PermalinkView: StatelessComponent<PermalinkViewProps> = ({
|
||||
comment,
|
||||
onShowAllComments,
|
||||
}) => {
|
||||
if (comment) {
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
<Logo />
|
||||
{assetURL && (
|
||||
<Button
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
onClick={onShowAllComments}
|
||||
fullWidth
|
||||
>
|
||||
Show all Comments
|
||||
</Button>
|
||||
)}
|
||||
<Flex direction="column" className={styles.comment}>
|
||||
<CommentContainer data={comment} />
|
||||
</Flex>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
<Logo />
|
||||
<Typography className={styles.commentNotFound}>
|
||||
Comment not found
|
||||
</Typography>
|
||||
{assetURL && (
|
||||
<Button
|
||||
variant="filled"
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
onClick={() => {
|
||||
window.location.href = assetURL;
|
||||
}}
|
||||
onClick={onShowAllComments}
|
||||
className={styles.button}
|
||||
fullWidth
|
||||
>
|
||||
Show all Comments
|
||||
</Button>
|
||||
)}
|
||||
{!comment && <Typography>Comment not found</Typography>}
|
||||
{comment && (
|
||||
<Flex direction="column">
|
||||
<CommentContainer data={comment} />
|
||||
</Flex>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -7,7 +7,6 @@ import { Button, Flex } from "talk-ui/components";
|
||||
import CommentContainer from "../containers/CommentContainer";
|
||||
import PostCommentFormContainer from "../containers/PostCommentFormContainer";
|
||||
import ReplyListContainer from "../containers/ReplyListContainer";
|
||||
import Logo from "./Logo";
|
||||
import * as styles from "./Stream.css";
|
||||
|
||||
export interface StreamProps {
|
||||
@@ -22,7 +21,6 @@ export interface StreamProps {
|
||||
const Stream: StatelessComponent<StreamProps> = props => {
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
<Logo gutterBottom />
|
||||
<PostCommentFormContainer assetID={props.assetID} />
|
||||
<Flex
|
||||
direction="column"
|
||||
|
||||
Reference in New Issue
Block a user