Skip to content

Commit 7a9036c

Browse files
committed
Merge upstream/main into fix/mobile-markdown-file-images
2 parents 57c8679 + 9b2d043 commit 7a9036c

198 files changed

Lines changed: 19472 additions & 4732 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/desktop/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@t3tools/desktop",
3-
"version": "0.0.36",
3+
"version": "0.0.37",
44
"private": true,
55
"type": "module",
66
"main": "dist-electron/main.cjs",

‎apps/desktop/src/electron/ElectronProtocol.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ describe("ElectronProtocol", () => {
225225
"http:",
226226
"https:",
227227
]);
228+
assert.deepEqual(directives["media-src"], ["'self'", "t3code:", "blob:"]);
228229
assert.deepEqual(directives["font-src"], ["'self'", "t3code:", "data:"]);
229230
});
230231
});

‎apps/desktop/src/electron/ElectronProtocol.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export function makeDesktopContentSecurityPolicy(input: DesktopProtocolRegistrat
8787
`script-src ${scriptSources.join(" ")}`,
8888
`connect-src ${connectSources.join(" ")}`,
8989
`img-src 'self' ${input.scheme}: blob: data: http: https:`,
90+
`media-src 'self' ${input.scheme}: blob:`,
9091
"style-src 'self' 'unsafe-inline'",
9192
`font-src 'self' ${input.scheme}: data:`,
9293
"worker-src 'self' blob:",

‎apps/desktop/src/ipc/methods/preview.ts‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
DesktopPreviewConfigInputSchema,
1212
DesktopPreviewNavigateInputSchema,
1313
DesktopPreviewRecordingArtifactSchema,
14+
DesktopPreviewRecordingSourceSchema,
1415
DesktopPreviewRecordingSaveInputSchema,
1516
DesktopPreviewRegisterWebviewInputSchema,
1617
DesktopPreviewScreenshotArtifactSchema,
@@ -173,11 +174,15 @@ export const cancelPickElement = tabMethod(
173174
"desktop.ipc.preview.cancelPickElement",
174175
(manager, tabId) => manager.cancelPickElement(tabId),
175176
);
176-
export const startRecording = tabMethod(
177-
IpcChannels.PREVIEW_RECORDING_START_CHANNEL,
178-
"desktop.ipc.preview.startRecording",
179-
(manager, tabId) => manager.startRecording(tabId),
180-
);
177+
export const startRecording = DesktopIpc.makeIpcMethod({
178+
channel: IpcChannels.PREVIEW_RECORDING_START_CHANNEL,
179+
payload: DesktopPreviewTabInputSchema,
180+
result: DesktopPreviewRecordingSourceSchema,
181+
handler: Effect.fn("desktop.ipc.preview.startRecording")(function* ({ tabId }) {
182+
const manager = yield* PreviewManager.PreviewManager;
183+
return yield* manager.startRecording(tabId);
184+
}),
185+
});
181186
export const stopRecording = tabMethod(
182187
IpcChannels.PREVIEW_RECORDING_STOP_CHANNEL,
183188
"desktop.ipc.preview.stopRecording",

0 commit comments

Comments
 (0)