/**
* Copyright (C) 2024 Puter Technologies Inc.
*
* This file is part of Puter.
*
* Puter is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
import UIWindowChangePassword from '../UIWindowChangePassword.js';
import UIWindowChangeEmail from './UIWindowChangeEmail.js';
import UIWindowChangeUsername from '../UIWindowChangeUsername.js';
import UIWindowConfirmUserDeletion from './UIWindowConfirmUserDeletion.js';
import UIWindowManageSessions from '../UIWindowManageSessions.js';
// About
export default {
id: 'account',
title_i18n_key: 'account',
icon: 'user.svg',
html: () => {
let h = `
${i18n('account')}
`;
// change password button
if(!window.user.is_temp){
h += `
`;
h += `${i18n('password')}`;
h += `
`;
h += ``;
h += `
`;
h += `
`;
}
// change username button
h += `
`;
h += `
`;
h += `${i18n('username')}`;
h += `${html_encode(window.user.username)}`;
h += `
`;
h += `
`;
h += ``;
h += `
`
h += `
`;
// change email button
if(window.user.email){
h += `
`;
h += `
`;
h += `${i18n('email')}`;
h += `${html_encode(window.user.email)}`;
h += `