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' },
|
||||
markdown: { extension: 'zip' },
|
||||
html: { extension: 'zip' },
|
||||
typst: { extension: 'typ' },
|
||||
}
|
||||
|
||||
async function convertDocumentToLaTeX(req, res) {
|
||||
@@ -34,7 +35,7 @@ async function convertDocumentToLaTeX(req, res) {
|
||||
await fs.unlink(path).catch(() => {})
|
||||
return res.sendStatus(404)
|
||||
}
|
||||
if (!conversionType || !['docx', 'markdown'].includes(conversionType)) {
|
||||
if (!conversionType || !['docx', 'markdown', 'typst'].includes(conversionType)) {
|
||||
await fs.unlink(path).catch(() => {})
|
||||
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 { useRootDoc } from '@/shared/hooks/use-root-doc'
|
||||
import { useEditorManagerContext } from '@/features/ide-react/context/editor-manager-context'
|
||||
import { useProjectSettingsContext } from '@/features/editor-left-menu/context/project-settings-context'
|
||||
|
||||
type ExportProjectWithConversionProps = {
|
||||
featureFlag?: string
|
||||
@@ -22,6 +23,8 @@ export const ExportProjectWithConversionButton: FC<
|
||||
const enablePandocConversions =
|
||||
getMeta('ol-ExposedSettings')?.enablePandocConversions
|
||||
const anonymous = getMeta('ol-anonymous')
|
||||
const { compiler } = useProjectSettingsContext()
|
||||
const isLatexProject = !['typst', 'quarto'].includes(compiler ?? '')
|
||||
const getRootDocInfo = useRootDoc()
|
||||
const { openDocs } = useEditorManagerContext()
|
||||
const downloadConversion = useConvertProject(
|
||||
@@ -31,7 +34,10 @@ export const ExportProjectWithConversionButton: FC<
|
||||
)
|
||||
|
||||
const showExportButton =
|
||||
splitTestEnabledIfNeeded && enablePandocConversions && !anonymous
|
||||
splitTestEnabledIfNeeded &&
|
||||
enablePandocConversions &&
|
||||
!anonymous &&
|
||||
isLatexProject
|
||||
|
||||
useCommandProvider(
|
||||
() =>
|
||||
|
||||
@@ -171,9 +171,6 @@ const ProjectCard = memo(function ProjectCard({
|
||||
<span className="lumiere-card-date">{date}</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{/* Actions live outside .lumiere-card so Popper dropdowns are not
|
||||
clipped by the card's backdrop-filter / transform context. */}
|
||||
<div className="lumiere-card-actions">
|
||||
<CopyProjectButtonTooltip project={project} />
|
||||
<DownloadProjectButtonTooltip project={project} />
|
||||
@@ -186,6 +183,7 @@ const ProjectCard = memo(function ProjectCard({
|
||||
<TrashProjectButtonTooltip project={project} />
|
||||
</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
|
||||
// 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.
|
||||
// Action strip — icon buttons that fade in when the card is hovered
|
||||
.lumiere-card-actions {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 2px;
|
||||
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-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
opacity: 0;
|
||||
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-wrapper:focus-within .lumiere-card-actions {
|
||||
.lumiere-card:hover .lumiere-card-actions,
|
||||
.lumiere-card:focus-within .lumiere-card-actions {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user