37 lines
734 B
JavaScript
37 lines
734 B
JavaScript
|
import {LitElement, html} from './lit-all.min.js';
|
||
|
import * as tfrpc from '/static/tfrpc.js';
|
||
|
|
||
|
class TfDeleteAccountButtonElement extends LitElement {
|
||
|
static get properties() {
|
||
|
return {};
|
||
|
}
|
||
|
|
||
|
constructor() {
|
||
|
super();
|
||
|
}
|
||
|
|
||
|
deleteAccount() {
|
||
|
const res = confirm(
|
||
|
'Are you really sure you want to delete your account ?'
|
||
|
);
|
||
|
|
||
|
if (!res) return;
|
||
|
|
||
|
console.warn('TODO');
|
||
|
}
|
||
|
|
||
|
render() {
|
||
|
return html`
|
||
|
<link rel="stylesheet" href="/static/tildefriends-latest.css"/>
|
||
|
|
||
|
<span>This action is irreversible !</span>
|
||
|
|
||
|
<button class="red" @click=${this.deleteAccount}>
|
||
|
[Not implemented] Delete my Tilde Friends account
|
||
|
</button>
|
||
|
`;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
customElements.define('tf-delete-account-btn', TfDeleteAccountButtonElement);
|