Importing images and videos is now working in my notes app 🚀
But it's not quite perfect yet! There's still more work to do 💻
https://video.nostr.build/2bdbf56be17a988d968618f431d61a00ddb660abece83589338730df8141a8f8.mp4
When importing media for the first time, an `/assets` folder is created in the root directory where all media is saved. Media files are reference by relative paths in the note documents.
Need to work more on videos (notice the black bars on top and bottom - they should be removed). When placing cursor on video and then swiping up and down, the video starts scrubbing which is annoying. Need to figure out how to disable that.
Resizing images and videos doesn't work.
I also need to get fullscreen working. Basically, when double-clicking on an image, it should go into "fullscreen" - well, more like a popup with a blurry and dark background. I should probably add an option in the context menu when right-clicking an image to make it a fullscreen image that fills the entire screen. Two more options I should add could be "Open image in new tab" and "Reveal in Finder".
This is unrelated to media and is more of a general issue: There's a problem with the 'Files' sidebar not updating/re-rendering when new files are imported. It just does not render the new files, so they are never displayed in the sidebar, unless the user quits and reopens the app. I think this should be fairly easy to fix. I probably just forgot to observe an `NSNotification`...
#dev #Swift #AppKit #macOS
nostr:nevent1qvzqqqqqqypzp8yls8khjhc0tma9tzfjsfrg0kz0cln2fnaxmdwk6w6sljmlltkzqyt8wumn8ghj7un9d3shjtnwdaehgu3wvfskueqprpmhxue69uhhyetvv9ujuumwdae8gtnnda3kjctvqy28wumn8ghj7un9d3shjtnyv9kh2uewd9hsqg93x3mrphesysd24u705mxx757scs27a6xt6v8fkjmq3z0fk0n3fczu08p9
Login to reply