From: Dessalines Date: Sun, 2 Feb 2020 19:22:35 +0000 (-0500) Subject: Doing comment-node, comment-form and private-message. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/readmes/%7B%7D/%22%7Burl%7D/%7BlocalRss%7D?a=commitdiff_plain;h=6124133e8517165a97aa87af5485857a000951a2;p=lemmy.git Doing comment-node, comment-form and private-message. --- diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx index 7eb30f50..eaa054d8 100644 --- a/ui/src/components/comment-form.tsx +++ b/ui/src/components/comment-form.tsx @@ -15,7 +15,6 @@ import { WebSocketService, UserService } from '../services'; import autosize from 'autosize'; import Tribute from 'tributejs/src/Tribute.js'; import { i18n } from '../i18next'; -import { T } from 'inferno-i18next'; interface CommentFormProps { postId?: number; @@ -127,7 +126,7 @@ export class CommentForm extends Component { .previewMode && 'active'}`} onClick={linkEvent(this, this.handlePreviewToggle)} > - # + {i18n.t('preview')} )} {this.props.node && ( @@ -136,7 +135,7 @@ export class CommentForm extends Component { class="btn btn-sm btn-secondary mr-2" onClick={linkEvent(this, this.handleReplyCancel)} > - # + {i18n.t('cancel')} )} { target="_blank" class="d-inline-block float-right text-muted small font-weight-bold" > - # + {i18n.t('formatting_help')}
{ {this.isMod && (
  • - # + {i18n.t('mod')}
  • )} {this.isAdmin && (
  • - # + {i18n.t('admin')}
  • )} {this.isPostCreator && (
  • - # + {i18n.t('creator')}
  • )} {(node.comment.banned_from_community || node.comment.banned) && (
  • - # + {i18n.t('banned')}
  • )}
  • @@ -258,7 +257,7 @@ export class CommentNode extends Component { class="pointer" onClick={linkEvent(this, this.handleReplyClick)} > - # + {i18n.t('reply')}
  • @@ -276,7 +275,7 @@ export class CommentNode extends Component { class="pointer" onClick={linkEvent(this, this.handleEditClick)} > - # + {i18n.t('edit')}
  • @@ -307,7 +306,7 @@ export class CommentNode extends Component { className="pointer" onClick={linkEvent(this, this.handleViewSource)} > - # + {i18n.t('view_source')}
  • @@ -315,7 +314,7 @@ export class CommentNode extends Component { className="text-muted" to={`/post/${node.comment.post_id}/comment/${node.comment.id}`} > - # + {i18n.t('link')}
  • {/* Admins and mods can remove comments */} @@ -331,7 +330,7 @@ export class CommentNode extends Component { this.handleModRemoveShow )} > - # + {i18n.t('remove')} ) : ( { this.handleModRemoveSubmit )} > - # + {i18n.t('restore')} )} @@ -360,7 +359,7 @@ export class CommentNode extends Component { this.handleModBanFromCommunityShow )} > - # + {i18n.t('ban')} ) : ( { this.handleModBanFromCommunitySubmit )} > - # + {i18n.t('unban')} )} @@ -392,7 +391,7 @@ export class CommentNode extends Component { ) : ( <> - # + {i18n.t('are_you_sure')} { this.handleAddModToCommunity )} > - # + {i18n.t('yes')} { this.handleCancelConfirmAppointAsMod )} > - # + {i18n.t('no')} )} @@ -429,12 +428,12 @@ export class CommentNode extends Component { this.handleShowConfirmTransferCommunity )} > - # + {i18n.t('transfer_community')} ) : ( <> - # + {i18n.t('are_you_sure')} { this.handleTransferCommunity )} > - # + {i18n.t('yes')} { this.handleCancelShowConfirmTransferCommunity )} > - # + {i18n.t('no')} )} @@ -468,7 +467,7 @@ export class CommentNode extends Component { class="pointer" onClick={linkEvent(this, this.handleModBanShow)} > - # + {i18n.t('ban_from_site')} ) : ( { this.handleModBanSubmit )} > - # + {i18n.t('unban_from_site')} )} @@ -500,13 +499,13 @@ export class CommentNode extends Component { ) : ( <> - # + {i18n.t('are_you_sure')} - # + {i18n.t('yes')} { this.handleCancelConfirmAppointAsAdmin )} > - # + {i18n.t('no')} )} @@ -534,18 +533,18 @@ export class CommentNode extends Component { this.handleShowConfirmTransferSite )} > - # + {i18n.t('transfer_site')} ) : ( <> - # + {i18n.t('are_you_sure')} - # + {i18n.t('yes')} { this.handleCancelShowConfirmTransferSite )} > - # + {i18n.t('no')} )} @@ -579,16 +578,14 @@ export class CommentNode extends Component { onInput={linkEvent(this, this.handleModRemoveReasonChange)} /> )} {this.state.showBanDialog && (
    - + - # + {i18n.t('reply')} @@ -152,7 +151,7 @@ export class PrivateMessage extends Component< class="pointer" onClick={linkEvent(this, this.handleEditClick)} > - # + {i18n.t('edit')}
  • @@ -173,7 +172,7 @@ export class PrivateMessage extends Component< className="pointer" onClick={linkEvent(this, this.handleViewSource)} > - # + {i18n.t('view_source')}