do not read removed config

This commit is contained in:
Paweł Grabarz 2024-10-22 17:26:56 +02:00
parent 1c06867f63
commit 053a177aab
4 changed files with 2 additions and 18 deletions

View File

@ -35,7 +35,7 @@ export function useStackNavigator(projectStore: ProjectStore, graphStore: GraphS
}
function stackItemToLabel(item: StackItem, isStackRoot: boolean): string {
if (isStackRoot && isProjectEntryPoint(item)) return projectStore.displayName
if (isStackRoot && isProjectEntryPoint(item)) return projectStore.name
const methodName = graphStore.db.stackItemToMethodName(item)
return methodName ?? 'unknown'
}

View File

@ -119,12 +119,6 @@ export const { provideFn: provideProjectStore, injectFn: useProjectStore } = cre
const projectNameFromCfg = config.value.startup?.project
if (projectNameFromCfg == null) throw new Error('Missing project name.')
const projectName = ref(projectNameFromCfg)
// Note that `config` is not deeply reactive. This is fine as the config is an immutable object
// passed in from the dashboard, so the entire object will change if any of its nested
// properties change.
const projectDisplayName = computed(
() => config.value.startup?.displayedProjectName ?? projectName,
)
const clientId = random.uuidv4() as Uuid
const lsUrls = resolveLsUrl(config.value)
@ -400,7 +394,6 @@ export const { provideFn: provideProjectStore, injectFn: useProjectStore } = cre
},
id: projectId,
name: readonly(projectName),
displayName: readonly(projectDisplayName),
isOnLocalBackend,
executionContext,
firstExecution,

View File

@ -26,11 +26,6 @@
"project": {
"value": "",
"description": "The name of the project to open at startup. If the project does not exist, it will be created."
},
"displayedProjectName": {
"value": "",
"description": "The name of the project to be displayed to the user.",
"primary": false
}
}
},

View File

@ -43,8 +43,4 @@ export const VERSION = {
import CONFIG from './config.json' assert { type: 'json' }
export const OPTIONS = linkedDist.config.options.merge(
// `valueEval` in `config.json` uses PascalCase scope variables for some reason.
// eslint-disable-next-line @typescript-eslint/naming-convention
linkedDist.config.objectToGroup(CONFIG),
)
export const OPTIONS = linkedDist.config.objectToGroup(CONFIG)