feat/camera
Lucas Nogueira 2 years ago
parent c34afb7187
commit ff86de7ce2
No known key found for this signature in database
GPG Key ID: 7C32FCA95C8C95D7

@ -72,8 +72,8 @@ async function check(src) {
const missingHeader = []; const missingHeader = [];
for (const entry of fs.readdirSync(src, { for (const entry of fs.readdirSync(src, {
withFileTypes: true, withFileTypes: true,
})) { })) {
const p = path.join(src, entry.name); const p = path.join(src, entry.name);
if (entry.isSymbolicLink() || ignore.includes(entry.name)) { if (entry.isSymbolicLink() || ignore.includes(entry.name)) {
@ -113,8 +113,7 @@ if (files.length > 0) {
run(); run();
} else { } else {
check(path.resolve(new URL( check(path.resolve(new URL(import.meta.url).pathname, "../../..")).then(
import.meta.url).pathname, "../../..")).then(
(missing) => { (missing) => {
if (missing.length > 0) { if (missing.length > 0) {
console.log(missing.join("\n")); console.log(missing.join("\n"));
@ -122,4 +121,4 @@ if (files.length > 0) {
} }
}, },
); );
} }

@ -5,7 +5,7 @@ import { createConfig } from "../../shared/rollup.config.mjs";
export default createConfig({ export default createConfig({
input: "guest-js/index.ts", input: "guest-js/index.ts",
pkg: JSON.parse( pkg: JSON.parse(
readFileSync(new URL("./package.json", import.meta.url), "utf8") readFileSync(new URL("./package.json", import.meta.url), "utf8"),
), ),
external: [/^@tauri-apps\/api/], external: [/^@tauri-apps\/api/],
}); });

@ -21,9 +21,12 @@
} }
function requestPermission() { function requestPermission() {
return window.__TAURI_INVOKE__("plugin:notification|request_permission") return window
.__TAURI_INVOKE__("plugin:notification|request_permission")
.then(function (permission) { .then(function (permission) {
setNotificationPermission(permission === 'prompt' ? 'default' : permission); setNotificationPermission(
permission === "prompt" ? "default" : permission,
);
return permission; return permission;
}); });
} }

Loading…
Cancel
Save