Merge branch 'main' of github.com:hmartiro/riffusion-app
This commit is contained in:
commit
5a23032fb8
|
@ -7,14 +7,12 @@ interface PromptPanelProps {
|
||||||
prompts: PromptInput[];
|
prompts: PromptInput[];
|
||||||
addPrompt: (prompt: string) => void;
|
addPrompt: (prompt: string) => void;
|
||||||
changePrompt: (prompt: string, index: number) => void;
|
changePrompt: (prompt: string, index: number) => void;
|
||||||
nextPrompt: () => void;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function PromptPanel({
|
export default function PromptPanel({
|
||||||
prompts,
|
prompts,
|
||||||
addPrompt,
|
addPrompt,
|
||||||
changePrompt,
|
changePrompt,
|
||||||
nextPrompt,
|
|
||||||
}: PromptPanelProps) {
|
}: PromptPanelProps) {
|
||||||
const inputPrompt = useRef(null);
|
const inputPrompt = useRef(null);
|
||||||
|
|
||||||
|
@ -59,13 +57,6 @@ export default function PromptPanel({
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{/* Test button */}
|
|
||||||
<button
|
|
||||||
title="Add"
|
|
||||||
className="fixed z-90 top-48 right-8 bg-slate-100 w-14 h-14 rounded-full drop-shadow-lg"
|
|
||||||
onClick={() => nextPrompt()}
|
|
||||||
></button>
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</>
|
</>
|
||||||
|
@ -77,6 +68,6 @@ const promptEntryClassNames = {
|
||||||
1: "font-normal text-m text-gray-300 text-opacity-60",
|
1: "font-normal text-m text-gray-300 text-opacity-60",
|
||||||
2: "font-medium text-xl text-gray-200 text-opacity-80",
|
2: "font-medium text-xl text-gray-200 text-opacity-80",
|
||||||
3: "font-bold text-5xl text-white", // This is the primary prompt
|
3: "font-bold text-5xl text-white", // This is the primary prompt
|
||||||
4: "font-medium text-2xl text-gray-200 text-opacity-80", // This is prompt it is transitioning to
|
4: "font-medium text-3xl text-gray-100 text-opacity-80", // This is prompt it is transitioning to
|
||||||
5: "font-normal text-m text-gray-300 text-opacity-60", // This is the UP NEXT prompt
|
5: "font-normal text-m text-gray-200 text-opacity-60", // This is the UP NEXT prompt
|
||||||
};
|
};
|
||||||
|
|
|
@ -371,17 +371,6 @@ export default function Home() {
|
||||||
newPromptInputs[index].prompt = prompt;
|
newPromptInputs[index].prompt = prompt;
|
||||||
setPromptInputs(newPromptInputs);
|
setPromptInputs(newPromptInputs);
|
||||||
}}
|
}}
|
||||||
nextPrompt={() => {
|
|
||||||
// if there are no upcoming prompts, don't do anything
|
|
||||||
var promptLastIndex = promptInputs.length - 1;
|
|
||||||
if (
|
|
||||||
promptInputs[promptLastIndex].prompt == "" &&
|
|
||||||
promptInputs[promptLastIndex - 1].prompt == ""
|
|
||||||
) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
setPromptInputs([...promptInputs, { prompt: "" }]);
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Info />
|
<Info />
|
||||||
|
|
Loading…
Reference in New Issue