Merge branch 'next' into user-box-responsive

This commit is contained in:
Kiwi
2018-08-09 20:00:55 +02:00
committed by GitHub
4 changed files with 34 additions and 21 deletions
@@ -60,7 +60,7 @@ class Permalink extends React.Component<PermalinkProps> {
<MatchMedia gtWidth="xs">
<ButtonIcon>share</ButtonIcon>
</MatchMedia>
<Localized id="comments-permalink-share">
<Localized id="comments-permalinkButton-share">
<span>Share</span>
</Localized>
</Button>
@@ -38,15 +38,19 @@ class PermalinkPopover extends React.Component<InnerProps> {
const { copied } = this.state;
return (
<Flex itemGutter="half" className={styles.root}>
<TextField defaultValue={permalinkURL} className={styles.textField} />
<TextField
defaultValue={permalinkURL}
className={styles.textField}
readOnly
/>
<CopyToClipboard text={permalinkURL} onCopy={this.onCopy}>
<Button color="primary" variant="filled" size="small">
{copied ? (
<Localized id="comments-permalink-copied">
<Localized id="comments-permalinkPopover-copied">
<span>Copied!</span>
</Localized>
) : (
<Localized id="comments-permalink-copy">
<Localized id="comments-permalinkPopover-copy">
<span>Copy</span>
</Localized>
)}
@@ -1,3 +1,4 @@
import { Localized } from "fluent-react/compat";
import React, { MouseEvent, StatelessComponent } from "react";
import { Button, Flex, Typography } from "talk-ui/components";
@@ -19,21 +20,27 @@ const PermalinkView: StatelessComponent<PermalinkViewProps> = ({
return (
<div className={styles.root}>
{showAllCommentsHref && (
<Button
id="talk-comments-permalinkView-showAllComments"
variant="outlined"
color="primary"
onClick={onShowAllComments}
className={styles.button}
href={showAllCommentsHref}
target="_parent"
fullWidth
anchor
>
Show all Comments
</Button>
<Localized id="comments-permalinkView-showAllComments">
<Button
id="talk-comments-permalinkView-showAllComments"
variant="outlined"
color="primary"
onClick={onShowAllComments}
className={styles.button}
href={showAllCommentsHref}
target="_parent"
fullWidth
anchor
>
Show all Comments
</Button>
</Localized>
)}
{!comment && (
<Localized id="comments-permalinkView-commentNotFound">
<Typography>Comment not found</Typography>
</Localized>
)}
{!comment && <Typography>Comment not found</Typography>}
{comment && (
<Flex direction="column">
<CommentContainer data={comment} />
+5 -3
View File
@@ -6,9 +6,11 @@ comments-postCommentForm-post = Post
comments-stream-loadMore = Load more
comments-replyList-showAll = Show all
comments-permalink-share = Share
comments-permalink-copy = Copy
comments-permalink-copied = Copied
comments-permalinkButton-share = Share
comments-permalinkPopover-copy = Copy
comments-permalinkPopover-copied = Copied
comments-permalinkView-showAllComments = Show all comments
comments-permalinkView-commentNotFound = Comment not found
comments-userBoxUnauthenticated-joinTheConversation = Join the conversation
comments-userBoxUnauthenticated-signIn = Sign in