From 0dc576a352aa40b8865400a3216528499901f849 Mon Sep 17 00:00:00 2001 From: Windmill Date: Thu, 11 Apr 2024 18:21:07 +0200 Subject: [PATCH] darkmode_new --- .../lib/components/InputTransformForm.svelte | 2 +- .../src/lib/components/ScriptEditor.svelte | 2 +- .../components/display/PlotlyHtmlV2.svelte | 2 +- .../apps/editor/ComponentHeader.svelte | 2 +- .../apps/editor/component/Component.svelte | 2 +- .../components/OutputHeader.svelte | 8 ++--- .../DecisionTreeGraphHeader.svelte | 2 +- .../lib/components/common/alert/Alert.svelte | 36 +++++++++---------- .../components/common/button/Button.svelte | 12 +++---- .../ConfirmationModal.svelte | 2 +- .../copilot/CodeCompletionStatus.svelte | 6 ++-- .../src/lib/components/copilot/CronGen.svelte | 4 +-- .../copilot/FlowCopilotStatus.svelte | 4 +-- .../lib/components/copilot/IteratorGen.svelte | 2 +- .../lib/components/copilot/MetadataGen.svelte | 2 +- .../components/copilot/PredicateGen.svelte | 4 +-- .../lib/components/copilot/ScriptFix.svelte | 2 +- .../lib/components/copilot/ScriptGen.svelte | 6 ++-- .../src/lib/components/copilot/StepGen.svelte | 6 ++-- .../components/copilot/StepInputGen.svelte | 2 +- .../components/copilot/StepInputsGen.svelte | 4 +-- .../flows/map/FlowConstantsItem.svelte | 2 +- .../flows/map/FlowErrorHandlerItem.svelte | 2 +- .../flows/map/FlowModuleSchemaItem.svelte | 2 +- .../flows/map/FlowSettingsItem.svelte | 2 +- .../components/flows/map/VirtualItem.svelte | 4 +-- .../src/lib/components/graph/FlowGraph.svelte | 4 +-- frontend/src/lib/components/graph/util.ts | 2 +- .../lib/components/sidebar/MenuButton.svelte | 2 +- .../lib/components/sidebar/MenuLink.svelte | 2 +- frontend/src/lib/components/vscode.ts | 2 +- .../src/routes/(root)/(logged)/+layout.svelte | 6 ++-- frontend/tailwind.config.cjs | 23 ++++++------ 33 files changed, 83 insertions(+), 82 deletions(-) diff --git a/frontend/src/lib/components/InputTransformForm.svelte b/frontend/src/lib/components/InputTransformForm.svelte index 24aad7be94..e56bc57f83 100644 --- a/frontend/src/lib/components/InputTransformForm.svelte +++ b/frontend/src/lib/components/InputTransformForm.svelte @@ -342,7 +342,7 @@
diff --git a/frontend/src/lib/components/ScriptEditor.svelte b/frontend/src/lib/components/ScriptEditor.svelte index 81cb4dc627..6e3da064ca 100644 --- a/frontend/src/lib/components/ScriptEditor.svelte +++ b/frontend/src/lib/components/ScriptEditor.svelte @@ -277,7 +277,7 @@ -
+
{#key lang}
+
- +

diff --git a/frontend/src/lib/components/copilot/CodeCompletionStatus.svelte b/frontend/src/lib/components/copilot/CodeCompletionStatus.svelte index 59992a415c..9cbc17bfc6 100644 --- a/frontend/src/lib/components/copilot/CodeCompletionStatus.svelte +++ b/frontend/src/lib/components/copilot/CodeCompletionStatus.svelte @@ -33,8 +33,8 @@ : { icon: $codeCompletionSessionEnabled ? SparklesIcon : SparklesOffIcon, classes: $codeCompletionSessionEnabled - ? 'text-violet-800 dark:text-violet-400' - : 'text-violet-800/50 dark:text-violet-400/50' + ? 'text-violet-800 dark:text-violet-300' + : 'text-violet-800/50 dark:text-violet-300' }} on:click={() => { storeSetting() @@ -51,7 +51,7 @@ startIcon={{ icon: SparklesOffIcon }} - btnClasses="text-violet-800/50 dark:text-violet-400/50" + btnClasses="text-violet-800/50 dark:text-violet-300" /> {/if} diff --git a/frontend/src/lib/components/copilot/CronGen.svelte b/frontend/src/lib/components/copilot/CronGen.svelte index 17c64d7dc9..2576ea6dee 100644 --- a/frontend/src/lib/components/copilot/CronGen.svelte +++ b/frontend/src/lib/components/copilot/CronGen.svelte @@ -62,7 +62,7 @@ startIcon={{ icon: Wand2 }} iconOnly title="AI Assistant" - btnClasses="min-h-[30px] text-violet-800 dark:text-violet-400 bg-violet-100 dark:bg-gray-700" + btnClasses="min-h-[30px] text-violet-800 dark:text-violet-300 bg-violet-100 dark:bg-gray-700" loading={genLoading} clickableWhileLoading on:click={genLoading ? () => abortController?.abort() : undefined} @@ -87,7 +87,7 @@ color="light" variant="contained" buttonType="button" - btnClasses="!p-1 !w-[38px] !ml-2 text-violet-800 dark:text-violet-400 bg-violet-100 dark:bg-gray-700" + btnClasses="!p-1 !w-[38px] !ml-2 text-violet-800 dark:text-violet-300 bg-violet-100 dark:bg-gray-700" title="Generate CRON schedule from prompt" aria-label="Generate" iconOnly diff --git a/frontend/src/lib/components/copilot/FlowCopilotStatus.svelte b/frontend/src/lib/components/copilot/FlowCopilotStatus.svelte index 0cdbf760b1..ee7d30b332 100644 --- a/frontend/src/lib/components/copilot/FlowCopilotStatus.svelte +++ b/frontend/src/lib/components/copilot/FlowCopilotStatus.svelte @@ -38,7 +38,7 @@ $currentStepStore !== undefined ? 'z-[901]' : '', copilotLoading || ($currentStepStore !== undefined && $currentStepStore !== 'Input') ? '' - : 'text-violet-800 dark:text-violet-400' + : 'text-violet-800 dark:text-violet-300' )} on:click={() => { if (copilotLoading || ($currentStepStore !== undefined && $currentStepStore !== 'Input')) { @@ -125,7 +125,7 @@ startIcon={{ icon: Wand2 }} - btnClasses="text-violet-800 dark:text-violet-500" + btnClasses="text-violet-800 dark:text-violet-300" color={'light'} variant={'border'} nonCaptureEvent diff --git a/frontend/src/lib/components/copilot/IteratorGen.svelte b/frontend/src/lib/components/copilot/IteratorGen.svelte index 1f2ed94a63..ec6968bdd7 100644 --- a/frontend/src/lib/components/copilot/IteratorGen.svelte +++ b/frontend/src/lib/components/copilot/IteratorGen.svelte @@ -137,7 +137,7 @@ Only output the expression, do not explain or discuss.` size="xs" color="light" btnClasses={twMerge( - 'text-violet-800 dark:text-violet-400 bg-violet-100 dark:bg-gray-700 dark:hover:bg-surface-hover', + 'text-violet-800 dark:text-violet-300 bg-violet-100 dark:bg-gray-700 dark:hover:bg-surface-hover', !loading && generatedContent.length > 0 ? 'bg-green-100 text-green-800 hover:bg-green-100 dark:text-green-400 dark:bg-green-700 dark:hover:bg-green-700' : '' diff --git a/frontend/src/lib/components/copilot/MetadataGen.svelte b/frontend/src/lib/components/copilot/MetadataGen.svelte index 5e0c8702b0..546fbaced8 100644 --- a/frontend/src/lib/components/copilot/MetadataGen.svelte +++ b/frontend/src/lib/components/copilot/MetadataGen.svelte @@ -230,7 +230,7 @@ Generate a description for the flow below: {#if active} 0 ? 'bg-green-100 text-green-800 dark:text-green-400 dark:bg-green-700' : '' diff --git a/frontend/src/lib/components/copilot/PredicateGen.svelte b/frontend/src/lib/components/copilot/PredicateGen.svelte index 1df3ab6576..cb72f1123d 100644 --- a/frontend/src/lib/components/copilot/PredicateGen.svelte +++ b/frontend/src/lib/components/copilot/PredicateGen.svelte @@ -96,7 +96,7 @@ Only return the expression without any wrapper. Do not explain or discuss.` startIcon={{ icon: Wand2 }} iconOnly title="AI Assistant" - btnClasses="min-h-[30px] text-violet-800 dark:text-violet-400 bg-violet-100 dark:bg-gray-700" + btnClasses="min-h-[30px] text-violet-800 dark:text-violet-300 bg-violet-100 dark:bg-gray-700" {loading} clickableWhileLoading on:click={loading ? () => abortController?.abort() : undefined} @@ -120,7 +120,7 @@ Only return the expression without any wrapper. Do not explain or discuss.` color="light" variant="contained" buttonType="button" - btnClasses="!p-1 !w-[38px] !ml-2 text-violet-800 dark:text-violet-400 bg-violet-100 dark:bg-gray-700" + btnClasses="!p-1 !w-[38px] !ml-2 text-violet-800 dark:text-violet-300 bg-violet-100 dark:bg-gray-700" title="Generate predicate from prompt" aria-label="Generate" iconOnly diff --git a/frontend/src/lib/components/copilot/ScriptFix.svelte b/frontend/src/lib/components/copilot/ScriptFix.svelte index effc4306c5..c499722d05 100644 --- a/frontend/src/lib/components/copilot/ScriptFix.svelte +++ b/frontend/src/lib/components/copilot/ScriptFix.svelte @@ -169,7 +169,7 @@ on:click={genLoading ? () => abortController?.abort() : undefined} btnClasses={genLoading ? '' - : 'text-violet-800 dark:text-violet-400 bg-violet-100 dark:bg-gray-700'} + : 'text-violet-800 dark:text-violet-300 bg-violet-100 dark:bg-gray-700'} >{#if genLoading} {:else}

@@ -147,7 +147,7 @@
- +
@@ -169,7 +169,7 @@
- +
diff --git a/frontend/src/lib/components/copilot/StepInputGen.svelte b/frontend/src/lib/components/copilot/StepInputGen.svelte index 74b2c56c18..82d9a76577 100644 --- a/frontend/src/lib/components/copilot/StepInputGen.svelte +++ b/frontend/src/lib/components/copilot/StepInputGen.svelte @@ -200,7 +200,7 @@ Only return the expression without any wrapper.` size="xs" color="light" btnClasses={twMerge( - 'text-violet-800 dark:text-violet-400 bg-violet-100 dark:bg-gray-700 dark:hover:bg-surface-hover', + 'text-violet-800 dark:text-violet-300 bg-violet-100 dark:bg-gray-700 dark:hover:bg-surface-hover', !loading && generatedContent.length > 0 ? 'bg-green-100 text-green-800 hover:bg-green-100 dark:text-green-400 dark:bg-green-700 dark:hover:bg-green-700' : '' diff --git a/frontend/src/lib/components/copilot/StepInputsGen.svelte b/frontend/src/lib/components/copilot/StepInputsGen.svelte index 33af6ed822..74dc183f8d 100644 --- a/frontend/src/lib/components/copilot/StepInputsGen.svelte +++ b/frontend/src/lib/components/copilot/StepInputsGen.svelte @@ -173,7 +173,7 @@ input_name2: expression2 size="xs" color="light" btnClasses={twMerge( - 'text-violet-800 dark:text-violet-400', + 'text-violet-800 dark:text-violet-300', !loading && Object.keys($generatedExprs || {}).length > 0 ? 'bg-green-100 text-green-800 hover:bg-green-100 dark:text-green-400 dark:bg-green-700 dark:hover:bg-green-700' : '' @@ -219,7 +219,7 @@ input_name2: expression2
{#if $$slots.icon} diff --git a/frontend/src/lib/components/flows/map/FlowSettingsItem.svelte b/frontend/src/lib/components/flows/map/FlowSettingsItem.svelte index dfe17141c3..8974c46714 100644 --- a/frontend/src/lib/components/flows/map/FlowSettingsItem.svelte +++ b/frontend/src/lib/components/flows/map/FlowSettingsItem.svelte @@ -10,7 +10,7 @@ $: settingsClass = classNames( 'border w-full rounded-sm p-2 bg-surface text-sm cursor-pointer flex items-center', $selectedId?.startsWith('settings') - ? 'outline outline-offset-1 outline-2 outline-slate-900' + ? 'outline outline-offset-1 outline-2 outline-slate-900 dark:bg-white/5 dark:outline-slate-800/60 dark:border-gray-400' : '' ) diff --git a/frontend/src/lib/components/flows/map/VirtualItem.svelte b/frontend/src/lib/components/flows/map/VirtualItem.svelte index b29b45fc39..ddac5f7d5d 100644 --- a/frontend/src/lib/components/flows/map/VirtualItem.svelte +++ b/frontend/src/lib/components/flows/map/VirtualItem.svelte @@ -82,7 +82,7 @@
{#if $$slots.icon} @@ -172,7 +172,7 @@ : undefined} slot="trigger" type="button" - class=" bg-surface text-violet-800 dark:text-violet-400 border mx-0.5 focus:outline-none hover:bg-surface-hover focus:ring-4 focus:ring-gray-200 font-medium rounded-full text-sm w-8 h-8 flex items-center justify-center" + class=" bg-surface text-violet-800 dark:text-violet-300 border mx-0.5 focus:outline-none hover:bg-surface-hover focus:ring-4 focus:ring-gray-200 font-medium rounded-full text-sm w-8 h-8 flex items-center justify-center" > diff --git a/frontend/src/lib/components/graph/FlowGraph.svelte b/frontend/src/lib/components/graph/FlowGraph.svelte index f5f271aadc..cb43161b7f 100644 --- a/frontend/src/lib/components/graph/FlowGraph.svelte +++ b/frontend/src/lib/components/graph/FlowGraph.svelte @@ -290,7 +290,7 @@ case false: return getStateColor(FlowStatusModule.type.FAILURE) default: - return isDark ? '#2e3440' : '#fff' + return isDark ? '#344358' : '#fff' } } @@ -679,7 +679,7 @@ label == 'Result' ? getResultColor() : document.documentElement.classList.contains('dark') - ? '#2e3440' + ? '#344358' : '#dfe6ee', selected: $selectedId == label, index, diff --git a/frontend/src/lib/components/graph/util.ts b/frontend/src/lib/components/graph/util.ts index 85dc27832e..9b04a1ba6d 100644 --- a/frontend/src/lib/components/graph/util.ts +++ b/frontend/src/lib/components/graph/util.ts @@ -32,7 +32,7 @@ export function getStateColor(state: FlowStatusModule.type | undefined): string case FlowStatusModule.type.WAITING_FOR_EXECUTOR: return isDark ? '#ea580c' : 'rgb(255, 208, 193)' default: - return isDark ? '#2e3440' : '#fff' + return isDark ? '#344358' : '#fff' } } diff --git a/frontend/src/lib/components/sidebar/MenuButton.svelte b/frontend/src/lib/components/sidebar/MenuButton.svelte index 2708a70860..5d533eae8b 100644 --- a/frontend/src/lib/components/sidebar/MenuButton.svelte +++ b/frontend/src/lib/components/sidebar/MenuButton.svelte @@ -16,7 +16,7 @@ 'group flex items-center px-2 py-2 font-light rounded-md h-8 gap-3 w-full', lightMode ? 'text-primary hover:bg-surface-hover ' - : ' hover:bg-[#34363c] text-primary-inverse dark:text-primary', + : ' hover:bg-[#2A3648] text-primary-inverse dark:text-primary', 'transition-all', $$props.class )} diff --git a/frontend/src/lib/components/sidebar/MenuLink.svelte b/frontend/src/lib/components/sidebar/MenuLink.svelte index d755219dbb..8ce1cc1628 100644 --- a/frontend/src/lib/components/sidebar/MenuLink.svelte +++ b/frontend/src/lib/components/sidebar/MenuLink.svelte @@ -33,7 +33,7 @@ : 'bg-frost-700 hover:bg-[#30404e]' : lightMode ? 'hover:bg-surface-hover rounded-none' - : 'hover:bg-[#34363c]', + : 'hover:bg-[#2A3648]', 'hover:transition-all', $$props.class diff --git a/frontend/src/lib/components/vscode.ts b/frontend/src/lib/components/vscode.ts index 94fa3cea5d..d1b3ad5ffc 100644 --- a/frontend/src/lib/components/vscode.ts +++ b/frontend/src/lib/components/vscode.ts @@ -101,7 +101,7 @@ export async function initializeVscode() { ], colors: { 'editor.foreground': '#D8DEE9', - 'editor.background': '#2E3440', + 'editor.background': '#2A3648', 'editor.selectionBackground': '#434C5ECC', 'editor.lineHighlightBackground': '#3B4252', 'editorCursor.foreground': '#D8DEE9', diff --git a/frontend/src/routes/(root)/(logged)/+layout.svelte b/frontend/src/routes/(root)/(logged)/+layout.svelte index 15303fb61c..4908710a90 100644 --- a/frontend/src/routes/(root)/(logged)/+layout.svelte +++ b/frontend/src/routes/(root)/(logged)/+layout.svelte @@ -312,7 +312,7 @@
-
+
@@ -438,7 +438,7 @@ {#if !isCollapsed}Windmill{/if}
-
+
diff --git a/frontend/tailwind.config.cjs b/frontend/tailwind.config.cjs index c07a20dbba..d9626946e6 100644 --- a/frontend/tailwind.config.cjs +++ b/frontend/tailwind.config.cjs @@ -19,18 +19,18 @@ const lightTheme = { const lightThemeRgb = makeRgb(lightTheme) const darkTheme = { - surface: '#2e3440', - surfaceSecondary: '#3b4252', - surfaceHover: '#4c566a', - surfaceDisabled: '#2a2f3a', + surface: '#1F2937', + surfaceSecondary: '#2A3648', + surfaceHover: '#344358', + surfaceDisabled: '#171F2D', surfaceSelected: '#434c5e', - textPrimary: '#f3f6f8', - textSecondary: '#e0e7ed', - textTertiary: '#c7ccd6', - textDisabled: '#a0aec0', + textPrimary: '#E2E8F0', + textSecondary: '#CBD5E1', + textTertiary: '#94A3B8', + textDisabled: '#4A5668', - border: '#3e4c60', + border: '#344358', borderHover: '#3e4c60' } @@ -353,7 +353,8 @@ const config = { 600: '#2563eb', 700: '#1d4ed8', 800: '#1e40af', - 900: '#1e3a8a' + 900: '#1e3a8a', + 950: '#172554' }, indigo: { @@ -663,7 +664,7 @@ const config = { 'button:disabled,button[disabled=true],a:disabled,a[disabled=true]': { pointerEvents: 'none', cursor: 'default', - filter: 'grayscale(1)' + opacity: '0.50' }, 'pre code.hljs': { padding: '0px !important',