{this.posts()} @@ -207,8 +225,11 @@ export class Main extends Component {
- {this.siteName()} - {this.adminButtons()} +
+ {this.siteName()} + {this.adminButtons()} +
+
{this.trendingCommunities()} @@ -284,6 +305,7 @@ export class Main extends Component { id: community.community_id, local: community.community_local, actor_id: community.community_actor_id, + icon: community.community_icon, }} /> @@ -346,6 +368,7 @@ export class Main extends Component { ; messages: Array; unreadCount: number; - siteName: string; - version: string; - admins: Array; searchParam: string; toggleSearch: boolean; siteLoading: boolean; + siteRes: GetSiteResponse; + onSiteBanner?(url: string): any; } export class Navbar extends Component { @@ -61,9 +59,30 @@ export class Navbar extends Component { mentions: [], messages: [], expanded: false, - siteName: undefined, - version: undefined, - admins: [], + siteRes: { + site: { + id: null, + name: null, + creator_id: null, + creator_name: null, + published: null, + number_of_users: null, + number_of_posts: null, + number_of_comments: null, + number_of_communities: null, + enable_downvotes: null, + open_registration: null, + enable_nsfw: null, + icon: null, + banner: null, + creator_preferred_username: null, + }, + my_user: null, + admins: [], + banned: [], + online: null, + version: null, + }, searchParam: '', toggleSearch: false, siteLoading: true, @@ -158,12 +177,25 @@ export class Navbar extends Component { // TODO class active corresponding to current page navbar() { + let user = UserService.Instance.user; return (