jbilcke-hf HF staff commited on
Commit
67fda5f
β€’
1 Parent(s): f658021

add photonovel + edit button

Browse files
src/app/engine/presets.ts CHANGED
@@ -387,9 +387,10 @@ export const presets: Record<string, Preset> = {
387
  font: "actionman",
388
  llmPrompt: "new movie",
389
  imagePrompt: (prompt: string) => [
390
- `3D render`,
391
- `Blender`,
392
- `3D animation`,
 
393
  `Unreal engine`,
394
  `${prompt}`,
395
  ],
@@ -572,6 +573,58 @@ export const presets: Record<string, Preset> = {
572
  ],
573
  },
574
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
575
  }
576
 
577
  export type PresetName = keyof typeof presets
 
387
  font: "actionman",
388
  llmPrompt: "new movie",
389
  imagePrompt: (prompt: string) => [
390
+ `3D render animation`,
391
+ `Pixar`,
392
+ `cute`,
393
+ `funny`,
394
  `Unreal engine`,
395
  `${prompt}`,
396
  ],
 
573
  ],
574
  },
575
  */
576
+ photonovel: {
577
+ id: "photonovel",
578
+ label: "Vintage photonovel",
579
+ family: "european",
580
+ color: "color",
581
+ font: "actionman",
582
+ llmPrompt: "new movie",
583
+ imagePrompt: (prompt: string) => [
584
+ `vintage`,
585
+ `1950`,
586
+ `1960`,
587
+ `french new wave`,
588
+ `faded colors`,
589
+ `color movie`,
590
+ `screencap`,
591
+ `${prompt}`,
592
+ ],
593
+ negativePrompt: () => [
594
+ "manga",
595
+ "anime",
596
+ "american comic",
597
+ "grayscale",
598
+ "monochrome",
599
+ "painting"
600
+ ],
601
+ },
602
+ stockphoto: {
603
+ id: "stockphoto",
604
+ label: "Stock photo",
605
+ family: "european",
606
+ color: "color",
607
+ font: "actionman",
608
+ llmPrompt: "new movie",
609
+ imagePrompt: (prompt: string) => [
610
+ `cinematic`,
611
+ `hyperrealistic`,
612
+ `footage`,
613
+ `sharp 8k`,
614
+ `analog`,
615
+ `instagram`,
616
+ `photoshoot`,
617
+ `${prompt}`,
618
+ ],
619
+ negativePrompt: () => [
620
+ "manga",
621
+ "anime",
622
+ "american comic",
623
+ "grayscale",
624
+ "monochrome",
625
+ "painting"
626
+ ],
627
+ },
628
  }
629
 
630
  export type PresetName = keyof typeof presets
src/app/interface/edit-modal/index.tsx CHANGED
@@ -5,6 +5,7 @@ import { Button } from "@/components/ui/button"
5
  import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"
6
  import { Input } from "@/components/ui/input"
7
  import { cn } from "@/lib/utils"
 
8
 
9
 
