Skip to content

Commit

Permalink
Associate .bbl and .bfl files with PWA (#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
McGiverGim authored May 28, 2024
1 parent 56e0a57 commit 60711ef
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2130,6 +2130,18 @@ function BlackboxLogViewer() {
return false;
};

if ("launchQueue" in window) {
launchQueue.setConsumer(async (launchParams) => {
console.log("Opening files by extension in the desktop:", launchParams);
const files = [];
for (const fileHandler of launchParams.files) {
console.log("launchQueue file", fileHandler);
files.push(await fileHandler.getFile());
}
loadFiles(files);
});
};

prefs.get('videoConfig', function(item) {
if (item) {
videoConfig = item;
Expand Down
6 changes: 6 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ export default {
type: 'image/png',
},
],
file_handlers: [{
action: "/",
accept: {
"application/octet-stream": [".bbl", ".bfl"],
},
}],
},
}),
],
Expand Down

0 comments on commit 60711ef

Please sign in to comment.