initial files

This commit is contained in:
2026-04-22 11:55:23 +02:00
commit 92444ff38c
85 changed files with 16324 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
test
</body>
</html>

View File

@@ -0,0 +1,106 @@
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Hilfe</title>
<style>
ul#help li a,
ul#help li a:visited {
text-decoration: none;
color: var(--theme-container-card-color);
}
ul#help {
display:flex;
width: 100%;
padding: 0;
margin: 0;
left: 0;
position: relative;
overflow: auto;
flex-wrap: nowrap;
scrollbar-width: thin;
}
ul#help li {
display: inline-block;
width: auto;
padding: 10px;
box-sizing: border-box;
text-align: center;
}
</style>
</head>
<body>
<div class="container static" style="height: 100vh;">
<div id="helpTabs" class="tabs" style="overflow-y: auto;scrollbar-width: thin; padding:0;flex: 0 0 auto;"></div>
<div class="card static" style="overflow-y:auto;flex: 1 1 auto;" >
<div id="tabWrapper" class="tab-contents" ></div>
</div>
<div id="helpFooter" class="card static" style="height:auto;bottom:0;text-align:left;flex:0 0 auto;flex-direction:row;justify-content:space-between;gap:4px">
<div class="selectable">
<div style="color:var(--theme-accent-default-backcolor);font-weight:bold;">
<span>&copy; Radix OS</span> <span id="year"></span>
<span>Manuel Sowada</span>
</div>
</div>
<div id="plugin"></div>
</div>
</div>
</div>
<script type="text/javascript">
function showTabs() {
fetch(`/api/help/getTabs`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
})
.then(data => data.json())
.then(async data => {
data.forEach(async t => {
const tabElement = document.createElement('div');
tabElement.className = 'tab';
tabElement.dataset.tab = t.name;
tabElement.textContent = t.name;
tabElement.addEventListener('click', async () => {
Array.from(document.querySelectorAll('.tab')).forEach(t => t.classList.remove('active'));
tabElement.classList.add('active');
tabWrapper.innerHTML = '';
const response = await fetch('/api/help/getHelp', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ name: t.name })
});
const item = await response.json();
const html = `
<div>
<p>${response.status === 500 ? 'Hilfe nicht verfügbar' : item.html}</p>
${item.description ? `<hr /><p>${item.description}</p>` : ''}
</div>
`;
const container = document.querySelector('#tabWrapper');
container.innerHTML = html;
});
document.getElementById('helpTabs').appendChild(tabElement);
})
})
}
showTabs();
year.textContent = new Date().getFullYear();
</script>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<header>
<style>
</style>
</header>
<body>
<div class="container static">
<div class="card" style="overflow: auto;height:100vh">
<div id="jsonConfigTree" class="json-tree"></div>
</div>
</div>
</div>
</body>
<script>
fetch('/api/getConfig', { method: 'POST' })
.then(res => res.json())
.then(json => {
const tree = createJsonTree({
container: document.getElementById("jsonConfigTree"),
data: json,
expandInitially: true,
onSave: json => {
fetch('/config', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(json, null, 2)
}).then(() => writeEventLog(0, 'Serverconfig', tree.getChanges()) );
}
});
});
</script>

View File

@@ -0,0 +1,101 @@
<div class="container">
<div class="card">
<span style="font-weight: bold;">Dienst</span>
<button class="redbutton" id="shutdownButton">Abschalten</button>
<button class="yellowbutton" id="restartButton">Neustart</button>
<div>
<span>PID:</span> <span class="selectable" id="pid"></span>
<span class="copy-icon" onclick="copyToClipboard(`${document.getElementById('pid').textContent}`)">⧉</span>
</div>
</div>
<div class="card">
<div class="table-wrapper" style="max-height: 350px;">
<table id="releaseNotes">
<thead>
<tr>
<th class="text-align:left">Erledigt</th>
<th class="text-align:left">Timestamp</th>
<th class="text-align:left">User</th>
<th class="text-align:left">Note</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="card">
<div id="package" style="overflow:auto"></div>
</div>
</div>
<script>
shutdownButton.onclick = evt => {
fetch('/api/shutdown', { method: 'POST' })
.then(res => res.json())
.then(json => {
console.log(json);
});
};
restartButton.onclick = evt => {
fetch('/api/restart', { method: 'POST' })
.then(res => res.json())
.then(json => {
console.log(json);
});
};
fetch('/api/getServerInfo', { method: 'POST' })
.then(res => res.json())
.then(json => {
document.querySelector('#pid').innerHTML = json.pid;
const vt = virtualTable({
tableEl: document.getElementById('releaseNotes'),
data: [],
buffer: 5,
rowHeight: 30,
filterConfig:{
exceptedColumns: [ 'Erledigt' ],
columnModes: {
'datetime': 'text',
'sAMAccountName': 'text',
'Note': 'text'
},
checkboxFilter: {
column: 'finish',
rules: [
{ label: 'Nur erledigte', test: v => v === true },
{ label: 'Nur unerledigte', test: v => v === false },
]
}
},
customRender: (row, tr) => {
createTd(tr,
`
<label class="cb cb-modern">
<input id="id1" data-status="{{name}}" type="checkbox" ${row.finish ? 'checked' : ''} >
<span class="cb-box" aria-hidden="true"></span>
</label>
`, { });
createTd(tr, row.datetime, { });
createTd(tr, row.sAMAccountName, { });
createTd(tr, row.value, { attributes: { "data-tooltip": row.value } });
}
});
vt.addData(json.releaseNotes)
document.querySelector('#package').innerHTML = JSON.stringify(json.package).split(',').join('<br>');
/*
createJsonTree({
container: document.getElementById("package-json"),
data: json,
expandInitially: true,
onSave: () => { }
});
*/
});
</script>

