Adj. to 103
This commit is contained in:
parent
3d2e439674
commit
5ad5f16bdb
2
.gitignore
vendored
2
.gitignore
vendored
@ -18,5 +18,7 @@ PackageSources/SimObjects/Airplanes/**/panel/*.wasm
|
|||||||
EFB/efb.css
|
EFB/efb.css
|
||||||
EFB/efb.js
|
EFB/efb.js
|
||||||
EFB/efb.html
|
EFB/efb.html
|
||||||
|
EFB/efb.index.js
|
||||||
|
EFB/patched/
|
||||||
|
|
||||||
*.su
|
*.su
|
||||||
@ -1,13 +1,16 @@
|
|||||||
diff --git a/PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/efb.html b/PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/efb.html
|
Index: EFB.html
|
||||||
index a2e14f7..515e0d9 100644
|
===================================================================
|
||||||
--- a/PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/efb.html
|
--- EFB.html
|
||||||
+++ b/PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/efb.html
|
+++ EFB.html
|
||||||
@@ -7,4 +7,6 @@
|
@@ -4,7 +4,9 @@
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
-<script type="text/html" import-async="false" import-script="/Pages/VCockpit/Instruments/aircraft_efb/TFDi_MD11_efb/efb.index.js"></script>
|
||||||
|
+<script type="text/html" import-script="/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/efb.js" import-async="false"></script>
|
||||||
|
+<script type="text/html" import-script="/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/App.js" import-async="false"></script>
|
||||||
|
|
||||||
-<link rel="stylesheet" href="/Pages/VCockpit/Instruments/aircraft_efb/TFDi_MD11_efb/efb.css" />
|
-<link rel="stylesheet" href="/Pages/VCockpit/Instruments/aircraft_efb/TFDi_MD11_efb/efb.css" />
|
||||||
+<link rel="stylesheet" href="/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/efb.css" />
|
+<link rel="stylesheet" href="/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/efb.css" />
|
||||||
+<link rel="stylesheet" href="/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/App.css" />
|
+<link rel="stylesheet" href="/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/App.css" />
|
||||||
-<script type="text/html" import-script="/Pages/VCockpit/Instruments/aircraft_efb/TFDi_MD11_efb/efb.js" import-async="false"></script>
|
|
||||||
+<script type="text/html" import-script="/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/efb.js" import-async="false"></script>
|
|
||||||
+<script type="text/html" import-script="/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/App.js" import-async="false"></script>
|
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
diff --git a/PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/efb.js b/PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/efb.js
|
Index: EFB.js
|
||||||
index 0904cc9..d2bcd02 100644
|
===================================================================
|
||||||
--- a/PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/efb.js
|
--- EFB.js
|
||||||
+++ b/PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb/efb.js
|
+++ EFB.js
|
||||||
@@ -42333,9 +42333,16 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
@@ -40035,11 +40035,18 @@
|
||||||
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
),
|
||||||
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
||||||
"button",
|
"button",
|
||||||
{
|
{
|
||||||
- onClick: loadPayload,
|
- onClick: loadPayload,
|
||||||
@ -20,8 +21,10 @@ index 0904cc9..d2bcd02 100644
|
|||||||
+ children: "Manage payload & fuel"
|
+ children: "Manage payload & fuel"
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
||||||
@@ -42842,6 +42849,11 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
"button",
|
||||||
|
@@ -40537,8 +40544,13 @@
|
||||||
|
] })
|
||||||
] }) }) });
|
] }) }) });
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,13 +35,16 @@ index 0904cc9..d2bcd02 100644
|
|||||||
+
|
+
|
||||||
// src/components/Router.tsx
|
// src/components/Router.tsx
|
||||||
init_common();
|
init_common();
|
||||||
var import_jsx_runtime14 = __toESM(require_jsx_runtime());
|
var import_jsx_runtime15 = __toESM(require_jsx_runtime());
|
||||||
@@ -42858,7 +42870,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
var routes = {
|
||||||
|
@@ -40553,9 +40565,9 @@
|
||||||
|
button: {
|
||||||
title: "Payload",
|
title: "Payload",
|
||||||
icon: faWeightHanging
|
icon: Weight
|
||||||
},
|
},
|
||||||
- page: PayloadPage
|
- page: PayloadPage
|
||||||
+ page: App
|
+ page: App
|
||||||
},
|
},
|
||||||
"/perf": {
|
"/perf": {
|
||||||
button: {
|
button: {
|
||||||
|
title: "Perf",
|
||||||
|
|||||||
21
EFB/generatePatches.js
Normal file
21
EFB/generatePatches.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
const { createTwoFilesPatch } = require("diff");
|
||||||
|
const fs = require("fs");
|
||||||
|
|
||||||
|
// HTML
|
||||||
|
|
||||||
|
let file1Contents = fs.readFileSync("EFB.html").toString();
|
||||||
|
let file2Contents = fs.readFileSync("patched/EFB.html").toString();
|
||||||
|
let patch = createTwoFilesPatch(
|
||||||
|
"EFB.html",
|
||||||
|
"EFB.html",
|
||||||
|
file1Contents,
|
||||||
|
file2Contents
|
||||||
|
);
|
||||||
|
fs.writeFileSync("efb-html.patch", patch);
|
||||||
|
|
||||||
|
// JS
|
||||||
|
|
||||||
|
file1Contents = fs.readFileSync("EFB.js").toString();
|
||||||
|
file2Contents = fs.readFileSync("patched/EFB.js").toString();
|
||||||
|
patch = createTwoFilesPatch("EFB.js", "EFB.js", file1Contents, file2Contents);
|
||||||
|
fs.writeFileSync("efb-js.patch", patch);
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
const { applyPatch } = require("diff");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const util = require("node:util");
|
const util = require("node:util");
|
||||||
const exec = util.promisify(require("node:child_process").exec);
|
const exec = util.promisify(require("node:child_process").exec);
|
||||||
@ -6,17 +7,17 @@ const readline = require("readline");
|
|||||||
const outPath =
|
const outPath =
|
||||||
"./PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb";
|
"./PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/KH_TFDi_MD11_efb";
|
||||||
|
|
||||||
fs.copyFileSync("./EFB/efb.js", `${outPath}/efb.js`);
|
|
||||||
fs.copyFileSync("./EFB/efb.html", `${outPath}/efb.html`);
|
|
||||||
fs.copyFileSync("./EFB/efb.css", `${outPath}/efb.css`);
|
fs.copyFileSync("./EFB/efb.css", `${outPath}/efb.css`);
|
||||||
console.log("Files transferred.");
|
|
||||||
|
|
||||||
exec("git apply ./EFB/efb-js.patch").then(({ stdout, stderr }) => {
|
let file1Contents = fs.readFileSync("./EFB/efb.js").toString();
|
||||||
console.log("Patches efb.js applied.");
|
let patch = fs.readFileSync("./EFB/efb-js.patch").toString();
|
||||||
});
|
let patchedFile = applyPatch(file1Contents, patch);
|
||||||
exec("git apply ./EFB/efb-html.patch").then(({ stdout, stderr }) => {
|
fs.writeFileSync(`${outPath}/efb.js`, patchedFile);
|
||||||
console.log("Patches efb.html applied.");
|
|
||||||
});
|
file1Contents = fs.readFileSync("./EFB/efb.html").toString();
|
||||||
|
patch = fs.readFileSync("./EFB/efb-html.patch").toString();
|
||||||
|
patchedFile = applyPatch(file1Contents, patch);
|
||||||
|
fs.writeFileSync(`${outPath}/efb.html`, patchedFile);
|
||||||
|
|
||||||
var output = "";
|
var output = "";
|
||||||
var lineReader = readline.createInterface({
|
var lineReader = readline.createInterface({
|
||||||
|
|||||||
5
package.json
Normal file
5
package.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"devDependencies": {
|
||||||
|
"diff": "^8.0.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
23
pnpm-lock.yaml
generated
Normal file
23
pnpm-lock.yaml
generated
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
lockfileVersion: '9.0'
|
||||||
|
|
||||||
|
settings:
|
||||||
|
autoInstallPeers: true
|
||||||
|
excludeLinksFromLockfile: false
|
||||||
|
|
||||||
|
importers:
|
||||||
|
|
||||||
|
.:
|
||||||
|
devDependencies:
|
||||||
|
diff:
|
||||||
|
specifier: ^8.0.2
|
||||||
|
version: 8.0.2
|
||||||
|
|
||||||
|
packages:
|
||||||
|
|
||||||
|
diff@8.0.2:
|
||||||
|
resolution: {integrity: sha512-sSuxWU5j5SR9QQji/o2qMvqRNYRDOcBTgsJ/DeCf4iSN4gW+gNMXM7wFIP+fdXZxoNiAnHUTGjCr+TSWXdRDKg==}
|
||||||
|
engines: {node: '>=0.3.1'}
|
||||||
|
|
||||||
|
snapshots:
|
||||||
|
|
||||||
|
diff@8.0.2: {}
|
||||||
Loading…
x
Reference in New Issue
Block a user