- Key{{this.apiKey.Key}}
+ Key
+ {{this.apiKey.Key}}
Expire At
@@ -64,12 +65,21 @@ export default {
\ No newline at end of file
diff --git a/src/static/app/src/components/signInComponents/RemoteServer.vue b/src/static/app/src/components/signInComponents/RemoteServer.vue
index 5d44143..e1dc50a 100644
--- a/src/static/app/src/components/signInComponents/RemoteServer.vue
+++ b/src/static/app/src/components/signInComponents/RemoteServer.vue
@@ -11,17 +11,19 @@ export default {
active: false,
startTime: undefined,
endTime: undefined,
- errorMsg: ""
+ errorMsg: "",
+ refreshing: false
}
},
methods: {
- handshake(){
+ async handshake(){
this.active = false;
+ this.refreshing = true;
if (this.server.host && this.server.apiKey){
this.startTime = undefined;
this.endTime = undefined;
this.startTime = dayjs()
- fetch(`${this.server.host}/api/handshake`, {
+ await fetch(`${this.server.host}/api/handshake`, {
headers: {
"content-type": "application/json",
"wg-dashboard-apikey": this.server.apiKey
@@ -39,7 +41,9 @@ export default {
}).catch((res) => {
this.active = false;
this.errorMsg = res;
- })
+ });
+
+ this.refreshing = false;
}
},
async connect(){
@@ -67,6 +71,9 @@ export default {
if (this.startTime && this.endTime){
return `${dayjs().subtract(this.startTime).millisecond()}ms`
}else{
+ if (this.refreshing){
+ return `Pinging...`
+ }
return this.errorMsg ? this.errorMsg : "N/A"
}
}
@@ -77,7 +84,7 @@ export default {
-
+
-
+
@@ -119,4 +138,27 @@ export default {
background-color: #dc3545;
box-shadow: 0 0 0 0.2rem #dc354545;
}
+
+ .spin{
+ animation: spin 1s infinite cubic-bezier(0.82, 0.58, 0.17, 0.9);
+ }
+
+ @keyframes spin {
+ 0%{
+ transform: rotate(0deg);
+ }
+ 100%{
+ transform: rotate(360deg);
+ }
+ }
+
+ @media screen and (max-width: 768px) {
+ .remoteServerContainer{
+ flex-direction: column;
+ }
+
+ .remoteServerContainer .button-group button{
+ width: 100%;
+ }
+ }
\ No newline at end of file
diff --git a/src/static/app/src/views/signin.vue b/src/static/app/src/views/signin.vue
index 1595785..2fd5c30 100644
--- a/src/static/app/src/views/signin.vue
+++ b/src/static/app/src/views/signin.vue
@@ -86,68 +86,66 @@ export default {
-
-
-
-
-
-
Welcome to
-
WGDashboard
-
- {{this.loginErrorMessage}}
-
-