diff --git a/build/build.ts b/build/build.ts index 3d347f9..91c0269 100644 --- a/build/build.ts +++ b/build/build.ts @@ -307,7 +307,11 @@ async function generateFrontendJs(): Promise { { name: "", resolveId: function (importee, importer) { - if (importee.endsWith("/bigint")) { + if (importee.endsWith("/package.json")) { + const p = path.resolve(path.dirname(importer), importee); + if (p === path.resolve(INPUT_DIR, "package.json")) + return path.resolve(OUTPUT_DIR, "package.json"); + } else if (importee.endsWith("/bigint")) { return this.resolve(importee + "-jsbi", importer); } else if (importee === "espresso-iisojs") { return this.resolve( diff --git a/ui/css/app.css b/ui/css/app.css index fe005f1..12caa0c 100644 --- a/ui/css/app.css +++ b/ui/css/app.css @@ -285,9 +285,21 @@ body { } & > .logo { - margin: 10px; - display: inline; - height: 56px; + display: inline-block; + position: relative; + & > img { + margin: 10px; + height: 56px; + } + + & > .version { + position: absolute; + bottom: 5px; + right: 10px; + font-family: monospace; + font-size: 10px; + color: #666; + } } & > .user-menu { diff --git a/ui/layout.ts b/ui/layout.ts index 9a40aad..e3e1317 100644 --- a/ui/layout.ts +++ b/ui/layout.ts @@ -23,6 +23,7 @@ import drawerComponent from "./drawer-component"; import userMenu from "./user-menu"; import adminMenu from "./admin-menu"; import * as overlay from "./overlay"; +import { version as VERSION } from "../package.json"; const adminPages = [ "presets", @@ -51,7 +52,11 @@ const component: ClosureComponent = (): Component => { return [ m("#header", [ - m("img.logo", { src: "logo.svg" }), + m( + "div.logo", + m("img", { src: "logo.svg" }), + m("span.version", "v" + VERSION) + ), m(userMenu), m(menu, attrs), m(drawerComponent),