FurtherRef changes
083a34450feat(office): polish OnlyOffice read-only preview (menus, prompt, file type) (#81)
A pure fork patch release on top of v0.3.32 — no upstream sync this cycle. It polishes the OnlyOffice read-only Office preview that shipped in v0.3.32 (#80).
Highlights:
- Cleaner viewer chrome: the preview now opens in the OnlyOffice embedded viewer (
type: "embedded") instead of the full editor, so the File / View / Plugins menu bar is gone. Hiding individual tabs viacustomization.layoutis a paid white-label feature the open-source (AGPL) Document Server ignores, so the embedded viewer is the Community-edition-safe way to get a clean read-only preview while keeping the ONLYOFFICE branding AGPL requires. Embedded controls are nested undereditorConfig.embeddedwithautostart: "document"(presentations open in the document view, not the slideshow player); no share/embed/save URLs are passed, so those buttons stay hidden and Multica's own modal owns download / full-screen / close. - No collaboration name prompt:
customization.anonymous.request = falsestops the "Enter a name to be used for collaboration" dialog. The embedded viewer renders no user chip, so no user identity — and no user-controlledavatar_url— is added to the JWT-signed config handed to the third-party Document Server iframe. - Correct file type instead of
application/zip: OOXML/ODF office files are ZIP containers, so the uploader sniffed them asapplication/zip. New uploads now persist the real office MIME (doc/docx/xls/xlsx/ppt/pptx/odt/ods/odp/rtf), and the preview modal header shows a short label derived from the filename extension (e.g.XLSX) — matching the file even for attachments already stored asapplication/zip, with no DB backfill.
Developed test-first: the Go office/config and upload content-type handler tests run against a real database, and the @multica/views modal test asserts the new header label; typechecks clean.