I’m the developer of a desktop-first Lemmy client called Alexandrite.

  • 40 Posts
  • 52 Comments
Joined 2 years ago
cake
Cake day: July 5th, 2023

help-circle


  • It might not help because it’s in svelte and it doesn’t look like you’re using lemmy-js-client, but this is an example of how I do it in Alexandrite using lemmy-js-client. The onPaste function handles the paste event on the markdown editor textarea when someone pastes with an image in their clipboard, and the onFileInputChange is the change event for an <input type="file" /> element so when someone selects a file it uploads and the input’s label can be styled like a button. Here is the client’s fetch function which handles the authorization header and whatnot. You can upload client-side without a proxy server for any instance running a newer version of Lemmy than like… 0.19.0? I didn’t want to be responsible for proxying image uploads so I waited to add image uploading in Alexandrite until I could do the uploads directly client side.



















  • I was feeling pretty bad about leaving it untouched for so long, but working on (any of) my side projects wasn’t interesting me for a while. However with all the general social media turmoil out there (Meta trying to be more evil, US banning TikTok, and billionaires in general being just the worst) I figured I should do my part to improve the appeal of the fediverse. Seeing lots of things I want to improve, and I’m remembering how much I like making things look nice.














  • This is intentional, but I’ll probably be changing it.

    When you click a post while in a feed it changes the URL so it’s easier for people to share links to posts, as people probably are most used to copying a URL out of the address bar to send to people. It causes a lot of issues though, like the one you mentioned, and the ‘back’ button on your browser basically doesn’t work either. Because of all of that I’m probably going to remove that feature, and make a more prominent “share” button somewhere.