Fix four reported bugs: typst export 500, export shown for all project types, Lumiere tile button layout, i18n
Build and Deploy Verso / deploy (push) Successful in 15m7s
Build and Deploy Verso / deploy (push) Successful in 15m7s
- ConversionController.js: add typst to CONVERSION_CONFIGS (missing entry caused 400→500 chain) - export-project-with-conversion-button: hide button for non-LaTeX projects (typst/quarto) via compiler check - project-list-lumiere.tsx + scss: revert lumiere-card-actions back inside .lumiere-card (put them back like they were) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,7 @@ const CONVERSION_CONFIGS = {
|
|||||||
docx: { extension: 'docx' },
|
docx: { extension: 'docx' },
|
||||||
markdown: { extension: 'zip' },
|
markdown: { extension: 'zip' },
|
||||||
html: { extension: 'zip' },
|
html: { extension: 'zip' },
|
||||||
|
typst: { extension: 'typ' },
|
||||||
}
|
}
|
||||||
|
|
||||||
async function convertDocumentToLaTeX(req, res) {
|
async function convertDocumentToLaTeX(req, res) {
|
||||||
@@ -34,7 +35,7 @@ async function convertDocumentToLaTeX(req, res) {
|
|||||||
await fs.unlink(path).catch(() => {})
|
await fs.unlink(path).catch(() => {})
|
||||||
return res.sendStatus(404)
|
return res.sendStatus(404)
|
||||||
}
|
}
|
||||||
if (!conversionType || !['docx', 'markdown'].includes(conversionType)) {
|
if (!conversionType || !['docx', 'markdown', 'typst'].includes(conversionType)) {
|
||||||
await fs.unlink(path).catch(() => {})
|
await fs.unlink(path).catch(() => {})
|
||||||
return res.sendStatus(400)
|
return res.sendStatus(400)
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-1
@@ -6,6 +6,7 @@ import { useCommandProvider } from '../../hooks/use-command-provider'
|
|||||||
import OLDropdownMenuItem from '@/shared/components/ol/ol-dropdown-menu-item'
|
import OLDropdownMenuItem from '@/shared/components/ol/ol-dropdown-menu-item'
|
||||||
import { useRootDoc } from '@/shared/hooks/use-root-doc'
|
import { useRootDoc } from '@/shared/hooks/use-root-doc'
|
||||||
import { useEditorManagerContext } from '@/features/ide-react/context/editor-manager-context'
|
import { useEditorManagerContext } from '@/features/ide-react/context/editor-manager-context'
|
||||||
|
import { useProjectSettingsContext } from '@/features/editor-left-menu/context/project-settings-context'
|
||||||
|
|
||||||
type ExportProjectWithConversionProps = {
|
type ExportProjectWithConversionProps = {
|
||||||
featureFlag?: string
|
featureFlag?: string
|
||||||
@@ -22,6 +23,8 @@ export const ExportProjectWithConversionButton: FC<
|
|||||||
const enablePandocConversions =
|
const enablePandocConversions =
|
||||||
getMeta('ol-ExposedSettings')?.enablePandocConversions
|
getMeta('ol-ExposedSettings')?.enablePandocConversions
|
||||||
const anonymous = getMeta('ol-anonymous')
|
const anonymous = getMeta('ol-anonymous')
|
||||||
|
const { compiler } = useProjectSettingsContext()
|
||||||
|
const isLatexProject = !['typst', 'quarto'].includes(compiler ?? '')
|
||||||
const getRootDocInfo = useRootDoc()
|
const getRootDocInfo = useRootDoc()
|
||||||
const { openDocs } = useEditorManagerContext()
|
const { openDocs } = useEditorManagerContext()
|
||||||
const downloadConversion = useConvertProject(
|
const downloadConversion = useConvertProject(
|
||||||
@@ -31,7 +34,10 @@ export const ExportProjectWithConversionButton: FC<
|
|||||||
)
|
)
|
||||||
|
|
||||||
const showExportButton =
|
const showExportButton =
|
||||||
splitTestEnabledIfNeeded && enablePandocConversions && !anonymous
|
splitTestEnabledIfNeeded &&
|
||||||
|
enablePandocConversions &&
|
||||||
|
!anonymous &&
|
||||||
|
isLatexProject
|
||||||
|
|
||||||
useCommandProvider(
|
useCommandProvider(
|
||||||
() =>
|
() =>
|
||||||
|
|||||||
+11
-13
@@ -171,19 +171,17 @@ const ProjectCard = memo(function ProjectCard({
|
|||||||
<span className="lumiere-card-date">{date}</span>
|
<span className="lumiere-card-date">{date}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
<div className="lumiere-card-actions">
|
||||||
{/* Actions live outside .lumiere-card so Popper dropdowns are not
|
<CopyProjectButtonTooltip project={project} />
|
||||||
clipped by the card's backdrop-filter / transform context. */}
|
<DownloadProjectButtonTooltip project={project} />
|
||||||
<div className="lumiere-card-actions">
|
{project.compiler === 'quarto' ? (
|
||||||
<CopyProjectButtonTooltip project={project} />
|
<DownloadPresentationButtonTooltip project={project} />
|
||||||
<DownloadProjectButtonTooltip project={project} />
|
) : (
|
||||||
{project.compiler === 'quarto' ? (
|
<CompileAndDownloadProjectPDFButtonTooltip project={project} />
|
||||||
<DownloadPresentationButtonTooltip project={project} />
|
)}
|
||||||
) : (
|
<ArchiveProjectButtonTooltip project={project} />
|
||||||
<CompileAndDownloadProjectPDFButtonTooltip project={project} />
|
<TrashProjectButtonTooltip project={project} />
|
||||||
)}
|
</div>
|
||||||
<ArchiveProjectButtonTooltip project={project} />
|
|
||||||
<TrashProjectButtonTooltip project={project} />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -537,28 +537,14 @@ $lum-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action strip — lives *outside* .lumiere-card so the dropdown menus inside
|
// Action strip — icon buttons that fade in when the card is hovered
|
||||||
// are not trapped by the card's backdrop-filter and transform (both of which
|
|
||||||
// create a new containing block for position:fixed, clipping Popper menus).
|
|
||||||
// position:absolute on the wrapper (which has no transform/filter) lets any
|
|
||||||
// position:fixed child escape to the viewport as expected.
|
|
||||||
.lumiere-card-actions {
|
.lumiere-card-actions {
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
z-index: 2;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
padding: 3px 6px 5px;
|
padding: 3px 6px 5px;
|
||||||
// Solid background — intentionally no backdrop-filter here, which would
|
|
||||||
// also create a fixed containing block and trap the Popper dropdown.
|
|
||||||
background: rgba(255, 255, 255, 0.97);
|
|
||||||
border-top: 1px solid rgba($lum-teal, 0.10);
|
border-top: 1px solid rgba($lum-teal, 0.10);
|
||||||
border-bottom-left-radius: 10px;
|
|
||||||
border-bottom-right-radius: 10px;
|
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.15s ease;
|
transition: opacity 0.15s ease;
|
||||||
|
|
||||||
@@ -575,8 +561,8 @@ $lum-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' wi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.lumiere-card-wrapper:hover .lumiere-card-actions,
|
.lumiere-card:hover .lumiere-card-actions,
|
||||||
.lumiere-card-wrapper:focus-within .lumiere-card-actions {
|
.lumiere-card:focus-within .lumiere-card-actions {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user