artcraft: port website Generation Details to lightbox-modal

Add Aspect Ratio, Resolution, Duration, Audio, Size, and Created rows to the
desktop app's lightbox so it matches the website's Information panel. Promote
the website's local format helpers into @storyteller/model-list so both
clients can share them.
This commit is contained in:
Tanish Manku authored and Brandon Thomas committed 2026-05-08 01:15:43 -04:00
1 parent 14b66c2ebf
commit bf0f8ee3b2
2 files changed
+40

No files matched your search

+1
View File
@@ -7,6 +7,7 @@ export * from "./lib/classes/properties/CommonQuality.js";
export * from "./lib/classes/metadata/ModelCreator.js";
export * from "./lib/classes/metadata/ModelCreatorIcons.js";
export * from "./lib/classes/metadata/ModelMapping.js";
export * from "./lib/classes/metadata/PromptFormatters.js";
export * from "./lib/classes/metadata/ModelTag.js";
export * from "./lib/classes/metadata/SizeOption.js";
export * from "./lib/legacy/ModelConfig.js";
@@ -0,0 +1,39 @@
const ASPECT_RATIO_LABELS: Record<string, string> = {
auto: "Auto",
square: "Square",
square_hd: "Square (HD)",
wide: "Wide",
tall: "Tall",
wide_three_by_two: "3:2",
wide_four_by_three: "4:3",
wide_five_by_four: "5:4",
wide_sixteen_by_nine: "16:9",
wide_twenty_one_by_nine: "21:9",
tall_two_by_three: "2:3",
tall_three_by_four: "3:4",
tall_four_by_five: "4:5",
tall_nine_by_sixteen: "9:16",
tall_nine_by_twenty_one: "9:21",
auto_2k: "Auto (2K)",
auto_3k: "Auto (3K)",
auto_4k: "Auto (4K)",
};
const RESOLUTION_LABELS: Record<string, string> = {
half_k: "0.5K",
one_k: "1K",
two_k: "2K",
three_k: "3K",
four_k: "4K",
four_eighty_p: "480p",
seven_twenty_p: "720p",
ten_eighty_p: "1080p",
};
export const formatAspectRatio = (value: string): string =>
ASPECT_RATIO_LABELS[value] ?? value;
export const formatResolution = (value: string): string =>
RESOLUTION_LABELS[value] ?? value;
export const formatDuration = (seconds: number): string => `${seconds}s`;