tech.lgbt is one of the many independent Mastodon servers you can use to participate in the fediverse.
We welcome all marginalized identities. This Mastodon instance is generally for folks who are LGBTQIA+ and Allies with an interest in tech work, academics, or technology in general.

Server stats:

3.1K
active users

Public

Playing around with CSS :neofox_laptop:

Quiet public

Actually, instead of using a grid, it might be easier to just make boxes with fixed sizes and placement, and then rotate them with the contents, rather than dealing with the contents of each block separately :neofox_think:

Quiet public

I'm getting somewhere :neofox_owo:

Quiet public

Looks good enough for now!

Next I can work on the backend for a simple one-suit four-tile game :neofox_mug_owo:

Public

Made some progress on turning the mahjong layout mockup into Yew components. The view is pretty much the same, but now I can specify the tiles outside of the view :neofox_mug:

Quiet public

Here's the layout with a bunch of different tiles

I wanted to have randomly drawn tiles, but apparently one does not simply add rand to a project that uses web assembly :neofox_dizzy:

Quiet public

I guess it's a sign that I should just have separate "server" and "client" parts, and worry about a possible offline version later :neofox_think:

Quiet public

Oh, huh, apparently now it kinda works, even though it throws a bunch of errors? :neofox_confused:

Quiet public

I've separated some of the logic into a separate library, so that I can share it between the frontend and the backend.

Now I'm trying to figure out how to get Yew to make an async call (to communicate with a NATS server) :neofox_laptop:

Quiet public

One day I'll understand how Callbacks work in Yew. Today doesn't seem to be that day :neofox_cry_loud:

Quiet public

Okay, I got the tile id to bubble up when the tile is clicked :neofox_happy:

(I've removed the tile shuffling for now)

Quiet public

And now I can pass the id over to the Tauri backend, which in turn can publish it to NATS :neofox_happy:

(It would be nice to publish directly from WebAssembly, but the nats crate doesn't compile to wasm yet)