dynamically generated avatars.

This commit is contained in:
lllllllillllllillll 2024-03-13 16:32:14 -07:00
parent a841fed064
commit 12e75af9b0
11 changed files with 4 additions and 4 deletions

View file

@ -4,6 +4,8 @@
* Moved functions into dashboard controller.
* Added modal placeholder with loading spinner.
* Independently updating container cards.
* Container cards display pending actions (starting, stopping, pausing, restarting).
* Dynamically generated avatars.
## v0.40 (Feb 26th 2024) - HTMX rewrite
* Pages rewritten to use HTMX.

View file

@ -17,7 +17,7 @@ export const Register = function(req,res){
export const submitRegister = async function(req,res){
let { name, username, email, password, confirmPassword, avatar, warning, secret } = req.body;
let { name, username, email, password, confirmPassword, warning, secret } = req.body;
if (secret != SECRET) {
@ -55,7 +55,6 @@ export const submitRegister = async function(req,res){
password: bcrypt.hashSync(password,10),
role: await userRole(),
group: 'all',
avatar: `<img src="/images/avatars/${avatar}">`,
lastLogin: newLogin,
});
@ -67,7 +66,6 @@ export const submitRegister = async function(req,res){
req.session.user = newUser.username;
req.session.UUID = newUser.UUID;
req.session.role = newUser.role;
req.session.avatar = newUser.avatar;
const syslog = await Syslog.create({
user: req.session.user,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View file

@ -138,7 +138,7 @@
</div>
<div class="nav-item dropdown">
<a href="#" class="nav-link d-flex lh-1 text-reset p-0" data-bs-toggle="dropdown" aria-label="Open user menu">
<span class="avatar avatar-sm bg-green-lt" name="JD" title="JD">JD</span></span>
<span class="avatar avatar-sm bg-green-lt"><%= name.charAt(0) %></span></span>
<div class="d-none d-xl-block ps-2">
<div>
<%= name %>