summaryrefslogtreecommitdiffstats
path: root/ui/src
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-04-22 09:24:13 -0700
committerDessalines <tyhou13@gmx.com>2019-04-22 09:24:13 -0700
commit466f988f47d858274c6de562a2ecc4ec6466bd4d (patch)
tree1d92e0775c0bf8be7b1d88ab9302d5314b691d9d /ui/src
parent1fce49ceefa685ac00d469a597748123df98f128 (diff)
Adding document titles.
- Fixes #100
Diffstat (limited to 'ui/src')
-rw-r--r--ui/src/components/communities.tsx3
-rw-r--r--ui/src/components/community.tsx1
-rw-r--r--ui/src/components/create-community.tsx4
-rw-r--r--ui/src/components/create-post.tsx4
-rw-r--r--ui/src/components/home.tsx4
-rw-r--r--ui/src/components/inbox.tsx4
-rw-r--r--ui/src/components/login.tsx4
-rw-r--r--ui/src/components/modlog.tsx4
-rw-r--r--ui/src/components/post.tsx1
-rw-r--r--ui/src/components/setup.tsx4
-rw-r--r--ui/src/components/user.tsx1
11 files changed, 33 insertions, 1 deletions
diff --git a/ui/src/components/communities.tsx b/ui/src/components/communities.tsx
index 9145c1cd..23206807 100644
--- a/ui/src/components/communities.tsx
+++ b/ui/src/components/communities.tsx
@@ -45,6 +45,7 @@ export class Communities extends Component<any, CommunitiesState> {
}
componentDidMount() {
+ document.title = "Forums - Lemmy";
let table = document.querySelector('#community_table');
Sortable.initTable(table);
}
@@ -55,7 +56,7 @@ export class Communities extends Component<any, CommunitiesState> {
{this.state.loading ?
<h5 class=""><svg class="icon icon-spinner spin"><use xlinkHref="#icon-spinner"></use></svg></h5> :
<div>
- <h5>Communities</h5>
+ <h5>Forums</h5>
<div class="table-responsive">
<table id="community_table" class="table table-sm table-hover">
<thead class="pointer">
diff --git a/ui/src/components/community.tsx b/ui/src/components/community.tsx
index c89d2f06..f521d518 100644
--- a/ui/src/components/community.tsx
+++ b/ui/src/components/community.tsx
@@ -99,6 +99,7 @@ export class Community extends Component<any, State> {
this.state.moderators = res.moderators;
this.state.admins = res.admins;
this.state.loading = false;
+ document.title = `/f/${this.state.community.name} - Lemmy`;
this.setState(this.state);
} else if (op == UserOperation.EditCommunity) {
let res: CommunityResponse = msg;
diff --git a/ui/src/components/create-community.tsx b/ui/src/components/create-community.tsx
index 0e806dbb..fb264ab2 100644
--- a/ui/src/components/create-community.tsx
+++ b/ui/src/components/create-community.tsx
@@ -8,6 +8,10 @@ export class CreateCommunity extends Component<any, any> {
this.handleCommunityCreate = this.handleCommunityCreate.bind(this);
}
+ componentDidMount() {
+ document.title = "Create Forum - Lemmy";
+ }
+
render() {
return (
<div class="container">
diff --git a/ui/src/components/create-post.tsx b/ui/src/components/create-post.tsx
index 7d2f1dd4..e2998ca7 100644
--- a/ui/src/components/create-post.tsx
+++ b/ui/src/components/create-post.tsx
@@ -8,6 +8,10 @@ export class CreatePost extends Component<any, any> {
this.handlePostCreate = this.handlePostCreate.bind(this);
}
+ componentDidMount() {
+ document.title = "Create Post - Lemmy";
+ }
+
render() {
return (
<div class="container">
diff --git a/ui/src/components/home.tsx b/ui/src/components/home.tsx
index eff09f7e..cebe222b 100644
--- a/ui/src/components/home.tsx
+++ b/ui/src/components/home.tsx
@@ -14,6 +14,10 @@ export class Home extends Component<any, any> {
)
}
+ componentDidMount() {
+ document.title = "Lemmy";
+ }
+
listType(): ListingType {
return (this.props.match.path == '/all') ? ListingType.All : ListingType.Subscribed;
}
diff --git a/ui/src/components/inbox.tsx b/ui/src/components/inbox.tsx
index e6ce6d13..e386aa1a 100644
--- a/ui/src/components/inbox.tsx
+++ b/ui/src/components/inbox.tsx
@@ -48,6 +48,10 @@ export class Inbox extends Component<any, InboxState> {
this.subscription.unsubscribe();
}
+ componentDidMount() {
+ document.title = `/u/${UserService.Instance.user.username} Inbox - Lemmy`;
+ }
+
render() {
let user = UserService.Instance.user;
return (
diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx
index 6d15a382..d66466b1 100644
--- a/ui/src/components/login.tsx
+++ b/ui/src/components/login.tsx
@@ -48,6 +48,10 @@ export class Login extends Component<any, State> {
this.subscription.unsubscribe();
}
+ componentDidMount() {
+ document.title = "Login - Lemmy";
+ }
+
render() {
return (
<div class="container">
diff --git a/ui/src/components/modlog.tsx b/ui/src/components/modlog.tsx
index 7145b4f6..55df617a 100644
--- a/ui/src/components/modlog.tsx
+++ b/ui/src/components/modlog.tsx
@@ -44,6 +44,10 @@ export class Modlog extends Component<any, ModlogState> {
this.subscription.unsubscribe();
}
+ componentDidMount() {
+ document.title = "Modlog - Lemmy";
+ }
+
setCombined(res: GetModlogResponse) {
let removed_posts = addTypeInfo(res.removed_posts, "removed_posts");
let locked_posts = addTypeInfo(res.locked_posts, "locked_posts");
diff --git a/ui/src/components/post.tsx b/ui/src/components/post.tsx
index a01bdcc8..5483338c 100644
--- a/ui/src/components/post.tsx
+++ b/ui/src/components/post.tsx
@@ -232,6 +232,7 @@ export class Post extends Component<any, PostState> {
this.state.moderators = res.moderators;
this.state.admins = res.admins;
this.state.loading = false;
+ document.title = `${this.state.post.name} - Lemmy`;
this.setState(this.state);
} else if (op == UserOperation.CreateComment) {
let res: CommentResponse = msg;
diff --git a/ui/src/components/setup.tsx b/ui/src/components/setup.tsx
index 9a671359..edb98260 100644
--- a/ui/src/components/setup.tsx
+++ b/ui/src/components/setup.tsx
@@ -45,6 +45,10 @@ export class Setup extends Component<any, State> {
this.subscription.unsubscribe();
}
+ componentDidMount() {
+ document.title = "Setup - Lemmy";
+ }
+
render() {
return (
<div class="container">
diff --git a/ui/src/components/user.tsx b/ui/src/components/user.tsx
index 8ebde48a..b530e41e 100644
--- a/ui/src/components/user.tsx
+++ b/ui/src/components/user.tsx
@@ -294,6 +294,7 @@ export class User extends Component<any, UserState> {
this.state.follows = res.follows;
this.state.moderates = res.moderates;
this.state.posts = res.posts;
+ document.title = `/u/${this.state.user.name} - Lemmy`;
this.setState(this.state);
}
}