From 939000fc05bdfa3532e7286dac649569224bc87a Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 30 Apr 2019 08:19:00 -0700 Subject: [PATCH] Custom site name. - Fixes #113 --- ui/src/components/main.tsx | 4 ++-- ui/src/components/navbar.tsx | 19 +++++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx index 88eed600e..f4ad37713 100644 --- a/ui/src/components/main.tsx +++ b/ui/src/components/main.tsx @@ -216,7 +216,7 @@ export class Main extends Component { landing() { return (
-
Welcome to +
Powered by LemmyBeta
@@ -226,7 +226,7 @@ export class Main extends Component {

Suggest new features or report bugs here.

Made with Rust, Actix, Inferno, Typescript.

- ) + ) } posts() { diff --git a/ui/src/components/navbar.tsx b/ui/src/components/navbar.tsx index ee19e5c5b..6861461c1 100644 --- a/ui/src/components/navbar.tsx +++ b/ui/src/components/navbar.tsx @@ -3,7 +3,7 @@ import { Link } from 'inferno-router'; import { Subscription } from "rxjs"; import { retryWhen, delay, take } from 'rxjs/operators'; import { WebSocketService, UserService } from '../services'; -import { UserOperation, GetRepliesForm, GetRepliesResponse, SortType } from '../interfaces'; +import { UserOperation, GetRepliesForm, GetRepliesResponse, SortType, GetSiteResponse } from '../interfaces'; import { msgOp } from '../utils'; import { version } from '../version'; @@ -12,6 +12,7 @@ interface NavbarState { expanded: boolean; expandUserDropdown: boolean; unreadCount: number; + siteName: string; } export class Navbar extends Component { @@ -21,7 +22,8 @@ export class Navbar extends Component { isLoggedIn: (UserService.Instance.user !== undefined), unreadCount: 0, expanded: false, - expandUserDropdown: false + expandUserDropdown: false, + siteName: undefined } constructor(props: any, context: any) { @@ -45,6 +47,8 @@ export class Navbar extends Component { (err) => console.error(err), () => console.log('complete') ); + + WebSocketService.Instance.getSite(); } render() { @@ -59,13 +63,12 @@ export class Navbar extends Component { } // TODO class active corresponding to current page - // TODO toggle css collapse navbar() { return (