mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
Make readonly and add translations
This commit is contained in:
@@ -60,7 +60,7 @@ class Permalink extends React.Component<PermalinkProps> {
|
|||||||
<MatchMedia minWidth="xs">
|
<MatchMedia minWidth="xs">
|
||||||
<ButtonIcon>share</ButtonIcon>
|
<ButtonIcon>share</ButtonIcon>
|
||||||
</MatchMedia>
|
</MatchMedia>
|
||||||
<Localized id="comments-permalink-share">
|
<Localized id="comments-permalinkButton-share">
|
||||||
<span>Share</span>
|
<span>Share</span>
|
||||||
</Localized>
|
</Localized>
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -38,15 +38,19 @@ class PermalinkPopover extends React.Component<InnerProps> {
|
|||||||
const { copied } = this.state;
|
const { copied } = this.state;
|
||||||
return (
|
return (
|
||||||
<Flex itemGutter="half" className={styles.root}>
|
<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}>
|
<CopyToClipboard text={permalinkURL} onCopy={this.onCopy}>
|
||||||
<Button color="primary" variant="filled" size="small">
|
<Button color="primary" variant="filled" size="small">
|
||||||
{copied ? (
|
{copied ? (
|
||||||
<Localized id="comments-permalink-copied">
|
<Localized id="comments-permalinkPopover-copied">
|
||||||
<span>Copied!</span>
|
<span>Copied!</span>
|
||||||
</Localized>
|
</Localized>
|
||||||
) : (
|
) : (
|
||||||
<Localized id="comments-permalink-copy">
|
<Localized id="comments-permalinkPopover-copy">
|
||||||
<span>Copy</span>
|
<span>Copy</span>
|
||||||
</Localized>
|
</Localized>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { Localized } from "fluent-react/compat";
|
||||||
import React, { StatelessComponent } from "react";
|
import React, { StatelessComponent } from "react";
|
||||||
|
|
||||||
import { Button, Flex, Typography } from "talk-ui/components";
|
import { Button, Flex, Typography } from "talk-ui/components";
|
||||||
@@ -19,18 +20,24 @@ const PermalinkView: StatelessComponent<PermalinkViewProps> = ({
|
|||||||
return (
|
return (
|
||||||
<div className={styles.root}>
|
<div className={styles.root}>
|
||||||
{assetURL && (
|
{assetURL && (
|
||||||
<Button
|
<Localized id="comments-permalinkView-showAllComments">
|
||||||
id="talk-comments-permalinkView-showAllComments"
|
<Button
|
||||||
variant="outlined"
|
id="talk-comments-permalinkView-showAllComments"
|
||||||
color="primary"
|
variant="outlined"
|
||||||
onClick={onShowAllComments}
|
color="primary"
|
||||||
className={styles.button}
|
onClick={onShowAllComments}
|
||||||
fullWidth
|
className={styles.button}
|
||||||
>
|
fullWidth
|
||||||
Show all Comments
|
>
|
||||||
</Button>
|
Show all Comments
|
||||||
|
</Button>
|
||||||
|
</Localized>
|
||||||
|
)}
|
||||||
|
{!comment && (
|
||||||
|
<Localized id="comments-permalinkView-commentNotFound">
|
||||||
|
<Typography>Comment not found</Typography>
|
||||||
|
</Localized>
|
||||||
)}
|
)}
|
||||||
{!comment && <Typography>Comment not found</Typography>}
|
|
||||||
{comment && (
|
{comment && (
|
||||||
<Flex direction="column">
|
<Flex direction="column">
|
||||||
<CommentContainer data={comment} />
|
<CommentContainer data={comment} />
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ comments-postCommentForm-post = Post
|
|||||||
comments-stream-loadMore = Load more
|
comments-stream-loadMore = Load more
|
||||||
comments-replyList-showAll = Show all
|
comments-replyList-showAll = Show all
|
||||||
|
|
||||||
comments-permalink-share = Share
|
comments-permalinkButton-share = Share
|
||||||
comments-permalink-copy = Copy
|
comments-permalinkPopover-copy = Copy
|
||||||
comments-permalink-copied = Copied
|
comments-permalinkPopover-copied = Copied
|
||||||
|
comments-permalinkView-showAllComments = Show all comments
|
||||||
|
comments-permalinkView-commentNotFound = Comment not found
|
||||||
|
|||||||
Reference in New Issue
Block a user