Tweak Moonlight theme

This commit is contained in:
Gregory Schier
2024-06-02 15:48:27 -07:00
parent d8d0622773
commit ddbd342033
2 changed files with 8 additions and 18 deletions

View File

@@ -389,7 +389,7 @@ function PairEditorRow({
<Button <Button
size="xs" size="xs"
color="secondary" color="secondary"
className="font-mono text-xs" className="font-mono text-2xs rtl"
onClick={async (e) => { onClick={async (e) => {
e.preventDefault(); e.preventDefault();
const selected = await open({ const selected = await open({
@@ -403,7 +403,9 @@ function PairEditorRow({
handleChangeValueFile(selected.path); handleChangeValueFile(selected.path);
}} }}
> >
{getFileName(pairContainer.pair.value) || 'Select File'} {/* Special character to insert ltr text in rtl element without making things wonky */}
&#x200E;
{pairContainer.pair.value || 'Select File'}
</Button> </Button>
) : ( ) : (
<Input <Input
@@ -494,9 +496,3 @@ const newPairContainer = (initialPair?: Pair): PairContainer => {
const pair = initialPair ?? { name: '', value: '', enabled: true, isFile: false }; const pair = initialPair ?? { name: '', value: '', enabled: true, isFile: false };
return { id, pair }; return { id, pair };
}; };
const getFileName = (path: string | null | undefined): string => {
if (typeof path !== 'string') return '';
const parts = path.split(/[\\/]/);
return parts[parts.length - 1] ?? '';
};

View File

@@ -40,12 +40,10 @@ export const colors = {
const moonlightDefault: YaakTheme = { const moonlightDefault: YaakTheme = {
id: 'moonlight', id: 'moonlight',
name: 'Moonlight', name: 'Moonlight',
background: new Color(colors.gray4, 'dark'), background: new Color('#222436', 'dark'),
backgroundHighlight: new Color(colors.gray5, 'dark'), foreground: new Color('#d5def8', 'dark'),
backgroundHighlightSecondary: new Color(colors.gray5, 'dark'), foregroundSubtle: new Color('#828bb8', 'dark'),
foreground: new Color(colors.gray11, 'dark'), foregroundSubtler: new Color('hsl(232,26%,43%)', 'dark'),
foregroundSubtle: new Color(colors.gray7, 'dark'),
foregroundSubtler: new Color(colors.gray6, 'dark'),
colors: { colors: {
primary: new Color(colors.purple, 'dark'), primary: new Color(colors.purple, 'dark'),
secondary: new Color(colors.desaturatedGray, 'dark'), secondary: new Color(colors.desaturatedGray, 'dark'),
@@ -58,13 +56,9 @@ const moonlightDefault: YaakTheme = {
components: { components: {
appHeader: { appHeader: {
background: new Color(colors.gray3, 'dark'), background: new Color(colors.gray3, 'dark'),
backgroundHighlight: new Color(colors.gray5, 'dark'),
backgroundHighlightSecondary: new Color(colors.gray4, 'dark'),
}, },
sidebar: { sidebar: {
background: new Color(colors.gray3, 'dark'), background: new Color(colors.gray3, 'dark'),
backgroundHighlight: new Color(colors.gray5, 'dark'),
backgroundHighlightSecondary: new Color(colors.gray4, 'dark'),
}, },
}, },
}; };