fix: show presentation download dropdown for all Quarto projects
quartoFlavor is set only after a project is compiled with the current build. Existing Quarto projects that haven't been recompiled have quartoFlavor=undefined, so the old check (quartoFlavor === 'revealjs') fell through to the regular PDF compile button with no dropdown. Drop the quartoFlavor guard — compiler === 'quarto' is sufficient since all Quarto projects in Verso are RevealJS presentations. Changes applied to ActionsCell (desktop icon), DownloadPresentationButtonTooltip guard, and ActionsDropdown (mobile three-dot menu). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-2
@@ -78,8 +78,7 @@ function ActionsDropdown({ project }: ActionDropdownProps) {
|
|||||||
</li>
|
</li>
|
||||||
)}
|
)}
|
||||||
</DownloadProjectButton>
|
</DownloadProjectButton>
|
||||||
{project.compiler === 'quarto' &&
|
{project.compiler === 'quarto' ? (
|
||||||
project.quartoFlavor === 'revealjs' ? (
|
|
||||||
<DownloadPresentationButton project={project}>
|
<DownloadPresentationButton project={project}>
|
||||||
{(startExport, exporting) => (
|
{(startExport, exporting) => (
|
||||||
<>
|
<>
|
||||||
|
|||||||
+1
-1
@@ -138,7 +138,7 @@ const DownloadPresentationButtonTooltip = memo(
|
|||||||
}: { project: Project }) {
|
}: { project: Project }) {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
|
||||||
if (project.compiler !== 'quarto' || project.quartoFlavor !== 'revealjs') {
|
if (project.compiler !== 'quarto') {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ type ActionsCellProps = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isQuartoSlides = (project: Project) =>
|
const isQuartoSlides = (project: Project) =>
|
||||||
project.compiler === 'quarto' && project.quartoFlavor === 'revealjs'
|
project.compiler === 'quarto'
|
||||||
|
|
||||||
export default function ActionsCell({ project }: ActionsCellProps) {
|
export default function ActionsCell({ project }: ActionsCellProps) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user