This commit is contained in:
root
2026-04-28 06:53:57 +02:00
parent 5420097c63
commit e623c590f0
4 changed files with 35 additions and 17 deletions

View File

@@ -138,11 +138,13 @@ function restart() {
document.head.appendChild(styleTag); document.head.appendChild(styleTag);
} }
// console.log(css)
styleTag.textContent = css; styleTag.textContent = css;
const startmenuicon = document.getElementById('start-menu-icon');
document.getElementById('start-menu-icon').src = if(!startmenuicon) {
`../images/radix_os_${activeTheme}_img.png`; return true;
console.log(css) }
startmenuicon.src = `../images/radix_os_${activeTheme}_img.png`;
return true; return true;
} }
@@ -785,6 +787,7 @@ function positionTooltip(e) {
let x = e.clientX + offset; let x = e.clientX + offset;
let y = e.clientY + offset; let y = e.clientY + offset;
const rect = tooltip.getBoundingClientRect(); const rect = tooltip.getBoundingClientRect();
if (x + rect.width > window.innerWidth) { if (x + rect.width > window.innerWidth) {

14
public/views/rbac.hbs Normal file
View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Role Based Access Control</title>
</head>
<body>
<div class="container static" style="height: 100vh;">
<div class="card static" style="overflow-y:auto;flex: 1 1 auto;" >
</div>
</div>
</body>
</html>

View File

@@ -41,7 +41,6 @@
"height": "600px" "height": "600px"
}, },
"icon": "app.png", "icon": "app.png",
"license": "rbac",
"permissions": [ "permissions": [
{ {
"scope": "SYSTEM", "scope": "SYSTEM",

View File

@@ -18,20 +18,20 @@ module.exports = {
app.post('/api/open_app', (req, res) => { app.post('/api/open_app', (req, res) => {
const { name, view, viewLabel, location, size, state, zIndex } = req.body; const { name, view, viewLabel, location, size, state, zIndex } = req.body;
const pluginPath = path.join(global.path.plugins, name, 'plugin.json'); const pluginPath = path.join(global.path.plugins, name, 'plugin.json');
let context = fs.existsSync(pluginPath) let context = fs.existsSync(pluginPath)
? service.get('fileSystemManager').loadJSON(pluginPath) ? service.get('fileSystemManager').loadJSON(pluginPath)
: (JSON.parse(JSON.stringify(global.json.startMenuItems.live))).find(item => item.name == name); : (JSON.parse(JSON.stringify(global.json.startMenuItems.live))).find(item => item.name == name);
context.defaultSize = context.defaultSize =
context.menu.items.find(item => item.label == viewLabel)?.defaultSize || context.menu.items.find(item => item.label == viewLabel)?.defaultSize ||
{ width: 800, height: 600 }; { width: 800, height: 600 };
delete context.config; delete context.config;
res.json({ name, view, viewLabel, context, location, size, state, zIndex }); res.json({ name, view, viewLabel, context, location, size, state, zIndex });
}); });
@@ -66,7 +66,9 @@ module.exports = {
app.post('/window/Server/rbac', async (req, res) => {
await renderWindow(app, 'rbac.hbs', { }, { }, res)
});
app.post('/window/EventLog/eventlog', async (req, res) => { app.post('/window/EventLog/eventlog', async (req, res) => {
await renderWindow(app, 'eventlog.hbs', { }, { }, res) await renderWindow(app, 'eventlog.hbs', { }, { }, res)