mirror of
https://github.com/wassname/talk.git
synced 2026-07-18 12:40:13 +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">
|
||||
<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>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user