From 98b0aa1092d8b46b621a7d9d2772aa972d6957b6 Mon Sep 17 00:00:00 2001 From: Michael Foiani Date: Sun, 19 Aug 2018 03:02:16 -0400 Subject: Made the website more interactive by adding alerts on successful and failed attempts when connecting to database. Also, dealt a bit with offline functionality. --- src/components/mao-forums.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/components/mao-forums.js') diff --git a/src/components/mao-forums.js b/src/components/mao-forums.js index 745c620..d4bee3c 100644 --- a/src/components/mao-forums.js +++ b/src/components/mao-forums.js @@ -110,7 +110,8 @@ class MaoForums extends connect(store)(PageViewElement) {

Recent Posts

-
+ + `; @@ -119,14 +120,25 @@ class MaoForums extends connect(store)(PageViewElement) { static get properties() { return { // This is the data from the store. signedIn: Boolean, - forumPosts: Array + forumPosts: Array, + + onceOnline: Boolean }} + constructor() { + super(); + + this.onceOnline = false; + } + _stateChanged(state) { this.signedIn = state.firebaseAuth .signedIn; this.forumPosts = state.firebaseFirestore .forumPosts; - this.updateSection(); + + if(!state.app.offline) { + this.onceOnline = true; + } } submitForum() { -- cgit v1.2.3-70-g09d2