10
  export function EditModal({
@@ -33,9 +34,7 @@ export function EditModal({
33
  return (
34
  <Dialog open={isOpen} onOpenChange={() => isEnabled ? setOpen(true) : undefined}>
35
  <DialogTrigger asChild>
36
- <Button variant="outline">
37
- {children}
38
- </Button>
39
  </DialogTrigger>
40
  <DialogContent className="sm:max-w-[425px]">
41
  <DialogHeader>
@@ -45,7 +44,7 @@ export function EditModal({
45
  </DialogDescription>
46
  </DialogHeader>
47
  <div className="flex flex-row flex-grow w-full">
48
- <Input
49
  placeholder="Story"
50
  className="w-full bg-neutral-300 text-neutral-800 dark:bg-neutral-300 dark:text-neutral-800 rounded-r-none"
51
  // disabled={atLeastOnePanelIsBusy}
 
5
  import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"
6
  import { Input } from "@/components/ui/input"
7
  import { cn } from "@/lib/utils"
8
+ import { Textarea } from "@/components/ui/textarea"
9
 
10
 
11
  export function EditModal({
 
34
  return (
35
  <Dialog open={isOpen} onOpenChange={() => isEnabled ? setOpen(true) : undefined}>
36
  <DialogTrigger asChild>
37
+ {children}
 
 
38
  </DialogTrigger>
39
  <DialogContent className="sm:max-w-[425px]">
40
  <DialogHeader>
 
44
  </DialogDescription>
45
  </DialogHeader>
46
  <div className="flex flex-row flex-grow w-full">
47
+ <Textarea
48
  placeholder="Story"
49
  className="w-full bg-neutral-300 text-neutral-800 dark:bg-neutral-300 dark:text-neutral-800 rounded-r-none"
50
  // disabled={atLeastOnePanelIsBusy}
src/app/interface/panel/index.tsx CHANGED
@@ -349,22 +349,22 @@ export function Panel({
349
  // there is an issue, this env check doesn't work..
350
  // process.env.NEXT_PUBLIC_CAN_REDRAW === "true" ?
351
  <div
352
- className={cn(`relative -mt-14 ml-4`,)}>
353
  <div className="flex flex-row space-x-2">
354
  <div
355
  onClick={rendered.status === "completed" ? handleReload : undefined}
356
  className={cn(
357
  `bg-stone-100 rounded-lg`,
358
  `flex flex-row space-x-2 items-center`,
359
- `py-2 px-3 cursor-pointer`,
360
  `transition-all duration-200 ease-in-out`,
361
  rendered.status === "completed" ? "opacity-95" : "opacity-50",
362
  mouseOver && rendered.assetUrl ? `scale-95 hover:scale-100 hover:opacity-100`: `scale-0`
363
  )}>
364
  <RxReload
365
- className="w-5 h-5"
366
  />
367
- <span className="text-sm">Redraw</span>
368
  </div>
369
  <EditModal
370
  isEnabled={rendered.status === "completed"}
@@ -375,15 +375,15 @@ export function Panel({
375
  className={cn(
376
  `bg-stone-100 rounded-lg`,
377
  `flex flex-row space-x-2 items-center`,
378
- `py-2 px-3 cursor-pointer`,
379
  `transition-all duration-200 ease-in-out`,
380
  rendered.status === "completed" ? "opacity-95" : "opacity-50",
381
  mouseOver && rendered.assetUrl ? `scale-95 hover:scale-100 hover:opacity-100`: `scale-0`
382
  )}>
383
  <RxPencil2
384
- className="w-5 h-5"
385
  />
386
- <span className="text-sm">Edit</span>
387
  </div>
388
 
389
  </EditModal>
 
349
  // there is an issue, this env check doesn't work..
350
  // process.env.NEXT_PUBLIC_CAN_REDRAW === "true" ?
351
  <div
352
+ className={cn(`relative -mt-8 ml-2 md:-mt-12md:ml-3 lg:-mt-14 lg:ml-4`,)}>
353
  <div className="flex flex-row space-x-2">
354
  <div
355
  onClick={rendered.status === "completed" ? handleReload : undefined}
356
  className={cn(
357
  `bg-stone-100 rounded-lg`,
358
  `flex flex-row space-x-2 items-center`,
359
+ `py-1 px-2 md:py-2 md:px-3 cursor-pointer`,
360
  `transition-all duration-200 ease-in-out`,
361
  rendered.status === "completed" ? "opacity-95" : "opacity-50",
362
  mouseOver && rendered.assetUrl ? `scale-95 hover:scale-100 hover:opacity-100`: `scale-0`
363
  )}>
364
  <RxReload
365
+ className="w-3 h-3 md:w-4 md:h-4 lg:w-5 lg:h-5"
366
  />
367
+ <span className="text-2xs md:text-xs lg:text-sm">Redraw</span>
368
  </div>
369
  <EditModal
370
  isEnabled={rendered.status === "completed"}
 
375
  className={cn(
376
  `bg-stone-100 rounded-lg`,
377
  `flex flex-row space-x-2 items-center`,
378
+ `py-1 px-3 md:py-2 md:px-3 cursor-pointer`,
379
  `transition-all duration-200 ease-in-out`,
380
  rendered.status === "completed" ? "opacity-95" : "opacity-50",
381
  mouseOver && rendered.assetUrl ? `scale-95 hover:scale-100 hover:opacity-100`: `scale-0`
382
  )}>
383
  <RxPencil2
384
+ className="w-3 h-3 md:w-4 md:h-4 lg:w-5 lg:h-5"
385
  />
386
+ <span className="text-2xs md:text-xs lg:text-sm">Edit</span>
387
  </div>
388
 
389
  </EditModal>