Extract variables from html, add black theme to surveillance cameras, use svgs directly in the frontend
This commit is contained in:
parent
3183dec830
commit
3fdb84e481
26 changed files with 402 additions and 152 deletions
|
@ -14,6 +14,8 @@ function genImages() {
|
|||
}
|
||||
|
||||
const svg = fs.readFileSync("./assets/svg/" + path, "utf-8")
|
||||
.replace(/<\?xml.*?>/, "")
|
||||
.replace(/fill: ?none;/g,"fill: none !important;") // This is such a brittle hack...
|
||||
.replace(/\n/g, " ")
|
||||
.replace(/\r/g, "")
|
||||
.replace(/\\/g, "\\")
|
||||
|
@ -22,6 +24,7 @@ function genImages() {
|
|||
.replace(/[ -]/g, "_");
|
||||
module += ` public static ${name} = "${svg}"\n`
|
||||
module += ` public static ${name}_img = Img.AsImageElement(Svg.${name})\n`
|
||||
module += ` public static ${name}_svg() { return new FixedUiElement(Svg.${name});}\n`
|
||||
module += ` public static ${name}_ui() { return new FixedUiElement(Svg.${name}_img);}\n\n`
|
||||
}
|
||||
module += "}\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue