notherbase-fs 3.2.6 → 3.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notherbase-fs",
3
- "version": "3.2.6",
3
+ "version": "3.2.7",
4
4
  "description": "Functions to help make developing for NotherBase easier.",
5
5
  "exports": "./notherbase-fs.js",
6
6
  "scripts": {
package/public/js/base.js CHANGED
@@ -21,8 +21,6 @@ class Base {
21
21
  this.username = "";
22
22
  this.email = "";
23
23
  this.lastUpdate = 0;
24
-
25
- this.refresh();
26
24
  }
27
25
 
28
26
  /**
@@ -79,7 +77,8 @@ class Base {
79
77
  logout = async () => {
80
78
  let response = await Base.commune("logout");
81
79
 
82
- return response;
80
+ location.reload();
81
+ //return response;
83
82
  }
84
83
 
85
84
  /**
@@ -110,11 +109,8 @@ class Base {
110
109
  });
111
110
 
112
111
  if (response.status === "success") {
113
- this.playerInventory.refresh();
114
112
  this.playerAccount.username = response.data;
115
113
  this.playerAccount.email = email;
116
- this.playerAccount.refresh();
117
- this.playerAttributes.refresh();
118
114
  }
119
115
 
120
116
  return response;
@@ -160,9 +156,6 @@ class Base {
160
156
  }));
161
157
 
162
158
  if (response.status != "success") console.log(`${window.location.pathname} - ${response.message}`);
163
-
164
- this.playerInventory.refresh();
165
- this.playerAttributes.refresh();
166
159
 
167
160
  return response;
168
161
  }
@@ -20,6 +20,7 @@
20
20
  Go to Nono Cove
21
21
  </a>
22
22
 
23
+ <script src="/js/chat-box.js"></script>
23
24
  <script>
24
25
  let chatTest = new ChatBox("<%= user.username %>", "test-chat");
25
26
  let chatTest2 = new ChatBox("<%= user.username %>", "test-chat-2");
@@ -9,8 +9,6 @@
9
9
  const base = new Base();
10
10
  </script>
11
11
 
12
-
13
-
14
12
  <main class="override">
15
13
  <% if (requireUser && !user) { %>
16
14
  <div class="login-cover">
package/views/footer.ejs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  <footer>
3
-
3
+ <%- user ? `<p class="login-status">Logged In: ${user.username}</p><button onclick="base.logout()">Logout</button>` : `<p class="login-status">Not Logged In</p>` %>
4
4
  </footer>
5
5
 
6
6
  </body>