@bayang Thanks for creating Jelu - absolutely fantastic! (bought you a gallon of kofi πŸ‘) Running the jar from my home server - works like a charm.
@doRadiology thanks a lot ! Glad you find it useful. πŸ˜€

Hi @bayang

Can I change the default theme, for example to 'dark', when running from the .jar installation?

Thx for any pointers! #jar-n00b

@doRadiology hi, you should be able to go to the settings page and pick a theme. Is it not working ?

@bayang @doRadiology

thanks. That works, but every time I log back in it resets to default (white).
I was looking for a way to change the default theme to something else (dark)

@doRadiology the theme you pick is stored in the local storage of your browser and you should not have to set it each time. Is this storage accessible to jelu ? You can have a look in the dev tools of the browser. In the local storage you should see a 'jelu_language' entry and a 'theme' entry
@bayang @doRadiology I very often clean the browser cache. Multiple times daily. That’s why I am looking for a way to set the default theme in the yaml file (or in the java source and rebuild the jar… if I knew how to do that)
@doRadiology oh ok. That is not possible unfortunately. The backend does not know anything about the front.
@bayang @doRadiology A nice challenge for me then. Thanks for the replies πŸ‘
@doRadiology actually, if you're ok to modify the source code and build the jar yourself , I can show you how to set the theme in the front end and then how to build the jar. I'll give you the instructions when I have some free time.

@bayang @doRadiology Oh, that would be very much appreciated πŸ™

No urgency. Whenever you have free time is soon enough

@doRadiology I also added a BUILD.md file in the repo root which should allow you to build your own jar

@bayang Could help myself, had to try. Works perfectly 😁

At first it failed to build b/c I had java 21 installed on my arch64 Mac

Had to change jcmToolchain to 21

build.gradle.kts
kotlin {
jvmToolchain(21)
}

Then 'gradlew copyWebDist' finished successfully

But 'assemble' still failed on a 'kotlin java versions needs to be identical' error that I didn't know where to configure.

@bayang

... So installed Java 17, simlinked homebrew openjdk@17 to /Library/Java/JavaVirtualMachines/openjdk.jdk and the fat jar build and runs just fine.

Running the updated, dark-theme-enforced version from my home server.

Love Jelu and learned something new - thanks again! πŸ™πŸ»

@doRadiology I'm glad it worked. By building with a lower java version the final jar can be run with any version above 17. If you build with 21, only 21 can run the jar. That's why I do this.

@bayang

Ended up modifying only './src/jelu-ui/tailwind.config.js'

Making "dark" the first "daisyui" theme...

module.exports = {
...
daisyui: {
themes: [
"dark",
{
...
},
"light",
...
],

...so it changes the default to dark but still allows me to change the theme later if I want.

@doRadiology that's a good idea.