diff options
author | Dessalines <tyhou13@gmx.com> | 2020-04-14 16:07:20 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-04-14 16:07:20 -0400 |
commit | 1336b4ed6023e7fcf0fd40be63569966ee4b1b45 (patch) | |
tree | e62e4422e0ba0430ea6d060f01d20dee22d6e564 /ui/src/components/main.tsx | |
parent | f040dac647d50c97e3f9ab8058563a7fe0f29261 (diff) | |
parent | 641e4c5d96d9d152bc75318b3ea08f789d920b2b (diff) |
Merge branch 'dev' into federation
Diffstat (limited to 'ui/src/components/main.tsx')
-rw-r--r-- | ui/src/components/main.tsx | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx index 38003312..366d3be8 100644 --- a/ui/src/components/main.tsx +++ b/ui/src/components/main.tsx @@ -33,13 +33,12 @@ import { SortSelect } from './sort-select'; import { ListingTypeSelect } from './listing-type-select'; import { DataTypeSelect } from './data-type-select'; import { SiteForm } from './site-form'; +import { UserListing } from './user-listing'; import { wsJsonToRes, repoUrl, mdToHtml, fetchLimit, - pictshareAvatarThumbnail, - showAvatars, toast, getListingTypeFromProps, getPageFromProps, @@ -316,20 +315,12 @@ export class Main extends Component<any, MainState> { <li class="list-inline-item">{i18n.t('admins')}:</li> {this.state.siteRes.admins.map(admin => ( <li class="list-inline-item"> - <Link - class="text-body font-weight-bold" - to={`/u/${admin.name}`} - > - {admin.avatar && showAvatars() && ( - <img - height="32" - width="32" - src={pictshareAvatarThumbnail(admin.avatar)} - class="rounded-circle mr-1" - /> - )} - <span>{admin.name}</span> - </Link> + <UserListing + user={{ + name: admin.name, + avatar: admin.avatar, + }} + /> </li> ))} </ul> @@ -619,6 +610,7 @@ export class Main extends Component<any, MainState> { this.state.siteRes.site = data.site; this.state.showEditSite = false; this.setState(this.state); + toast(i18n.t('site_saved')); } else if (res.op == UserOperation.GetPosts) { let data = res.data as GetPostsResponse; this.state.posts = data.posts; |