diff --git a/controllers/dashboard.js b/controllers/dashboard.js
index 28e94a6..925f491 100644
--- a/controllers/dashboard.js
+++ b/controllers/dashboard.js
@@ -120,6 +120,10 @@ export const DashboardAction = async (req, res) => {
await Permission.update({ hide: false }, { where: { user: req.session.user } });
res.send("ok");
return;
+ case 'alert':
+ req.session.alert = '';
+ res.send('');
+ return;
}
function status (state) {
@@ -331,17 +335,17 @@ export const Stats = async (req, res) => {
// Imported by utils/install.js
export async function addAlert (session, name) {
- session.alert = `
-
-
- Loading...
-
-
- Installing ${name}. It should appear on the dashboard shortly.
-
-
-
-
`;
+ session.alert = `
+
+
+ Loading...
+
+
+ Installing ${name}. It should appear on the dashboard shortly.
+
+
+
+
`;
}
export const UpdatePermissions = async (req, res) => {
diff --git a/router/index.js b/router/index.js
index 0bcf10e..b5b8f01 100644
--- a/router/index.js
+++ b/router/index.js
@@ -36,7 +36,7 @@ const permissionCheck = async (req, res, next) => {
let action = req.path.split("/")[2];
let trigger = req.header('hx-trigger-name');
const userAction = ['start', 'stop', 'restart', 'pause', 'uninstall', 'upgrade', 'edit', 'logs', 'view'];
- const userPaths = ['card', 'updates', 'hide', 'reset'];
+ const userPaths = ['card', 'updates', 'hide', 'reset', 'alert'];
if (userAction.includes(action)) {
let permission = await Permission.findOne({ where: { containerName: trigger, user: user }, attributes: [`${action}`] });
if (permission) {
diff --git a/views/dashboard.html b/views/dashboard.html
index a8772b0..de2b065 100644
--- a/views/dashboard.html
+++ b/views/dashboard.html
@@ -7,8 +7,8 @@
DweebUI - Dashboard
-
-
+
+