mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Revert dynamic adding #app DIV
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
5591c59f26
commit
0a9e858ab6
@ -15,7 +15,7 @@ const setupRootMacClassnameInjectable = getInjectable({
|
||||
const isMac = di.inject(isMacInjectable);
|
||||
const rootElem = di.inject(rootElementInjectable);
|
||||
|
||||
rootElem.classList.toggle("is-mac", isMac);
|
||||
rootElem?.classList.toggle("is-mac", isMac);
|
||||
},
|
||||
}),
|
||||
injectionToken: beforeFrameStartsSecondInjectionToken,
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<div id="terminal-init"></div>
|
||||
</body>
|
||||
|
||||
|
||||
@ -3,22 +3,10 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import isMacInjectable from "../../common/vars/is-mac.injectable";
|
||||
|
||||
const rootElementInjectable = getInjectable({
|
||||
id: "root-element",
|
||||
instantiate: (di) => {
|
||||
const isMac = di.inject(isMacInjectable);
|
||||
|
||||
const rootElement = document.createElement("div");
|
||||
|
||||
rootElement.id = "app";
|
||||
rootElement.classList.toggle("is-mac", isMac);
|
||||
|
||||
document.getElementsByTagName("body")[0].append(rootElement);
|
||||
|
||||
return rootElement;
|
||||
},
|
||||
instantiate: () => document.getElementById("app"),
|
||||
});
|
||||
|
||||
export default rootElementInjectable;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user