pvarki / rasenmaeher-ui

0 stars 1 forks source link

Add configurable assets by env #24

Closed 3zk1m0 closed 3 months ago

3zk1m0 commented 8 months ago

What Does This PR Do

Implement configurable assets by env. Using env flag VITE_ASSET_SET, you can choose whether to load assets "x" or "y". You set these at assetSetStore, right now there are "fdf" and "neutral" assets.

When you want to use dynamic assets you want to make sure your dynamic asset has equivalent for sets (both "fdf" and "neutral", so on). If the assets are images, you want to then import them to your components from /assets/set/* where the env-defined assets are placed by VITE on startup. If the assets are translation keys, make sure keys are present in locales under assetSetStore, and then use the "dynamic" namespace for accessing them.

Why

Images of changes

Neutral facade, login screen

Näyttökuva 2024-7-6 kello 14 35 07

FDF facade has the FDF logos for top bar and center, and FDF copyright notices & privacy policy.

benjamsf commented 4 months ago

Alright, I think I have all set here

benjamsf commented 4 months ago

@3zk1m0 as the PR is opened by you, the review request is borked but here, review ready!

benjamsf commented 3 months ago

Fixed few mishaps and also this small content bug: https://github.com/pvarki/rasenmaeher-ui/issues/30

Now ready for review & merge if all good, @3zk1m0 when you can