refactor(editor): Dark theme improvements (no-changelog) (#7574)

Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com>
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-11-01 17:56:15 +01:00
committed by GitHub
parent ff279ab411
commit 100291e109
6 changed files with 32 additions and 38 deletions

View File

@@ -199,7 +199,7 @@ import NodeIcon from '@/components/NodeIcon.vue';
import TitledList from '@/components/TitledList.vue';
import { get } from 'lodash-es';
import { getStyleTokenValue, getTriggerNodeServiceName } from '@/utils';
import { getTriggerNodeServiceName } from '@/utils';
import type { INodeUi, XYPosition } from '@/Interface';
import { debounceHelper } from '@/mixins/debounce';
import { useUIStore } from '@/stores/ui.store';
@@ -488,31 +488,31 @@ export default defineComponent({
[key: string]: string;
} = {};
let borderColor = getStyleTokenValue('--color-foreground-xdark');
let borderColor = '--color-foreground-xdark';
if (this.isConfigurableNode || this.isConfigNode) {
borderColor = getStyleTokenValue('--color-foreground-dark');
borderColor = '--color-foreground-dark';
}
if (this.data.disabled) {
borderColor = getStyleTokenValue('--color-foreground-base');
borderColor = '--color-foreground-base';
} else if (!this.isExecuting) {
if (this.hasIssues) {
borderColor = getStyleTokenValue('--color-danger');
borderColor = '--color-danger';
returnStyles['border-width'] = '2px';
returnStyles['border-style'] = 'solid';
} else if (this.waiting || this.showPinnedDataInfo) {
borderColor = getStyleTokenValue('--color-canvas-node-pinned-border');
borderColor = '--color-canvas-node-pinned-border';
} else if (this.nodeExecutionStatus === 'unknown') {
borderColor = getStyleTokenValue('--color-foreground-xdark');
borderColor = '--color-foreground-xdark';
} else if (this.workflowDataItems) {
returnStyles['border-width'] = '2px';
returnStyles['border-style'] = 'solid';
borderColor = getStyleTokenValue('--color-success');
borderColor = '--color-success';
}
}
returnStyles['border-color'] = borderColor;
returnStyles['border-color'] = `var(${borderColor})`;
return returnStyles;
},