Complete the app: capture UI, dialogs, template manager, shortcuts help
Template tests / tests (push) Failing after 21s
Template tests / tests (push) Failing after 21s
- Editor topbar reworked: Back | Capture ▾ (full screen/window/region/ delay/paste/import/session) | Save | Export | Share (.sfgz) | More ▾ (rename, guide placeholders, backups, linked guide, shortcuts, settings) - New dialogs: backups & snapshots (undoable restore), guide/global placeholder editor, keyboard-shortcuts reference, template manager (rename/duplicate/delete/share/import .sfglt) - Export dialog: editable per-format options generated from exporter defaults, save-as-template, preview opens the file in the default viewer and keeps the dialog open for tweaking - export:defaults IPC + preload entry - CSS for blocks panel, focused-view sliders, export options, rows - ipc-surface test: every preload channel has a main handler; renderer api.*/dialogs.* usage stays within the exposed surface (60 tests) - CHANGELOG/README updated; prompt2.md checklist fully ticked Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+17
@@ -348,6 +348,23 @@ function setupIpc() {
|
||||
|
||||
// export + preview
|
||||
h('export:formats', () => FORMATS.filter((f) => EXPORTERS[f]));
|
||||
h('export:defaults', ({ format }) => {
|
||||
// Exporter modules expose DEFAULT_TEMPLATE; the dialog renders editable
|
||||
// options from it (booleans -> checkbox, numbers -> number, strings -> text).
|
||||
const mod = {
|
||||
json: '../exporters/json',
|
||||
markdown: '../exporters/markdown',
|
||||
'html-simple': '../exporters/html',
|
||||
'html-rich': '../exporters/html',
|
||||
pdf: '../exporters/pdf',
|
||||
gif: '../exporters/gif',
|
||||
'image-bundle': '../exporters/image-bundle',
|
||||
docx: '../exporters/docx',
|
||||
pptx: '../exporters/pptx',
|
||||
}[format];
|
||||
if (!mod) return {};
|
||||
return { ...require(mod).DEFAULT_TEMPLATE };
|
||||
});
|
||||
h('export:run', async ({ guideId, format, options, outDir }) => {
|
||||
let dir = outDir || settings.get(`exports.lastOutputDirs.${format}`);
|
||||
if (!dir) {
|
||||
|
||||
Reference in New Issue
Block a user