View File

@@ -0,0 +1,30 @@
<header>
<style>
</style>
</header>
<div style="width:100%;height:calc(100% - 64px);">
<div id="jsonStyleTree" class="json-tree"></div>
</div>
<script>
fetch('/api/getStyles', { method: 'POST' })
.then(res => res.json())
.then(json => {
const tree = createJsonTree({
container: document.getElementById("jsonStyleTree"),
data: json,
expandInitially: true,
onSave: json => {
fetch('/style', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(json, null, 2)
}).then(() => writeEventLog(0, 'Stylesheet', JSON.stringify(tree.getChanges())) );
}
});
});
</script>

View File

@@ -0,0 +1,113 @@
<body>
<div class="container">
<div class="card">
<label><b>Farbgebung</b></label>
<select id="themeSwitch" style="width: 100%;">
<option value="dark">Dunkel</option>
<option value="light">Hell</option>
<option value="modern">Modern</option>
</select>
</div>
<div class="card">
<label><b>Schrift</b></label>
<select id="fontSelector" style="width: 100%;">
<optgroup label="Sans-Serif (Windows Standard)">
<option value="Arial">Arial</option>
<option value="Calibri">Calibri</option>
<option value="Candara">Candara</option>
<option value="Segoe UI">Segoe UI</option>
<option value="Tahoma">Tahoma</option>
<option value="Trebuchet MS">Trebuchet MS</option>
<option value="Verdana">Verdana</option>
</optgroup>
<optgroup label="Serif (Windows Standard)">
<option value="Cambria">Cambria</option>
<option value="Constantia">Constantia</option>
<option value="Georgia">Georgia</option>
<option value="Times New Roman">Times New Roman</option>
<option value="Palatino Linotype">Palatino Linotype</option>
</optgroup>
<optgroup label="Monospace / Fixed-Width">
<option value="Consolas">Consolas</option>
<option value="Courier New">Courier New</option>
<option value="Lucida Console">Lucida Console</option>
</optgroup>
<optgroup label="Fun / Decorative (Windows enthält einige)">
<option value="Comic Sans MS">Comic Sans MS</option>
<option value="Impact">Impact</option>
<option value="Segoe Script">Segoe Script</option>
<option value="Segoe Print">Segoe Print</option>
</optgroup>
</select>
<div style="display:flex;flex-direction:row;align-items:center;">
<input type="range" id="sizeSlider" min="10" max="32" value="18" style="width:100%;">
<span id="sizeValue">18px</span>
</div>
</div>
<div class="card" style="display:flex;flex:1;flex-direction:column;">
<label><b>Vollbildmodus</b></label>
<button class="bluebutton" id="fullscreenBtn">Einschalten</button>
<label>
Der Vollbildmodus hat den Vorteil, dass der komplette Bildschirm mit dieser Webseite ausgefüllt wird.<br><i style="color:var(--theme-accent-default-backcolor)">Sehr nützlich für mehr als einen Bildschirme</i>
</label>
</div>
</body>
<script>
const themeSwitch = document.getElementById("themeSwitch");
const selector = document.getElementById("fontSelector");
const slider = document.getElementById("sizeSlider");
const label = document.getElementById("sizeValue");
const fullScreenBtn = document.getElementById("fullscreenBtn");
fullScreenBtn.addEventListener("click", goFullscreen);
function goFullscreen() {
if (document.fullscreenElement) {
document.exitFullscreen();
} else {
document.documentElement.requestFullscreen();
}
fullScreenBtn.textContent = !document.fullscreenElement ? "Ausschalten" : "Einschalten";
}
if(savedTheme) { themeSwitch.value = savedTheme; }
if(savedFontFamily) { selector.value = savedFontFamily; }
if(savedFontSize) { slider.value = savedFontSize; label.textContent = savedFontSize + 'px'; }
themeSwitch.addEventListener('change', (evt) => {
const theme = evt.target.value;
switchTheme(theme);
})
function applySettings() {
switchTheme(themeSwitch.value);
setFontFamily(selector.value);
setFontSize(slider.value)
}
applySettings();
selector.addEventListener("change", () => {
setFontFamily(selector.value);
});
slider.addEventListener("input", () => {
setFontSize(parseInt(slider.value))
label.textContent = slider.value + 'px';
});
// jede option bekommt ihre eigene Schrift
[...selector.options].forEach(option => {
option.style.fontFamily = option.value;
});
</script>