mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Custom terminal fonts support (#5414)
Fixes #5132 #5133 - bundled 7 new monospaced fonts for terminal - fix: refresh terminal font after changing in the preferences / keep cluster iframe accessible in DOM while not active/focused - display terminal's custom font preview with font-name in the select-box + live-preload for current `fontSize`, fix lint * Fixes for <Input/>: - remove duplicated error messages for sync validators - don't propagate invalid values on change (uncontrolled components only) - more informative error message for numeric input with min/max info
This commit is contained in:
1 parent
fae6bff6fb
commit
55a977554d
38 files changed
+325
-146
No files matched your search
@@ -45,7 +45,6 @@ export class ClusterFrameHandler {
|
||||
|
||||
iframe.id = `cluster-frame-${cluster.id}`;
|
||||
iframe.name = cluster.contextName;
|
||||
iframe.style.display = "none";
|
||||
iframe.setAttribute("src", getClusterFrameUrl(clusterId));
|
||||
iframe.addEventListener("load", action(() => {
|
||||
logger.info(`[LENS-VIEW]: frame for clusterId=${clusterId} has loaded`);
|
||||
@@ -95,7 +94,7 @@ export class ClusterFrameHandler {
|
||||
ipcRenderer.send(clusterVisibilityHandler);
|
||||
|
||||
for (const { frame: view } of this.views.values()) {
|
||||
view.style.display = "none";
|
||||
view.classList.add("hidden");
|
||||
}
|
||||
|
||||
const cluster = clusterId
|
||||
@@ -113,9 +112,9 @@ export class ClusterFrameHandler {
|
||||
|
||||
return undefined;
|
||||
},
|
||||
(view) => {
|
||||
(view: LensView) => {
|
||||
logger.info(`[LENS-VIEW]: cluster id=${clusterId} should now be visible`);
|
||||
view.frame.style.display = "flex";
|
||||
view.frame.classList.remove("hidden");
|
||||
ipcRenderer.send(clusterVisibilityHandler, clusterId);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -35,7 +35,20 @@
|
||||
background-color: var(--mainBackground);
|
||||
|
||||
iframe {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
// when updating font settings in the "Preferences -> Terminal" cluster's iframe
|
||||
// must be accessible in DOM (e.g. elem.getBoundingClientRect() must work)
|
||||
&.hidden {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user