Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(files): load PDFs in browser previews #21095

MergedYash-Singh1(GitHub profile, opens in a new tab)merged 9 commits intomain fromrefs/pull/21095/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 32 changed files with 34 additions and 0 deletions (loading 28).

x
0 of 32 viewed, 32 left
1 addition and 0 deletionsapps/desktop/src/electron/ElectronProtocol.test.tsModified
View file
@@ -322,6 +322,7 @@
]);
assert.deepEqual(directives["media-src"], ["'self'", "t3code:", "blob:", "http:", "https:"]);
assert.deepEqual(directives["frame-src"], ["'self'", "blob:", "http:", "https:"]);
+ assert.deepEqual(directives["object-src"], ["'self'", "blob:", "http:", "https:"]);
assert.deepEqual(directives["font-src"], ["'self'", "t3code:", "data:"]);
});
});
1 addition and 0 deletionsapps/desktop/src/electron/ElectronProtocol.tsModified
View file
@@ -95,6 +95,7 @@
`font-src 'self' ${input.scheme}: data:`,
"worker-src 'self' blob:",
"frame-src 'self' blob: http: https:",
+ "object-src 'self' blob: http: https:",
"form-action 'self'",
].join("; ");
32 additions and 0 deletionsapps/mobile/src/components/FilePreview.tsxModified
View file
@@ -2,12 +2,43 @@
import { useEffect, useEffectEvent } from "react";
import { Modal, Pressable, View } from "react-native";
import ImageViewing from "react-native-image-viewing";
+import { useSafeAreaInsets } from "react-native-safe-area-context";
​