Spaces:
Sleeping
Sleeping
Julian Bilcke 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">
|
| 31 |
-
<span className="inline md:hidden">
|
| 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
|
| 4 |
return (
|
| 5 |
<Button
|
| 6 |
variant="outline"
|
| 7 |
-
className="bg-yellow-300"
|
| 8 |
onClick={() => {
|
| 9 |
-
window.open("https://huggingface.co/spaces/jbilcke-hf/ai-
|
| 10 |
}}>
|
| 11 |
-
<span className="hidden md:inline">Try the
|
| 12 |
-
<span className="inline md:hidden">
|
| 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 {
|
|
|
|
| 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">
|
| 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
|