Merge pull request #86 from zonghaoyuan/staging
release: staging → main (WEBP image format + header fixes)
This commit is contained in:
@@ -33,3 +33,5 @@ pitch/
|
||||
# OpenDeploy-only build with hardcoded public proxy URL — local, never commit
|
||||
# (a public fork would route image traffic through our Cloudflare Worker).
|
||||
Dockerfile.opendeploy
|
||||
|
||||
piolium/
|
||||
|
||||
+1
-1
@@ -1666,7 +1666,7 @@ export default function HomePage() {
|
||||
>
|
||||
<i className="fa-brands fa-x-twitter" />
|
||||
</a>
|
||||
<UserChip onLoginClick={() => setAuthModalOpen(true)} />
|
||||
<UserChip />
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
+1
-1
@@ -2574,7 +2574,7 @@ function PlayInner() {
|
||||
<span className="text-clay-300">·</span>
|
||||
<span>{String(beatCount).padStart(3, "0")} · 拍</span>
|
||||
</div>
|
||||
<UserChip onLoginClick={() => setAuthModalOpen(true)} />
|
||||
<UserChip />
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
+2
-19
@@ -5,11 +5,7 @@ import { AUTH_ENABLED } from "@/lib/supabase/config";
|
||||
import { createClient } from "@/lib/supabase/client";
|
||||
import type { AuthChangeEvent, Session, User } from "@supabase/supabase-js";
|
||||
|
||||
export function UserChip({
|
||||
onLoginClick,
|
||||
}: {
|
||||
onLoginClick: () => void;
|
||||
}) {
|
||||
export function UserChip() {
|
||||
const [user, setUser] = useState<User | null>(null);
|
||||
const [menuOpen, setMenuOpen] = useState(false);
|
||||
|
||||
@@ -32,20 +28,7 @@ export function UserChip({
|
||||
setMenuOpen(false);
|
||||
}, []);
|
||||
|
||||
if (!AUTH_ENABLED) return null;
|
||||
|
||||
if (!user) {
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
onClick={onLoginClick}
|
||||
className="flex items-center gap-1.5 rounded-full border border-cream-50/15 bg-cream-50/[0.06] px-3 py-1.5 text-[11px] text-cream-50/70 transition-colors hover:bg-cream-50/[0.12] hover:text-cream-50/90"
|
||||
>
|
||||
<i className="fa-solid fa-right-to-bracket text-[10px]" />
|
||||
登录
|
||||
</button>
|
||||
);
|
||||
}
|
||||
if (!AUTH_ENABLED || !user) return null;
|
||||
|
||||
const label =
|
||||
user.user_metadata?.full_name ??
|
||||
|
||||
@@ -329,7 +329,7 @@ async function generateImageRunware(
|
||||
CFGScale: 3.5,
|
||||
numberResults: 1,
|
||||
outputType: "URL",
|
||||
outputFormat: "PNG",
|
||||
outputFormat: "WEBP",
|
||||
includeCost: false,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user