chore: drop non-code junk (pi-mono-reference, runtime state, root duplicates)
Remove files that should never have been tracked: - pi-mono-reference/: 688-file copy of an upstream monorepo, zero imports, used only as offline human reference - build/electron-builder.runtime.json: environment-specific build artifact with hardcoded local paths - state/cancel-signal-state.json: runtime state written by the app - prompt.txt, logo.svg (root): exact duplicates of the canonical copies under .planning/archive/ and assets/ Add state/ to .gitignore so future runtime state stays out.
This commit is contained in:
1 parent
34ca5b77f1
commit
1f7230fe87
691 files changed
+3
-190434
No files matched your search
-53
@@ -1,53 +0,0 @@
|
||||
import * as fs from "node:fs";
|
||||
import { Container, Image, Spacer, Text } from "@mariozechner/pi-tui";
|
||||
import { getBundledInteractiveAssetPath } from "../../../config.js";
|
||||
import { theme } from "../theme/theme.js";
|
||||
import { DynamicBorder } from "./dynamic-border.js";
|
||||
|
||||
const BLOG_URL = "https://mariozechner.at/posts/2026-04-08-ive-sold-out/";
|
||||
const IMAGE_FILENAME = "clankolas.png";
|
||||
|
||||
let cachedImageBase64: string | undefined;
|
||||
let attemptedImageLoad = false;
|
||||
|
||||
function loadImageBase64(): string | undefined {
|
||||
if (attemptedImageLoad) {
|
||||
return cachedImageBase64;
|
||||
}
|
||||
|
||||
attemptedImageLoad = true;
|
||||
try {
|
||||
cachedImageBase64 = fs.readFileSync(getBundledInteractiveAssetPath(IMAGE_FILENAME)).toString("base64");
|
||||
} catch {
|
||||
cachedImageBase64 = undefined;
|
||||
}
|
||||
return cachedImageBase64;
|
||||
}
|
||||
|
||||
export class EarendilAnnouncementComponent extends Container {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.addChild(new DynamicBorder((text) => theme.fg("accent", text)));
|
||||
this.addChild(new Text(theme.bold(theme.fg("accent", "pi has joined Earendil")), 1, 0));
|
||||
this.addChild(new Spacer(1));
|
||||
this.addChild(new Text(theme.fg("muted", "Read the blog post:"), 1, 0));
|
||||
this.addChild(new Text(theme.fg("mdLink", BLOG_URL), 1, 0));
|
||||
this.addChild(new Spacer(1));
|
||||
|
||||
const imageBase64 = loadImageBase64();
|
||||
if (imageBase64) {
|
||||
this.addChild(
|
||||
new Image(
|
||||
imageBase64,
|
||||
"image/png",
|
||||
{ fallbackColor: (text) => theme.fg("muted", text) },
|
||||
{ maxWidthCells: 56, filename: IMAGE_FILENAME },
|
||||
),
|
||||
);
|
||||
this.addChild(new Spacer(1));
|
||||
}
|
||||
|
||||
this.addChild(new DynamicBorder((text) => theme.fg("accent", text)));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user