Make PDF Viewer a native feature
- Move the PDF Viewer plugin into src/lib/features/pdf/ with pdfjs-dist 6.4.299 (minified builds). - A static pdf document type marks PDF files and opens them as tabs. The first PDF tab loads the module. - The worker, the character maps, the fonts, and the decoders come from the app. One worker for each tab. - The toolbar uses IconButton and the shared tooltip, with the new zoom-in, zoom-out, fit-width, and rotate icons. - Add THIRD_PARTY_NOTICES.md for PDF.js and xterm. - Update the tests, the menu inventory, the docs, and UI-059.
This commit is contained in:
@@ -261,9 +261,9 @@ test("the feature migration copies the terminal settings also when the package r
|
||||
|
||||
test("the terminal switch follows the enabled state of an installed Terminal plugin", async () => {
|
||||
const writes: unknown[] = [];
|
||||
const host = { read: () => ({ git: true, background: true }), write: async (value: unknown) => { writes.push(value); },
|
||||
const host = { read: () => ({ git: true, background: true, pdf: true }), write: async (value: unknown) => { writes.push(value); },
|
||||
legacy: async (ids: string[]) => ids.map(id => ({ id, installed: true, enabled: false, settings: null })) };
|
||||
const background = { missing: () => false, hasImage: () => false, migrateFolder: async () => false, write: async () => {} };
|
||||
assert.deepEqual(await migrateFeatures(host, background, terminalHost(false, null)), ["terminal"]);
|
||||
assert.deepEqual(writes, [{ git: true, background: true, terminal: false }]);
|
||||
assert.deepEqual(writes, [{ git: true, background: true, pdf: true, terminal: false }]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user