Limit images size, substitute variables in titles
This commit is contained in:
parent
f09fce3140
commit
3088675a39
|
|
@ -86,6 +86,7 @@
|
|||
|
||||
.image {
|
||||
max-width: 100%;
|
||||
max-height: 30dvh;
|
||||
display: block;
|
||||
border-radius: var(--radius, 4px);
|
||||
margin: 0.5em 0;
|
||||
|
|
|
|||
|
|
@ -128,10 +128,10 @@ export const Editor = () => {
|
|||
const WorldIcon = isChatOnly ? MessagesSquare : Globe;
|
||||
const titleBar = currentStory
|
||||
? <div class={styles.title}>
|
||||
<span class={styles.titleWorld}>{currentWorld?.title}</span>
|
||||
<span class={styles.titleSep}>/</span>{currentStory.title}</div>
|
||||
<span class={styles.titleWorld}>{Prompt.substituteVars(appState, currentWorld!.title)}</span>
|
||||
<span class={styles.titleSep}>/</span>{Prompt.substituteVars(appState, currentStory.title)}</div>
|
||||
: currentWorld
|
||||
? <div class={styles.title}><WorldIcon size={24} />{currentWorld.title}</div>
|
||||
? <div class={styles.title}><WorldIcon size={24} />{Prompt.substituteVars(appState, currentWorld.title)}</div>
|
||||
: null;
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import type { Story, World } from "../contexts/state";
|
|||
import { isStory, isWorld, useAppState } from "../contexts/state";
|
||||
import CharacterCard from "../utils/character-card";
|
||||
import { SettingsModal } from "./settings-modal";
|
||||
import Prompt from "../utils/prompt";
|
||||
|
||||
// ─── Inline Rename Input ──────────────────────────────────────────────────────
|
||||
|
||||
|
|
@ -56,6 +57,7 @@ interface StoryItemProps {
|
|||
|
||||
const StoryItem = ({ story, active, onSelect, onRename, onDelete, onDuplicate, onExport }: StoryItemProps) => {
|
||||
const isEditing = useBool(false);
|
||||
const appState = useAppState();
|
||||
|
||||
if (isEditing.value) {
|
||||
return (
|
||||
|
|
@ -76,7 +78,7 @@ const StoryItem = ({ story, active, onSelect, onRename, onDelete, onDuplicate, o
|
|||
onClick={onSelect}
|
||||
onDblClick={isEditing.setTrue}
|
||||
>
|
||||
{story.title}
|
||||
{Prompt.substituteVars(appState, story.title)}
|
||||
</button>
|
||||
<div class={styles.actions}>
|
||||
<button class={styles.actionButton} onClick={isEditing.setTrue} title="Rename">
|
||||
|
|
|
|||
Loading…
Reference in New Issue