About modal: powered by footer for branded installations, update status badge (#33233)

This commit is contained in:
Michael Geers 2026-08-27 20:45:50 +02:00 • committed by GitHub
parent 27bbdce298
commit 8905c2777b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 114 additions and 49 deletions

View file

@ -1,4 +1,11 @@
import { StorybookConfig } from "@storybook/vue3-vite";
import { createReadStream } from "node:fs";
// serve test logos so the custom branding stories can render them
const customLogos = {
"/custom-logo-light": "tests/custom-logo-light.svg",
"/custom-logo-dark": "tests/custom-logo-dark.svg",
};
export default {
stories: ["../assets/js/**/*.stories.@(js|ts)"],
@ -10,4 +17,21 @@ export default {
core: {
disableTelemetry: true,
},
viteFinal: (config) => ({
...config,
plugins: [
...(config.plugins ?? []),
{
name: "evcc-custom-logos",
configureServer(server) {
server.middlewares.use((req, res, next) => {
const file = customLogos[req.url?.split("?")[0] as keyof typeof customLogos];
if (!file) return next();
res.setHeader("Content-Type", "image/svg+xml");
createReadStream(file).pipe(res);
});
},
},
],
}),
} satisfies StorybookConfig;