From f8b8344815300b36fff22b8d3f64ab4074bfdfea Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 25 Apr 2019 18:42:21 -0700 Subject: [PATCH 1/9] Added sponsor --- ui/src/components/sponsors.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ui/src/components/sponsors.tsx b/ui/src/components/sponsors.tsx index c9923be..dd1026e 100644 --- a/ui/src/components/sponsors.tsx +++ b/ui/src/components/sponsors.tsx @@ -1,7 +1,10 @@ import { Component } from 'inferno'; let general = - ["Eduardo Cavazos"]; + [ + "Nathan J. Goode", + "Eduardo Cavazos" +]; // let highlighted = []; // let silver = []; // let gold = []; @@ -43,10 +46,10 @@ export class Sponsors extends Component { } sponsors() { return ( -
+
Sponsors

General Sponsors are those that pledged $10 to $39 to Lemmy.

-
+
{general.map(s =>
{s}
From cd03fa5e038956b6e4d84fbab831d67d991505f4 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 25 Apr 2019 20:14:52 -0700 Subject: [PATCH 2/9] Temp --- server/src/websocket_server/server.rs | 2 +- ui/src/components/community-form.tsx | 5 ++++- ui/src/components/login.tsx | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/server/src/websocket_server/server.rs b/server/src/websocket_server/server.rs index dbd1be8..c99b32a 100644 --- a/server/src/websocket_server/server.rs +++ b/server/src/websocket_server/server.rs @@ -969,7 +969,7 @@ impl Perform for ListCommunities { let sort = SortType::from_str(&self.sort)?; - let communities: Vec = CommunityView::list(&conn, user_id, sort, self.page, self.limit)?; + let communities: Vec = CommunityView::list(&conn, user_id, sort, self.page, Some(50))?; // Return the jwt Ok( diff --git a/ui/src/components/community-form.tsx b/ui/src/components/community-form.tsx index 66071a3..5effa73 100644 --- a/ui/src/components/community-form.tsx +++ b/ui/src/components/community-form.tsx @@ -120,7 +120,10 @@ export class CommunityForm extends Component { i.state.registerLoading = true; i.setState(i.state); event.preventDefault(); - WebSocketService.Instance.register(i.state.registerForm); + setTimeout(function(){ + WebSocketService.Instance.register(i.state.registerForm); + }, 10000); } handleRegisterUsernameChange(i: Login, event: any) { From 009b3b50793ffb42790eb4949860e8f079823762 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 25 Apr 2019 22:50:42 -0700 Subject: [PATCH 3/9] Spamtimer --- server/src/websocket_server/server.rs | 2 +- ui/src/components/communities.tsx | 2 +- ui/src/components/login.tsx | 14 +++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/server/src/websocket_server/server.rs b/server/src/websocket_server/server.rs index c99b32a..dbd1be8 100644 --- a/server/src/websocket_server/server.rs +++ b/server/src/websocket_server/server.rs @@ -969,7 +969,7 @@ impl Perform for ListCommunities { let sort = SortType::from_str(&self.sort)?; - let communities: Vec = CommunityView::list(&conn, user_id, sort, self.page, Some(50))?; + let communities: Vec = CommunityView::list(&conn, user_id, sort, self.page, self.limit)?; // Return the jwt Ok( diff --git a/ui/src/components/communities.tsx b/ui/src/components/communities.tsx index 3834400..b5233c2 100644 --- a/ui/src/components/communities.tsx +++ b/ui/src/components/communities.tsx @@ -33,7 +33,7 @@ export class Communities extends Component { let listCommunitiesForm: ListCommunitiesForm = { sort: SortType[SortType.TopAll], - limit: 9999, + limit: 100, } WebSocketService.Instance.listCommunities(listCommunitiesForm); diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx index 2a9f8d7..e6dec2d 100644 --- a/ui/src/components/login.tsx +++ b/ui/src/components/login.tsx @@ -10,6 +10,7 @@ interface State { registerForm: RegisterForm; loginLoading: boolean; registerLoading: boolean; + spamTimer: number; } @@ -28,7 +29,8 @@ export class Login extends Component { admin: false, }, loginLoading: false, - registerLoading: false + registerLoading: false, + spamTimer: new Date().getTime() } constructor(props: any, context: any) { @@ -124,6 +126,7 @@ export class Login extends Component {
+
- +
+
+
- +