}
componentDidMount() {
- document.title = "Communities - Lemmy";
+ document.title = `Communities - ${WebSocketService.Instance.site.name}`;
}
// Necessary for back button for some reason
this.state.community = res.community;
this.state.moderators = res.moderators;
this.state.admins = res.admins;
- document.title = `/c/${this.state.community.name} - Lemmy`;
+ document.title = `/c/${this.state.community.name} - ${WebSocketService.Instance.site.name}`;
this.setState(this.state);
this.fetchPosts();
} else if (op == UserOperation.EditCommunity) {
import { Component } from 'inferno';
import { CommunityForm } from './community-form';
import { Community } from '../interfaces';
+import { WebSocketService } from '../services';
export class CreateCommunity extends Component<any, any> {
}
componentDidMount() {
- document.title = "Create Community - Lemmy";
+ document.title = `Create Community - ${WebSocketService.Instance.site.name}`;
}
render() {
import { Component } from 'inferno';
import { PostForm } from './post-form';
+import { WebSocketService } from '../services';
export class CreatePost extends Component<any, any> {
}
componentDidMount() {
- document.title = "Create Post - Lemmy";
+ document.title = `Create Post - ${WebSocketService.Instance.site.name}`;
}
render() {
}
componentDidMount() {
- document.title = `/u/${UserService.Instance.user.username} Inbox - Lemmy`;
+ document.title = `/u/${UserService.Instance.user.username} Inbox - ${WebSocketService.Instance.site.name}`;
}
render() {
}
componentDidMount() {
- document.title = "Login - Lemmy";
+ document.title = `Login - ${WebSocketService.Instance.site.name}`;
}
render() {
this.subscription.unsubscribe();
}
- componentDidMount() {
- document.title = "Lemmy";
- }
-
// Necessary for back button for some reason
componentWillReceiveProps(nextProps: any) {
if (nextProps.history.action == 'POP') {
this.state.site.site = res.site;
this.state.site.banned = res.banned;
this.setState(this.state);
+ document.title = `${WebSocketService.Instance.site.name}`;
+
} else if (op == UserOperation.EditSite) {
let res: SiteResponse = msg;
this.state.site.site = res.site;
}
componentDidMount() {
- document.title = "Modlog - Lemmy";
+ document.title = `Modlog - ${WebSocketService.Instance.site.name}`;
}
setCombined(res: GetModlogResponse) {
this.state.moderators = res.moderators;
this.state.admins = res.admins;
this.state.loading = false;
- document.title = `${this.state.post.name} - Lemmy`;
+ document.title = `${this.state.post.name} - ${WebSocketService.Instance.site.name}`;
this.setState(this.state);
} else if (op == UserOperation.CreateComment) {
let res: CommentResponse = msg;
}
componentDidMount() {
- document.title = "Search - Lemmy";
+ document.title = `Search - ${WebSocketService.Instance.site.name}`;
}
render() {
let res: SearchResponse = msg;
this.state.searchResponse = res;
this.state.loading = false;
- document.title = `Search - ${this.state.q} - Lemmy`;
+ document.title = `Search - ${this.state.q} - ${WebSocketService.Instance.site.name}`;
window.scrollTo(0,0);
this.setState(this.state);
import { Component } from 'inferno';
+import { WebSocketService } from '../services';
let general =
[
}
componentDidMount() {
- document.title = "Sponsors - Lemmy";
+ document.title = `Sponsors - ${WebSocketService.Instance.site.name}`;
}
render() {
this.state.moderates = res.moderates;
this.state.posts = res.posts;
this.state.loading = false;
- document.title = `/u/${this.state.user.name} - Lemmy`;
+ document.title = `/u/${this.state.user.name} - ${WebSocketService.Instance.site.name}`;
window.scrollTo(0,0);
this.setState(this.state);
} else if (op == UserOperation.EditComment) {
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" type="image/svg+xml" href="/static/assets/favicon.svg" />
<link rel="apple-touch-icon" href="/static/assets/apple-touch-icon.png" />
- <title>Lemmy</title>
<link rel="stylesheet" href="/static/assets/libs/balloon-css/balloon.min.css">
<script src="/static/assets/libs/sortable/sortable.min.js"></script>
</head>
} else {
console.log('No JWT cookie found.');
}
-
}
public login(res: LoginResponse) {
export class WebSocketService {
private static _instance: WebSocketService;
public subject: Subject<any>;
- public instanceName: string;
public site: Site;
public admins: Array<UserView>;