dynamically generated avatars.
|
@ -4,6 +4,8 @@
|
||||||
* Moved functions into dashboard controller.
|
* Moved functions into dashboard controller.
|
||||||
* Added modal placeholder with loading spinner.
|
* Added modal placeholder with loading spinner.
|
||||||
* Independently updating container cards.
|
* Independently updating container cards.
|
||||||
|
* Container cards display pending actions (starting, stopping, pausing, restarting).
|
||||||
|
* Dynamically generated avatars.
|
||||||
|
|
||||||
## v0.40 (Feb 26th 2024) - HTMX rewrite
|
## v0.40 (Feb 26th 2024) - HTMX rewrite
|
||||||
* Pages rewritten to use HTMX.
|
* Pages rewritten to use HTMX.
|
||||||
|
|
|
@ -17,7 +17,7 @@ export const Register = function(req,res){
|
||||||
|
|
||||||
export const submitRegister = async 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) {
|
if (secret != SECRET) {
|
||||||
|
@ -55,7 +55,6 @@ export const submitRegister = async function(req,res){
|
||||||
password: bcrypt.hashSync(password,10),
|
password: bcrypt.hashSync(password,10),
|
||||||
role: await userRole(),
|
role: await userRole(),
|
||||||
group: 'all',
|
group: 'all',
|
||||||
avatar: `<img src="/images/avatars/${avatar}">`,
|
|
||||||
lastLogin: newLogin,
|
lastLogin: newLogin,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -67,7 +66,6 @@ export const submitRegister = async function(req,res){
|
||||||
req.session.user = newUser.username;
|
req.session.user = newUser.username;
|
||||||
req.session.UUID = newUser.UUID;
|
req.session.UUID = newUser.UUID;
|
||||||
req.session.role = newUser.role;
|
req.session.role = newUser.role;
|
||||||
req.session.avatar = newUser.avatar;
|
|
||||||
|
|
||||||
const syslog = await Syslog.create({
|
const syslog = await Syslog.create({
|
||||||
user: req.session.user,
|
user: req.session.user,
|
||||||
|
|
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 19 KiB |
|
@ -138,7 +138,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-item dropdown">
|
<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">
|
<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 class="d-none d-xl-block ps-2">
|
||||||
<div>
|
<div>
|
||||||
<%= name %>
|
<%= name %>
|
||||||
|
|