Skip to content

Commit

Permalink
fix refresh total call
Browse files Browse the repository at this point in the history
  • Loading branch information
jasoryeh committed Jan 13, 2025
1 parent 8cbd670 commit 46c2544
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions web/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ export default {
this.clientsPersist[publicKey].isNew = true;
this.clientsPersist[publicKey].PrivateKey = privateKey;
this.alert(`Client '${name}'' at <b>${addresses}</b> was created, but <b>not</b> committed. <br />Click 'Save' to commit this client to the server.`, 15, null, 'orange-700');
await refresh_total();
await this.refresh_total();
} catch(err) {
this.alertError("An error occurred while creating the new client", err);
}
Expand All @@ -725,21 +725,21 @@ export default {
try {
await this.api.setHost(text);
this.alert('The server host was updated to \'' + text + '\'!', 5, null, 'green-600');
await refresh_total();
await this.refresh_total();
} catch(err) {
this.alertError("An error occurred while updating the server host", err);
}
},
async updateClientAddress() {
this.alert("Address updates are not yet supported.", 5, null, "yellow-400");
await refresh_total();
await this.refresh_total();
},
async updateClientName(client, name) {
try {
client.metadata.Name = [name];
await this.api.updateName(client.Reference, name);
this.alert('The client name was updated to \'' + name + '\'!', 5, null, 'green-600');
await refresh_total();
await this.refresh_total();
} catch(err) {
this.alertError("An error occurred while updating the client name", err);
}
Expand All @@ -749,7 +749,7 @@ export default {
this.server.metadata.Name = [name];
await this.api.updateServerName(name);
this.alert('The server name was updated to \'' + name + '\'!', 5, null, 'green-600');
await refresh_total();
await this.refresh_total();
} catch(err) {
this.alertError("An error occurred while updating the server name", err);
}
Expand All @@ -758,7 +758,7 @@ export default {
try {
await this.api.reload();
this.alert('The server configuration has been reloaded.', 5, null, 'blue-700');
await refresh_total();
await this.refresh_total();
} catch(err) {
this.alertError("An error occurred while reloading settings", err);
}
Expand All @@ -767,7 +767,7 @@ export default {
try {
await this.api.save();
this.alert('The settings were saved to the server.', 5, null, 'green-600');
await refresh_total();
await this.refresh_total();
} catch(err) {
this.alertError("An error occurred while saving the server changes", err);
}
Expand All @@ -791,7 +791,7 @@ export default {
try {
await this.api.up();
this.alert('The server was started.', 5, null, 'green-700');
await refresh_total();
await this.refresh_total();
} catch(err) {
this.alertError("An error occurred while creating starting the server", err);
}
Expand All @@ -800,7 +800,7 @@ export default {
try {
await this.api.down();
this.alert('The server was stopped.', 5, null, 'orange-700');
await refresh_total();
await this.refresh_total();
} catch(err) {
this.alertError("An error occurred while stopping the server", err);
}
Expand All @@ -809,7 +809,7 @@ export default {
try {
await this.api.deleteClient(publicKey);
this.alert(`The client with public key '${publicKey}' was deleted.`, 15, null, 'red-600');
await refresh_total();
await this.refresh_total();
} catch(err) {
this.alertError("An error occurred while deleting the client '" + publicKey + "''", err);
}
Expand All @@ -819,7 +819,7 @@ export default {
await this.api.disable(client.Reference);
client.metadata.Enabled = ['false'];
this.alert("Disabled Peer '" + client.metadata.Name[0] + "''", 5, null, "blue-400");
await refresh_total();
await this.refresh_total();
} catch(err) {
this.alertError("An error occurred while disabling the client '" + client.entries.PublicKey[0] + "''", err);
}
Expand All @@ -829,7 +829,7 @@ export default {
await this.api.enable(client.Reference);
client.metadata.Enabled = ['true'];
this.alert("Enabled Peer '" + client.metadata.Name[0] + "''", 5, null, "blue-400");
await refresh_total();
await this.refresh_total();
} catch(err) {
this.alertError("An error occurred while enabling the client '" + client.entries.PublicKey[0] + "''", err);
}
Expand Down

0 comments on commit 46c2544

Please sign in to comment.