From: Dessalines Date: Wed, 7 Apr 2021 15:54:38 +0000 (-0400) Subject: Adding back in logging X-Git-Url: http://these/git/%22%7Burl%7D/%22https:/image.com/%7Bpost.url%7D?a=commitdiff_plain;h=65606dd4138b5fa807f72a7a446ffdb0b38a0f00;p=lemmy-ui.git Adding back in logging --- diff --git a/src/shared/components/admin-settings.tsx b/src/shared/components/admin-settings.tsx index 0836a16..19856f3 100644 --- a/src/shared/components/admin-settings.tsx +++ b/src/shared/components/admin-settings.tsx @@ -212,6 +212,7 @@ export class AdminSettings extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.context.router.history.push("/"); diff --git a/src/shared/components/comment-form.tsx b/src/shared/components/comment-form.tsx index 2677594..a2da933 100644 --- a/src/shared/components/comment-form.tsx +++ b/src/shared/components/comment-form.tsx @@ -131,6 +131,7 @@ export class CommentForm extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); // Only do the showing and hiding if logged in if (UserService.Instance.localUserView) { diff --git a/src/shared/components/communities.tsx b/src/shared/components/communities.tsx index 74a1ac3..953e9f1 100644 --- a/src/shared/components/communities.tsx +++ b/src/shared/components/communities.tsx @@ -310,6 +310,7 @@ export class Communities extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); return; diff --git a/src/shared/components/community-form.tsx b/src/shared/components/community-form.tsx index 97d335e..396c0f3 100644 --- a/src/shared/components/community-form.tsx +++ b/src/shared/components/community-form.tsx @@ -314,6 +314,7 @@ export class CommunityForm extends Component< parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.state.loading = false; diff --git a/src/shared/components/community.tsx b/src/shared/components/community.tsx index bd60380..b75a816 100644 --- a/src/shared/components/community.tsx +++ b/src/shared/components/community.tsx @@ -432,6 +432,7 @@ export class Community extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.context.router.history.push("/"); diff --git a/src/shared/components/create-post.tsx b/src/shared/components/create-post.tsx index 00221d6..f3d453b 100644 --- a/src/shared/components/create-post.tsx +++ b/src/shared/components/create-post.tsx @@ -171,6 +171,7 @@ export class CreatePost extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); return; diff --git a/src/shared/components/create-private-message.tsx b/src/shared/components/create-private-message.tsx index 3771da6..aceba6b 100644 --- a/src/shared/components/create-private-message.tsx +++ b/src/shared/components/create-private-message.tsx @@ -137,6 +137,7 @@ export class CreatePrivateMessage extends Component< parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.state.loading = false; diff --git a/src/shared/components/login.tsx b/src/shared/components/login.tsx index 325df27..7a305f5 100644 --- a/src/shared/components/login.tsx +++ b/src/shared/components/login.tsx @@ -425,6 +425,7 @@ export class Login extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.state = this.emptyState; diff --git a/src/shared/components/main.tsx b/src/shared/components/main.tsx index 4fcc56a..05624d3 100644 --- a/src/shared/components/main.tsx +++ b/src/shared/components/main.tsx @@ -724,6 +724,7 @@ export class Main extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); return; diff --git a/src/shared/components/modlog.tsx b/src/shared/components/modlog.tsx index 1fc3b0b..960eeb2 100644 --- a/src/shared/components/modlog.tsx +++ b/src/shared/components/modlog.tsx @@ -471,6 +471,7 @@ export class Modlog extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); return; diff --git a/src/shared/components/navbar.tsx b/src/shared/components/navbar.tsx index 12a6ed2..04061a1 100644 --- a/src/shared/components/navbar.tsx +++ b/src/shared/components/navbar.tsx @@ -380,6 +380,7 @@ export class Navbar extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { if (msg.error == "not_logged_in") { UserService.Instance.logout(); diff --git a/src/shared/components/password_change.tsx b/src/shared/components/password_change.tsx index 6469cb7..0c30c71 100644 --- a/src/shared/components/password_change.tsx +++ b/src/shared/components/password_change.tsx @@ -149,6 +149,7 @@ export class PasswordChange extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.state.loading = false; diff --git a/src/shared/components/post-form.tsx b/src/shared/components/post-form.tsx index 219ca24..5ee3841 100644 --- a/src/shared/components/post-form.tsx +++ b/src/shared/components/post-form.tsx @@ -606,6 +606,7 @@ export class PostForm extends Component { parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.state.loading = false; diff --git a/src/shared/components/private-message-form.tsx b/src/shared/components/private-message-form.tsx index 89d6113..a19095d 100644 --- a/src/shared/components/private-message-form.tsx +++ b/src/shared/components/private-message-form.tsx @@ -225,6 +225,7 @@ export class PrivateMessageForm extends Component< parseMessage(msg: any) { let op = wsUserOp(msg); + console.log(msg); if (msg.error) { toast(i18n.t(msg.error), "danger"); this.state.loading = false;