frontend: Rework asset generation
This commit reworks frontend asset generation to not need manually written html files, but instead generate them automatically.
This commit is contained in:
parent
ebdbe9fabd
commit
ccab2883a6
42 changed files with 408 additions and 177 deletions
|
|
@ -18,4 +18,4 @@
|
|||
|
||||
.wisski.stopped {
|
||||
background-color: #ff7a7a;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,2 @@
|
|||
import "~/src/base/index"
|
||||
|
||||
import "./index.css"
|
||||
import "~/src/lib/remote"
|
||||
import "~/src/lib/highlight"
|
||||
|
|
@ -0,0 +1 @@
|
|||
@import url("../ControlIndex/index.css")
|
||||
|
|
@ -0,0 +1 @@
|
|||
import "../ControlIndex/index"
|
||||
0
internal/component/static/src/entry/HomeHome/index.css
Normal file
0
internal/component/static/src/entry/HomeHome/index.css
Normal file
0
internal/component/static/src/entry/HomeHome/index.ts
Normal file
0
internal/component/static/src/entry/HomeHome/index.ts
Normal file
|
|
@ -1 +0,0 @@
|
|||
<script type="module" src="./index.ts"></script>
|
||||
|
|
@ -1 +0,0 @@
|
|||
<script type="module" src="./index.ts"></script>
|
||||
|
|
@ -1 +0,0 @@
|
|||
<script type="module" src="./index.ts"></script>
|
||||
|
|
@ -1 +0,0 @@
|
|||
import "~/src/base/index"
|
||||
|
|
@ -49,6 +49,7 @@ function makeTextBuffer(target: HTMLElement, scrollContainer: HTMLElement, size:
|
|||
const elements = document.getElementsByClassName('remote-action')
|
||||
Array.from(elements).forEach((element) => {
|
||||
const action = element.getAttribute('data-action') as string;
|
||||
const reload = element.hasAttribute('data-force-reload');
|
||||
const param = element.getAttribute('data-param') as string | undefined;
|
||||
const bufferSize = (function () {
|
||||
const number = parseInt(element.getAttribute('data-buffer') ?? "", 10) ?? 0;
|
||||
|
|
@ -72,9 +73,17 @@ Array.from(elements).forEach((element) => {
|
|||
// create a button to eventually close everything
|
||||
const button = document.createElement("button")
|
||||
button.className = "pure-button pure-button-success"
|
||||
button.append("Close")
|
||||
button.append(reload ? "Close & Reload" : "Close")
|
||||
button.addEventListener('click', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (reload) {
|
||||
button.setAttribute('disabled', 'disabled');
|
||||
target.innerHTML = 'Reloading page ...'
|
||||
location.reload()
|
||||
return;
|
||||
}
|
||||
|
||||
modal.parentNode?.removeChild(modal);
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue