jbilcke-hf HF staff commited on
Commit
9c58e18
β€’
1 Parent(s): afe50f3

let's add some ad

Browse files
src/app/interface/about/index.tsx CHANGED
@@ -27,8 +27,8 @@ export function About() {
27
  <Dialog open={isOpen} onOpenChange={setOpen}>
28
  <DialogTrigger asChild>
29
  <Button variant="outline">
30
- <span className="hidden md:inline">{APP_NAME.replaceAll(" ", "-")} {APP_VERSION}</span>
31
- <span className="inline md:hidden">Version {APP_VERSION}</span>
32
  </Button>
33
  </DialogTrigger>
34
  <DialogContent className="w-full sm:max-w-[500px] md:max-w-[600px] overflow-y-scroll h-[100vh] sm:h-[550px]">
 
27
  <Dialog open={isOpen} onOpenChange={setOpen}>
28
  <DialogTrigger asChild>
29
  <Button variant="outline">
30
+ <span className="hidden md:inline">About</span>
31
+ <span className="inline md:hidden">About</span>
32
  </Button>
33
  </DialogTrigger>
34
  <DialogContent className="w-full sm:max-w-[500px] md:max-w-[600px] overflow-y-scroll h-[100vh] sm:h-[550px]">
src/app/interface/{ai-clip-factory β†’ advert}/index.tsx RENAMED
@@ -1,15 +1,15 @@
1
  import { Button } from "@/components/ui/button"
2
 
3
- export function AIClipFactory() {
4
  return (
5
  <Button
6
  variant="outline"
7
- className="bg-yellow-300"
8
  onClick={() => {
9
- window.open("https://huggingface.co/spaces/jbilcke-hf/ai-clip-factory?postId=f63df23d-de2f-4dee-961c-a56f160dd159&prompt=pikachu%2C+working+on+a+computer%2C+office%2C+serious%2C+typing%2C+keyboard&model=TheLastBen%2FPikachu_SDXL", "_blank")
10
  }}>
11
- <span className="hidden md:inline">Try the clip factory!</span>
12
- <span className="inline md:hidden">Clips</span>
13
  </Button>
14
  )
15
  }
 
1
  import { Button } from "@/components/ui/button"
2
 
3
+ export function Advert() {
4
  return (
5
  <Button
6
  variant="outline"
7
+ className="bg-yellow-400 border-stone-600/30 hover:bg-yellow-300"
8
  onClick={() => {
9
+ window.open("https://huggingface.co/spaces/jbilcke-hf/ai-stories-factory", "_blank")
10
  }}>
11
+ <span className="hidden md:inline">Try the AI Stories Factory</span>
12
+ <span className="inline md:hidden">AI Stories Factory</span>
13
  </Button>
14
  )
15
  }
src/app/interface/bottom-bar/bottom-bar.tsx CHANGED
@@ -15,7 +15,8 @@ import { useLocalStorage } from "usehooks-ts"
15
  import { localStorageKeys } from "../settings-dialog/localStorageKeys"
16
  import { defaultSettings } from "../settings-dialog/defaultSettings"
17
  import { getParam } from "@/lib/getParam"
18
- import { Input } from "@/components/ui/input"
 
19
 
20
  function BottomBar() {
21
  // deprecated, as HTML-to-bitmap didn't work that well for us
@@ -132,10 +133,7 @@ function BottomBar() {
132
  )}>
133
  <About />
134
  <Discord />
135
- {/*
136
- Thank you clip factory for your service 🫑
137
- <AIClipFactory />
138
- */}
139
  </div>
140
  <div className={cn(
141
  `flex flex-row`,
@@ -188,6 +186,7 @@ function BottomBar() {
188
  >
189
  {remainingImages ? `${allStatus.length - remainingImages}/${allStatus.length} βŒ›` : `Save`}
190
  </Button> : null}
 
191
  <Button
192
  onClick={handlePrint}
193
  disabled={!prompt?.length}
@@ -199,6 +198,7 @@ function BottomBar() {
199
  remainingImages ? `${allStatus.length - remainingImages}/${allStatus.length} βŒ›` : `PDF`
200
  }</span>
201
  </Button>
 
202
  <Share />
203
  </div>
204
  </div>
 
15
  import { localStorageKeys } from "../settings-dialog/localStorageKeys"
16
  import { defaultSettings } from "../settings-dialog/defaultSettings"
17
  import { getParam } from "@/lib/getParam"
18
+ import { Advert } from "../advert"
19
+
20
 
21
  function BottomBar() {
22
  // deprecated, as HTML-to-bitmap didn't work that well for us
 
133
  )}>
134
  <About />
135
  <Discord />
136
+ <Advert />
 
 
 
137
  </div>
138
  <div className={cn(
139
  `flex flex-row`,
 
186
  >
187
  {remainingImages ? `${allStatus.length - remainingImages}/${allStatus.length} βŒ›` : `Save`}
188
  </Button> : null}
189
+ {/*
190
  <Button
191
  onClick={handlePrint}
192
  disabled={!prompt?.length}
 
198
  remainingImages ? `${allStatus.length - remainingImages}/${allStatus.length} βŒ›` : `PDF`
199
  }</span>
200
  </Button>
201
+ */}
202
  <Share />
203
  </div>
204
  </div>
src/app/interface/discord/index.tsx CHANGED
@@ -13,7 +13,7 @@ export function Discord() {
13
  href="https://discord.gg/AEruz9B92B"
14
  target="_blank">
15
  <div><FaDiscord size={24} /></div>
16
- <div className="text-sm ml-1.5">Community</div>
17
  </a>
18
  )
19
  }
 
13
  href="https://discord.gg/AEruz9B92B"
14
  target="_blank">
15
  <div><FaDiscord size={24} /></div>
16
+ <div className="text-sm ml-1.5">Discord</div>
17
  </a>
18
  )
19
  }
src/app/store/index.ts CHANGED
@@ -655,14 +655,14 @@ export const useStore = create<{
655
 
656
  const [stylePrompt, storyPrompt] = prompt.split("||").map(x => x.trim())
657
 
658
- const cleanStylePrompt = stylePrompt.replace(/([^a-z0-9, ]+)/gi, "_")
659
 
660
- const firstPartOfStory = storyPrompt.split(",").shift() || ""
661
  const cleanStoryPrompt = firstPartOfStory.replace(/([^a-z0-9, ]+)/gi, "_")
662
 
663
  const cleanName = `${cleanStoryPrompt.slice(0, 22)} (${cleanStylePrompt.slice(0, 22) || "default style"})`
664
 
665
- anchor.download = `${cleanName}.clap`
666
 
667
  document.body.appendChild(anchor) // Append to the body (could be removed once clicked)
668
  anchor.click() // Trigger the download
 
655
 
656
  const [stylePrompt, storyPrompt] = prompt.split("||").map(x => x.trim())
657
 
658
+ const cleanStylePrompt = (stylePrompt || "").replace(/([^a-z0-9, ]+)/gi, "_")
659
 
660
+ const firstPartOfStory = (storyPrompt || "").split(",").shift() || ""
661
  const cleanStoryPrompt = firstPartOfStory.replace(/([^a-z0-9, ]+)/gi, "_")
662
 
663
  const cleanName = `${cleanStoryPrompt.slice(0, 22)} (${cleanStylePrompt.slice(0, 22) || "default style"})`
664
 
665
+ anchor.download = `AI Comic Factory - ${cleanName}.clap`
666
 
667
  document.body.appendChild(anchor) // Append to the body (could be removed once clicked)
668
  anchor.click() // Trigger the download