Fix welcome.html
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
<div class="card p-2">
|
<div class="card p-2">
|
||||||
<header>
|
<header>
|
||||||
<h1 class="mb-0">
|
<h1 class="mb-0">
|
||||||
<img src="./images/logo-sunshine-45.png" height="45" alt="">
|
<img src="./images/logo-apollo-45.png" height="45" alt="">
|
||||||
{{ $t('welcome.greeting') }}
|
{{ $t('welcome.greeting') }}
|
||||||
</h1>
|
</h1>
|
||||||
</header>
|
</header>
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
success: false,
|
success: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
passwordData: {
|
passwordData: {
|
||||||
newUsername: "sunshine",
|
newUsername: "apollo",
|
||||||
newPassword: "",
|
newPassword: "",
|
||||||
confirmNewPassword: "",
|
confirmNewPassword: "",
|
||||||
},
|
},
|
||||||
@@ -74,13 +74,17 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
save() {
|
save() {
|
||||||
|
if (this.passwordData.newPassword !== this.passwordData.confirmNewPassword) {
|
||||||
|
this.error = "Password mismatch";
|
||||||
|
return;
|
||||||
|
};
|
||||||
this.error = null;
|
this.error = null;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
fetch("./api/password", {
|
fetch("./api/password", {
|
||||||
method: "POST",
|
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
|
method: 'POST',
|
||||||
body: JSON.stringify(this.passwordData),
|
body: JSON.stringify(this.passwordData),
|
||||||
}).then((r) => {
|
}).then((r) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user