Compare commits

...

3 Commits

Author SHA1 Message Date
Sylvia Crowe 3135a3cd76 fix: split the apple locale on the region for LANG
We use AppleLocale to get the desired language when running on macos.
Unfortunately, if a region is set, the locale is not equivalent to the
LANG environment variable. It appends an extra region field that we did
not previously filter out. This change ensures that it will be filtered
out when present.
2024-03-13 17:59:43 -07:00
Mike Sawka fc0b82836c quick UI updates (center imageview, fix terminal cursor colors, and add firacode font) (#445)
* center imageview images

* fix terminal selection colors #442

* add firacode font
2024-03-13 16:24:47 -07:00
Mike Sawka d1baf504ba quick fixes -- terminal selection color and connection modal terminal styles (#440)
* fix lightmode selction color

* fix styles on remote conn view
2024-03-12 14:41:47 -07:00
12 changed files with 43 additions and 22 deletions
Binary file not shown.
Binary file not shown.
-2
View File
@@ -220,6 +220,4 @@
--modal-header-bottom-border-color: rgba(241, 246, 243, 0.15);
--logo-button-hover-bg-color: #1e1e1e;
--xterm-viewport-border-color: rgba(241, 246, 243, 0.15);
}
-2
View File
@@ -74,6 +74,4 @@
--toggle-thumb-color: var(--app-bg-color);
--logo-button-hover-bg-color: #f0f0f0;
--xterm-viewport-border-color: rgba(0, 0, 0, 0.3);
}
+3 -1
View File
@@ -3,7 +3,7 @@
:root {
/*
* term colors (16 + 2) form the base terminal theme
* term colors (16 + 6) form the base terminal theme
* for consistency these colors should be used by plugins/applications
*/
--term-black: #000000;
@@ -27,4 +27,6 @@
--term-cmdtext: #ffffff;
--term-foreground: #d3d7cf;
--term-background: #000000;
--term-selection-background: #ffffff90;
--term-cursor-accent: #000000;
}
+2
View File
@@ -6,4 +6,6 @@
--term-foreground: #000000;
--term-background: #fefefe;
--term-cmdtext: #000000;
--term-selection-background: #00000040;
--term-cursor-accent: #000000;
}
@@ -87,6 +87,7 @@ class ClientSettingsView extends React.Component<{ model: RemotesModel }, { hove
const availableFontFamilies: DropdownItem[] = [];
availableFontFamilies.push({ label: "JetBrains Mono", value: "JetBrains Mono" });
availableFontFamilies.push({ label: "Hack", value: "Hack" });
availableFontFamilies.push({ label: "Fira Code", value: "Fira Code" });
return availableFontFamilies;
}
@@ -90,25 +90,12 @@
margin-top: 5px;
overflow-x: auto;
overflow-y: hidden;
border: 1px solid var(--app-border-color);
border-radius: 6px;
padding: 6px 10px;
.terminal-connectelem {
height: 163px !important; // Needed to override plugin height
.xterm-viewport {
display: flex;
padding: 6px 10px;
gap: 8px;
align-items: flex-start;
align-self: stretch;
border-radius: 6px;
border: 1px solid var(--xterm-viewport-border-color);
background: #080a08;
height: 163px !important; // Needed to override plugin height
}
.xterm-screen {
padding: 10px;
}
}
}
}
+6
View File
@@ -1,4 +1,10 @@
.image-renderer {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding-top: var(--termpad);
img {
display: block;
}
+4
View File
@@ -57,6 +57,10 @@ function getThemeFromCSSVars(): ITheme {
theme.brightMagenta = rootStyle.getPropertyValue("--term-bright-magenta");
theme.brightCyan = rootStyle.getPropertyValue("--term-bright-cyan");
theme.brightWhite = rootStyle.getPropertyValue("--term-bright-white");
theme.selectionBackground = rootStyle.getPropertyValue("--term-selection-background");
theme.selectionInactiveBackground = rootStyle.getPropertyValue("--term-selection-background");
theme.cursor = rootStyle.getPropertyValue("--term-selection-background");
theme.cursorAccent = rootStyle.getPropertyValue("--term-cursor-accent");
return theme;
}
+21
View File
@@ -5,6 +5,7 @@ let isJetBrainsMonoLoaded = false;
let isLatoFontLoaded = false;
let isHackFontLoaded = false;
let isBaseFontsLoaded = false;
let isFiraCodeLoaded = false;
function addToFontFaceSet(fontFaceSet: FontFaceSet, fontFace: FontFace) {
// any cast to work around typing issue
@@ -55,6 +56,25 @@ function loadLatoFont() {
latoFontBold.load();
}
function loadFiraCodeFont() {
if (isFiraCodeLoaded) {
return;
}
isFiraCodeLoaded = true;
let firaCodeRegular = new FontFace("Fira Code", "url('public/fonts/firacode-regular.woff2')", {
style: "normal",
weight: "400",
});
let firaCodeBold = new FontFace("Fira Code", "url('public/fonts/firacode-bold.woff2')", {
style: "normal",
weight: "700",
});
addToFontFaceSet(document.fonts, firaCodeRegular);
addToFontFaceSet(document.fonts, firaCodeBold);
firaCodeRegular.load();
firaCodeBold.load();
}
function loadHackFont() {
if (isHackFontLoaded) {
return;
@@ -104,6 +124,7 @@ function loadFonts() {
loadLatoFont();
loadJetBrainsMonoFont();
loadHackFont();
loadFiraCodeFont();
}
export { loadFonts };
+3 -1
View File
@@ -393,7 +393,9 @@ func determineLang() string {
log.Printf("error executing 'defaults read -g AppleLocale': %v\n", err)
return ""
}
return strings.TrimSpace(string(out)) + ".UTF-8"
strOut := string(out)
truncOut := strings.Split(strOut, "@")[0]
return strings.TrimSpace(truncOut) + ".UTF-8"
} else {
// this is specifically to get the wavesrv LANG so waveshell
// on a remote uses the same LANG