af54b5fd49
Build and Deploy Verso / deploy (push) Successful in 11m58s
- compiler-setting.tsx: replace hardcoded LaTeX compiler list with a single Quarto option; drop now-unused getMeta/lodash imports - project-settings.ts: add 'quarto' to ProjectCompiler union type - ClsiManager: detect main.qmd as a default root document (preferred over main.tex); replace hasMainFile boolean with detectedMainFile so we know which filename to use - settings.defaults.js: add 'qmd' to validRootDocExtensions so .qmd files appear as selectable root documents in the UI - ProjectRootDocManager: sort main.qmd before main.tex in the root doc candidate list Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
import { useState } from 'react'
|
|
import { useProjectSettingsContext } from '@/features/editor-left-menu/context/project-settings-context'
|
|
import DropdownSetting from '../dropdown-setting'
|
|
import type { Option } from '../dropdown-setting'
|
|
import { useTranslation } from 'react-i18next'
|
|
import { usePermissionsContext } from '@/features/ide-react/context/permissions-context'
|
|
import { ProjectCompiler } from '@ol-types/project-settings'
|
|
import { useSetCompilationSettingWithEvent } from '@/features/editor-left-menu/hooks/use-set-compilation-setting'
|
|
function getCompilerOptions(): Option<ProjectCompiler>[] {
|
|
return [{ value: 'quarto', label: 'Quarto' }]
|
|
}
|
|
|
|
export default function CompilerSetting() {
|
|
const { compiler, setCompiler } = useProjectSettingsContext()
|
|
const [compilerOptions] = useState(() => getCompilerOptions())
|
|
const { t } = useTranslation()
|
|
const { write } = usePermissionsContext()
|
|
const changeCompiler = useSetCompilationSettingWithEvent(
|
|
'compiler',
|
|
setCompiler
|
|
)
|
|
|
|
return (
|
|
<DropdownSetting
|
|
id="compiler"
|
|
label={t('compiler')}
|
|
description={t('the_latex_engine_used_for_compiling')}
|
|
disabled={!write}
|
|
options={compilerOptions}
|
|
onChange={changeCompiler}
|
|
value={compiler}
|
|
translateOptions="no"
|
|
/>
|
|
)
|
|
}
|