EFB Patch
This commit is contained in:
parent
ed48918831
commit
6e6a5b6103
44
EFB/efb.patch
Normal file
44
EFB/efb.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
diff --git a/PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/TFDi_MD11_efb/efb.js b/PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/TFDi_MD11_efb/efb.js
|
||||||
|
index a490abd..be2703b 100644
|
||||||
|
--- a/PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/TFDi_MD11_efb/efb.js
|
||||||
|
+++ b/PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/TFDi_MD11_efb/efb.js
|
||||||
|
@@ -42191,9 +42191,16 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
||||||
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
||||||
|
"button",
|
||||||
|
{
|
||||||
|
- onClick: loadPayload,
|
||||||
|
+ onClick: () => dispatch(
|
||||||
|
+ setRoute({
|
||||||
|
+ path: "/payload",
|
||||||
|
+ params: {
|
||||||
|
+ icao: simBrief.plan.origin.icao_code
|
||||||
|
+ }
|
||||||
|
+ })
|
||||||
|
+ ),
|
||||||
|
className: "middle none center rounded-lg bg-green-700 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none",
|
||||||
|
- children: "Set payload & fuel"
|
||||||
|
+ children: "Manage payload & fuel"
|
||||||
|
}
|
||||||
|
),
|
||||||
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
||||||
|
@@ -42700,6 +42707,11 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
||||||
|
] }) }) });
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Exports for add. script
|
||||||
|
+ window.reactExports = __toESM(require_react());
|
||||||
|
+ window.jsxRuntimeExports = __toESM(require_jsx_runtime());
|
||||||
|
+ window.useSelector = useSelector
|
||||||
|
+
|
||||||
|
// src/components/Router.tsx
|
||||||
|
init_common();
|
||||||
|
var import_jsx_runtime14 = __toESM(require_jsx_runtime());
|
||||||
|
@@ -42716,7 +42728,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
||||||
|
title: "Payload",
|
||||||
|
icon: faWeightHanging
|
||||||
|
},
|
||||||
|
- page: PayloadPage
|
||||||
|
+ page: App
|
||||||
|
},
|
||||||
|
"/perf": {
|
||||||
|
button: {
|
||||||
@ -7,6 +7,4 @@
|
|||||||
|
|
||||||
|
|
||||||
<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/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/TFDi_MD11_efb/efb.js" import-async="false"></script>
|
||||||
<script type="text/html" import-script="/Pages/VCockpit/Instruments/aircraft_efb/TFDi_MD11_efb/App.js" import-async="false"></script>
|
|
||||||
|
|||||||
@ -42191,9 +42191,16 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|||||||
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
||||||
"button",
|
"button",
|
||||||
{
|
{
|
||||||
onClick: loadPayload,
|
onClick: () => dispatch(
|
||||||
|
setRoute({
|
||||||
|
path: "/payload",
|
||||||
|
params: {
|
||||||
|
icao: simBrief.plan.origin.icao_code
|
||||||
|
}
|
||||||
|
})
|
||||||
|
),
|
||||||
className: "middle none center rounded-lg bg-green-700 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none",
|
className: "middle none center rounded-lg bg-green-700 px-6 py-3 font-sans text-xs font-bold uppercase text-white shadow-md shadow-green-500/20 transition-all hover:shadow-lg hover:shadow-green-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none",
|
||||||
children: "Set payload & fuel"
|
children: "Manage payload & fuel"
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
||||||
@ -42700,6 +42707,11 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|||||||
] }) }) });
|
] }) }) });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Exports for add. script
|
||||||
|
window.reactExports = __toESM(require_react());
|
||||||
|
window.jsxRuntimeExports = __toESM(require_jsx_runtime());
|
||||||
|
window.useSelector = useSelector
|
||||||
|
|
||||||
// src/components/Router.tsx
|
// src/components/Router.tsx
|
||||||
init_common();
|
init_common();
|
||||||
var import_jsx_runtime14 = __toESM(require_jsx_runtime());
|
var import_jsx_runtime14 = __toESM(require_jsx_runtime());
|
||||||
@ -42716,7 +42728,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
|
|||||||
title: "Payload",
|
title: "Payload",
|
||||||
icon: faWeightHanging
|
icon: faWeightHanging
|
||||||
},
|
},
|
||||||
page: PayloadPage
|
page: App
|
||||||
},
|
},
|
||||||
"/perf": {
|
"/perf": {
|
||||||
button: {
|
button: {
|
||||||
|
|||||||
@ -1,27 +1,13 @@
|
|||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const insertLine = require("insert-line");
|
|
||||||
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);
|
||||||
|
|
||||||
const outFile =
|
const outFile =
|
||||||
"./PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/TFDi_MD11_efb/efb.js";
|
"./PackageSources/html_ui/Pages/VCockpit/Instruments/aircraft_efb/TFDi_MD11_efb/efb.js";
|
||||||
const startLine = 42709;
|
|
||||||
|
|
||||||
fs.copyFileSync("./efb.js", outFile);
|
fs.copyFileSync("./efb.js", outFile);
|
||||||
|
|
||||||
exec("git apply efb.patch").then(({stdout, stderr}) => {
|
exec("git apply efb.patch").then(({stdout, stderr}) => {
|
||||||
console.log("stdout:", stdout);
|
console.log("stdout:", stdout);
|
||||||
console.error("stderr:", stderr);
|
console.error("stderr:", stderr);
|
||||||
|
|
||||||
insertLine(outFile)
|
|
||||||
.contentSync(
|
|
||||||
`
|
|
||||||
// Exports for add. script
|
|
||||||
window.reactExports = __toESM(require_react());
|
|
||||||
window.jsxRuntimeExports = __toESM(require_jsx_runtime());
|
|
||||||
window.useSelector = useSelector
|
|
||||||
`,
|
|
||||||
{ overwrite: true }
|
|
||||||
)
|
|
||||||
.at(startLine);
|
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
"insert-line": "^1.1.0"
|
|
||||||
},
|
|
||||||
"packageManager": "pnpm@10.11.1+sha512.e519b9f7639869dc8d5c3c5dfef73b3f091094b0a006d7317353c72b124e80e1afd429732e28705ad6bfa1ee879c1fce46c128ccebd3192101f43dd67c667912"
|
|
||||||
}
|
|
||||||
22
pnpm-lock.yaml
generated
22
pnpm-lock.yaml
generated
@ -1,22 +0,0 @@
|
|||||||
lockfileVersion: '9.0'
|
|
||||||
|
|
||||||
settings:
|
|
||||||
autoInstallPeers: true
|
|
||||||
excludeLinksFromLockfile: false
|
|
||||||
|
|
||||||
importers:
|
|
||||||
|
|
||||||
.:
|
|
||||||
dependencies:
|
|
||||||
insert-line:
|
|
||||||
specifier: ^1.1.0
|
|
||||||
version: 1.1.0
|
|
||||||
|
|
||||||
packages:
|
|
||||||
|
|
||||||
insert-line@1.1.0:
|
|
||||||
resolution: {integrity: sha512-+sJ9fMN0VX9hmNuGtxaARPe7oA/a/atDzU+1v2IeDW66cJdm82gAbzfap4cyDRQ4710pZy3PtjL6Q5iJvX4cDA==}
|
|
||||||
|
|
||||||
snapshots:
|
|
||||||
|
|
||||||
insert-line@1.1.0: {}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user