jbilcke-hf HF staff commited on
Commit
d6eda94
β€’
1 Parent(s): 66e6b3f

fix for the firehose

Browse files
src/app/{interface/firehose β†’ firehose}/delete.tsx RENAMED
@@ -38,7 +38,10 @@ export function Delete({ post, moderationKey = "", onDelete = () => {} }: { post
38
  {post ?<div className="flex flex-col py-4 text-stone-800">
39
 
40
  <div className="w-full h-64">
41
- <img
 
 
 
42
  src={post.assetUrl}
43
  className={cn(
44
  `w-full h-64 rounded-xl overflow-hidden object-cover`,
 
38
  {post ?<div className="flex flex-col py-4 text-stone-800">
39
 
40
  <div className="w-full h-64">
41
+ <video
42
+ loop
43
+ autoPlay
44
+ muted
45
  src={post.assetUrl}
46
  className={cn(
47
  `w-full h-64 rounded-xl overflow-hidden object-cover`,
src/app/{interface/firehose β†’ firehose}/page.tsx RENAMED
@@ -43,9 +43,7 @@ export default function FirehosePage() {
43
  )}>
44
  <div className="w-full flex flex-col items-center overflow-y-scroll">
45
  <div className="flex flex-col space-y-2 pt-18 mb-6">
46
- <h1 className="text-4xl md:text-6xl lg:text-[70px] xl:text-[100px] text-cyan-700">🌐 Panoremix</h1>
47
- <h2 className="text-3xl mb-6">Generate cool panoramas using AI!</h2>
48
- <h2 className="text-2xl">Latest locations synthesized:</h2>
49
  </div>
50
 
51
  <div className="w-full grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-x-4 gap-y-6 px-12">
@@ -59,18 +57,12 @@ export default function FirehosePage() {
59
  className="group flex flex-col cursor-pointer"
60
  >
61
  <div className="w-full h-32">
62
- {moderationKey ? <div className="relative -mb-8 ml-2">
63
- <Button
64
- className="z-30 bg-red-200 text-red-700 hover:bg-red-300 hover:text-red-800 text-2xs px-2 h-7"
65
- onClick={(e) => {
66
- e.preventDefault()
67
- setToDelete(post)
68
- return false
69
- }}>Delete</Button>
70
- </div> : null}
71
- <img
72
- src={post.assetUrl}
73
- className={cn(
74
  `w-full h-32 rounded-xl overflow-hidden object-cover`,
75
  `border border-zinc-900/70`,
76
  // `group-hover:brightness-105`
@@ -90,6 +82,15 @@ export default function FirehosePage() {
90
  <div
91
  className="text-sm text-stone-700/70 w-full group-hover:underline underline-offset-2"
92
  >{new Date(Date.parse(post.createdAt)).toLocaleString()}</div>
 
 
 
 
 
 
 
 
 
93
  </div>
94
  </Link>
95
  ))}
 
43
  )}>
44
  <div className="w-full flex flex-col items-center overflow-y-scroll">
45
  <div className="flex flex-col space-y-2 pt-18 mb-6">
46
+ <h1 className="text-4xl md:text-6xl lg:text-[70px] xl:text-[100px] text-cyan-700">AI Clip Factory</h1>
 
 
47
  </div>
48
 
49
  <div className="w-full grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-x-4 gap-y-6 px-12">
 
57
  className="group flex flex-col cursor-pointer"
58
  >
59
  <div className="w-full h-32">
60
+ <video
61
+ muted
62
+ autoPlay={false}
63
+ loop
64
+ src={post.assetUrl}
65
+ className={cn(
 
 
 
 
 
 
66
  `w-full h-32 rounded-xl overflow-hidden object-cover`,
67
  `border border-zinc-900/70`,
68
  // `group-hover:brightness-105`
 
82
  <div
83
  className="text-sm text-stone-700/70 w-full group-hover:underline underline-offset-2"
84
  >{new Date(Date.parse(post.createdAt)).toLocaleString()}</div>
85
+ {moderationKey ? <div className="">
86
+ <Button
87
+ className="z-40 bg-red-200 text-red-700 hover:bg-red-300 hover:text-red-800 text-2xs px-2 h-7"
88
+ onClick={(e) => {
89
+ e.preventDefault()
90
+ setToDelete(post)
91
+ return false
92
+ }}>Delete</Button>
93
+ </div> : null}
94
  </div>
95
  </Link>
96
  ))}
src/app/server/actions/community.ts CHANGED
@@ -217,8 +217,8 @@ export async function deletePost({
217
  }
218
 
219
  if (moderationKey !== secretModerationKey) {
220
- console.error(`invalid moderation key, operation denied! please ask a Panoremix admin for the mdoeration key`)
221
- throw new Error(`invalid moderation key, operation denied! please ask a Panoremix admin for the mdoeration key`)
222
  }
223
 
224
  try {
 
217
  }
218
 
219
  if (moderationKey !== secretModerationKey) {
220
+ console.error(`invalid moderation key, operation denied! please ask an admin for the mdoeration key`)
221
+ throw new Error(`invalid moderation key, operation denied! please ask an admin for the mdoeration key`)
222
  }
223
 
224
  try {