added single post viewing

This commit is contained in:
2024-11-25 19:12:54 -05:00
parent eb9b093485
commit a7f6ecf477
13 changed files with 733 additions and 411 deletions
+12
View File
@@ -51,6 +51,18 @@ const createMainWindow = () => {
mainWindow = null // dereference the window object when closed
});
// mainWindow.webContents.on('will-navigate', (e, ustr, inPlace) => {
// const u = isURL(ustr);
// if (u.protocol === 'file:' && u.pathname === '/post') {
// // e.preventDefault();
// // const bskyid = u.searchParams.get('id');
// // TODO: implement loading single post
// // maybe move this logic to the page itself via ipc and just
// // have this redirect to a file?
// }
// });
mainWindow.webContents.on('did-navigate', (_, url) => {
mainWindow.webContents.executeJavaScript('document.title')
.then(title => insertHistory(url, title));