From: Dessalines Date: Tue, 3 Mar 2020 15:14:50 +0000 (-0500) Subject: More additions to icons. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/nerdica.net/%7Bthis.props.imageSrc%7D?a=commitdiff_plain;h=b3b4b7977570edda224003efca5396c10363599d;p=lemmy.git More additions to icons. - Adding edit and trash icons for sidebars - Adding pencil edit instead of modified. --- diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx index 014d82d3..3f7d8fa6 100644 --- a/ui/src/components/main.tsx +++ b/ui/src/components/main.tsx @@ -268,13 +268,16 @@ export class Main extends Component {
{`${this.state.siteRes.site.name}`}
{this.canAdmin && ( -
    -
  • +
      +
    • - {i18n.t('edit')} + + +
    diff --git a/ui/src/components/moment-time.tsx b/ui/src/components/moment-time.tsx index a256f785..76e5fe28 100644 --- a/ui/src/components/moment-time.tsx +++ b/ui/src/components/moment-time.tsx @@ -1,6 +1,6 @@ import { Component } from 'inferno'; import moment from 'moment'; -import { getMomentLanguage, setupTippy } from '../utils'; +import { getMomentLanguage, setupTippy, capitalizeFirstLetter } from '../utils'; import { i18n } from '../i18next'; interface MomentTimeProps { @@ -28,10 +28,15 @@ export class MomentTime extends Component { if (this.props.data.updated) { return ( - {i18n.t('modified')} {moment.utc(this.props.data.updated).fromNow()} + + + + {moment.utc(this.props.data.updated).fromNow()} ); } else { diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx index bc23543a..6e285ee9 100644 --- a/ui/src/components/post-listing.tsx +++ b/ui/src/components/post-listing.tsx @@ -579,8 +579,14 @@ export class PostListing extends Component { - {i18n.t('view_source')} + + +
  • )} diff --git a/ui/src/components/sidebar.tsx b/ui/src/components/sidebar.tsx index 5c8ef1a9..a78589d5 100644 --- a/ui/src/components/sidebar.tsx +++ b/ui/src/components/sidebar.tsx @@ -13,6 +13,7 @@ import { getUnixTime, pictshareAvatarThumbnail, showAvatars, + setupTippy, } from '../utils'; import { CommunityForm } from './community-form'; import { i18n } from '../i18next'; @@ -46,6 +47,10 @@ export class Sidebar extends Component { this.handleEditCancel = this.handleEditCancel.bind(this); } + componentDidUpdate() { + setupTippy(); + } + render() { return (
    @@ -84,26 +89,37 @@ export class Sidebar extends Component { /c/{community.name} -
      +
        {this.canMod && ( <> -
      • +
      • - {i18n.t('edit')} + + +
      • {this.amCreator && ( -
      • +
      • - {!community.deleted - ? i18n.t('delete') - : i18n.t('restore')} + + +
      • )} diff --git a/ui/src/components/symbols.tsx b/ui/src/components/symbols.tsx index 09efcf68..108fbab3 100644 --- a/ui/src/components/symbols.tsx +++ b/ui/src/components/symbols.tsx @@ -42,6 +42,9 @@ export class Symbols extends Component { + + +