diff --git a/package.json b/package.json index 2a3c601b0ccd..0c603794a3e4 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "typecheck": "tsc -p tsconfig.check.json --noEmit", "typecheck:why": "tsc -p tsconfig.check.json --noEmit --explainFiles > explainTypes.txt", "ui:build": "vite build packages/ui", - "ui:dev": "vite packages/ui", + "ui:dev": "npm -C packages/ui run dev:client", "ui:test": "npm -C packages/ui run test:run", "test:browser:webdriverio": "pnpm -C test/browser run test:webdriverio", "test:browser:playwright": "pnpm -C test/browser run test:playwright" diff --git a/packages/ui/README.md b/packages/ui/README.md index 0208622e0d53..ae9d1e81a475 100644 --- a/packages/ui/README.md +++ b/packages/ui/README.md @@ -2,20 +2,14 @@ This package is for UI interface of Vitest. -> Work in progress. - ## Development Setup At project root, create terminals with each of the following commands: ```bash -nr dev +nr ui:dev ``` ```bash nr test --api ``` - -```bash -nr ui:dev -``` diff --git a/packages/ui/client/components/FileDetails.vue b/packages/ui/client/components/FileDetails.vue index 7cd54f94ed33..b0ba0590b25c 100644 --- a/packages/ui/client/components/FileDetails.vue +++ b/packages/ui/client/components/FileDetails.vue @@ -111,6 +111,21 @@ debouncedWatch( }, { debounce: 100, immediate: true }, ) + +const projectNameColor = computed(() => { + return getProjectNameColor(current.value?.file.projectName) +}) + +const projectNameTextColor = computed(() => { + switch (projectNameColor.value) { + case 'blue': + case 'green': + case 'magenta': + return 'white' + default: + return 'black' + } +})