this post was submitted on 16 Jun 2023
134 points (97.2% liked)

Selfhosted

40651 readers
200 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

There's a ton of issues with the UI I want to address and there's a number of things I want to experiment such as how communities are subscribed to, so I started writing a new UI in SvelteKit. I also have Capacitor setup which would allow this to triple as a native iOS and Android application.

Would love some help if anyone is interested.

Github https://github.com/ando818/lemmy-ui-svelte

Preview so far though much yet still has to be done

you are viewing a single comment's thread
view the rest of the comments
[–] BitOneZero 4 points 2 years ago* (last edited 2 years ago) (4 children)

My main Lemmy.ml account comment isn't properly federating over to lemmy.world, so I'm duplicating my reply on my alt-account:

Cool. SvelteKit is ideal for this.

Can you move the server name to an .env variable so I don't have to run a sed? sharing my sed:

find src/ -type f | xargs sed -i 's/lemmy\.world/enterprise.lemmy.ml/g'

FYI, there is a double https:// on page https://github.com/ando818/lemmy-ui-svelte/blob/main/src/lib/lemmyclient.js

On desktop browser, I'm getting a '500 internal error' on the /r/post/xxx route, but not sure why. The console isn't showing anything. The page.server.js seems to get the JSON fine from the API, but the .svelte file in that route is failing.

[–] andobando 2 points 2 years ago (3 children)

Can you move the server name to an .env variable so I don’t have to run a sed? sharing my sed:

Yes, definitely will do.

On desktop browser, I’m getting a ‘500 internal error’ on the /r/post/xxx route, but not sure why. The console isn’t showing anything. The page.server.js seems to get the JSON fine from the API, but the .svelte file in that route is failing.

I think I know this issue. When clicking a post from the front page it stores the post so upon landing on /post/xxx it doesn't have to refetch that data. It fetches the comments on /post/xxx but not the post itself. Just need to fetch the post itself if someone lands directly on that page.

[–] BitOneZero 1 points 2 years ago* (last edited 2 years ago) (1 children)

I saw you updated the repository right after you commented to me, but I was still getting the '500 internal error' on /post/xxx route.

I tracked it down to:

/src/lib/components/Comment.svelte

Has a line:

import { comment } from 'svelte/internal';

Removing that line eliminated my page crash.

[–] andobando 3 points 2 years ago

Ah, my ide auto pulls in imports sometimes. Thank you

load more comments (1 replies)
load more comments (1 replies)