1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-22 07:10:09 +01:00
This commit is contained in:
Donald Cheng Hong Zou 2022-01-24 20:11:35 -05:00
parent af71176296
commit 377abd87fd
2 changed files with 26 additions and 4 deletions

View File

@ -347,11 +347,29 @@ Endpoint = 0.0.0.0:51820
- For user who is using `v2.3.1` or below, please notice that all data that stored in the current database will **not** transfer to the new database. This is hard decision to move from TinyDB to SQLite. But SQLite does provide a thread-safe access and TinyDB doesn't. I couldn't find a safe way to transfer the data, so you need to do them manually... Sorry about that :pensive: . But I guess this would be a great start for future development :sunglasses:. - For user who is using `v2.3.1` or below, please notice that all data that stored in the current database will **not** transfer to the new database. This is hard decision to move from TinyDB to SQLite. But SQLite does provide a thread-safe access and TinyDB doesn't. I couldn't find a safe way to transfer the data, so you need to do them manually... Sorry about that :pensive: . But I guess this would be a great start for future development :sunglasses:.
<hr> <hr>
#### Update Method 1 (For `v3.0` or above)
1. Change your directory to `wgdashboard/src`
```bash
cd wgdashboard/src
```
2. Update the dashboard with the following
```bash
./wgd.sh update
```
> If this doesn't work, please use the method below. Sorry about that :(
#### Update Method 2
1. Change your directory to `wgdashboard` 1. Change your directory to `wgdashboard`
```shell ```shell
cd wgdashboard cd wgdashboard/src
``` ```
2. Update the dashboard 2. Update the dashboard
@ -365,6 +383,8 @@ Endpoint = 0.0.0.0:51820
./wgd.sh install ./wgd.sh install
``` ```
Starting with `v3.0`, you can simply do `./wgd.sh update` !! (I hope, lol) Starting with `v3.0`, you can simply do `./wgd.sh update` !! (I hope, lol)
## 🥘 Experimental Functions ## 🥘 Experimental Functions

View File

@ -37,18 +37,20 @@
{% include "footer.html" %} {% include "footer.html" %}
<script> <script>
$("button").on("click", function(e){ $("button").on("click", function(e){
let req = $("input[required]"); e.preventDefault();
let $password = $("#password");
let $username = $("#username");
let req = [$password, $username];
let check = true let check = true
for (let i = 0; i < req.length; i++){ for (let i = 0; i < req.length; i++){
if ($(req[i]).val().length === 0){ if ($(req[i]).val().length === 0){
$("button").html("Sign In"); $("button").html("Sign In");
check = false; check = false;
$("input[required]").addClass("is-invalid"); $(req[i]).addClass("is-invalid");
break; break;
} }
} }
if (check){ if (check){
e.preventDefault();
$(this).html("Signing In...").attr("disabled", "disabled"); $(this).html("Signing In...").attr("disabled", "disabled");
$.ajax({ $.ajax({
url: "/auth", url: "/auth",