main
tt 9 months ago
parent cc243e6767
commit 6c25a03b26

@ -1,6 +1,7 @@
# 网站 URL
NEXT_PUBLIC_SITE_URL=https://sorawebui.com
# openai config
OPENAI_API_KEY=sk-XXXXXX
OPENAI_API_BASE_URL=https://fake-sora-api.sorawebui.com
OPENAI_API_MODEL=sora-1.0-turbo

@ -6,6 +6,7 @@
"title": "Sora Webui",
"description": "A browser interface for OpenAI Sora, generate text-to-video simply.",
"loadingText": "Loading...",
"generateText": "Generating...",
"buttonText": "Generate",
"placeholderText": "Type or paste text here...",
"loginText": "Log in",

@ -6,6 +6,7 @@
"title": "Sora Webui",
"description": "OpenAI Sora 的浏览器界面,可轻松生成文本到视频。",
"loadingText": "加载中...",
"generateText": "生成中...",
"buttonText": "生成",
"placeholderText": "在此处输入或粘贴文本...",
"loginText": "登录",

@ -14,6 +14,7 @@ const PageComponent = ({
title: '',
description: '',
loadingText: '',
generateText: '',
buttonText: '',
placeholderText: '',
loginText: '',
@ -47,6 +48,9 @@ const PageComponent = ({
const result = await response.json();
setShowLoadingModal(false);
if (result.data) {
if (!result.data[0].revised_prompt) {
return
}
const video = {
revised_prompt: result.data[0].revised_prompt,
url: result.data[0].url

@ -11,6 +11,7 @@ export default async function IndexPage({params: {locale = ''}}) {
title: t('title'),
description: t('description'),
loadingText: t('loadingText'),
generateText: t('generateText'),
buttonText: t('buttonText'),
placeholderText: t('placeholderText'),
loginText: t('loginText'),

@ -33,7 +33,8 @@ export default function Header({
page = '',
currentLanguageText = {
loginText: 'Log in',
loadingText: 'Loading'
loadingText: 'Loading',
generateText: 'Generating',
},
}) {
const {showLoadingModal, setShowLoadingModal} = useCommonContext();
@ -62,7 +63,7 @@ export default function Header({
return (
<header className="sticky top-0 bg-[#020d24] z-20 w-full">
<LoadingModal loadingText={currentLanguageText.loadingText}/>
<LoadingModal loadingText={currentLanguageText.generateText}/>
<nav className="mx-auto flex max-w-7xl items-center justify-between gap-x-6 p-4 lg:px-0" aria-label="Global">
<div className="flex lg:flex-1">
<a href={`/${locale}`} className="-m-1.5 p-1.5" onClick={() => setShowLoadingModal(true)}>

Loading…
Cancel
Save