merge with server

This commit is contained in:
2023-12-11 14:55:17 +01:00
3 changed files with 34 additions and 10 deletions

View File

@ -12,8 +12,8 @@ export default class extends AbstractAuthentificateView
{
if (this.fill() === null)
return;
document.getElementById("save-button").onclick = this.save;
document.getElementById("delete-button").onclick = this.delete_accounts;
document.getElementById("save-account-button").onclick = this.acccount_save;
document.getElementById("delete-account-button").onclick = this.account_delete_accounts;
}
async fill()
@ -104,22 +104,27 @@ export default class extends AbstractAuthentificateView
async getHtml()
{
return `
<link rel="stylesheet" href="static/css/me.css">
<h1>ME</h1>
<div class="accounts">
<div class="account">
<h3>Account</h3>
<input type="text" placeholder="username" id="username">
<span id="error_username"></span>
<input type=password placeholder="new password" id="new_password">
<span id="error_new_password"></span>
<input type=password placeholder="current password" id="current_password">
<span id="error_current_password"></span>
<input type="button" value="Save Credentials" id="save-account-button">
<span id="error_save"></span>
<input type="button" value="Delete Account" id="delete-account-button">
<span id="error_delete"></span>
</div>
<div class="profile">
<input type="file" placeholder="username" id="avatar" accept="image/png, image/jpeg">
<h3>Profile</h3>
<input type="file" id="avatar" accept="image/png, image/jpeg">
<input type="button" value="Save profile" id="save-profile-button">
<span id="error_save"></span>
</div>
<input type="button" value="Save" id="save-button">
<span id="error_save"></span>
<input type="button" value="Delete" id="delete-button">
<span id="error_delete"></span>
<a href="/logout" class="nav__link" data-link>Logout</a>
`;
}