优化布局逻辑

This commit is contained in:
puke
2025-10-28 15:24:08 +08:00
committed by puke
parent bf1641f8a5
commit bce84ae445
3 changed files with 19 additions and 22 deletions

View File

@@ -5,7 +5,8 @@
"app.subtitle": "Forge your perfect reel engine",
"section.content_input": "📖 Content Input",
"section.style_settings": "⚙️ Custom Settings",
"section.audio_settings": "🔊 Audio Settings",
"section.visual_settings": "🎨 Visual Settings",
"section.video_generation": "🎬 Generate Video",
"input_mode.book": "📚 Book Name",

View File

@@ -5,7 +5,8 @@
"app.subtitle": "打造专属你的视频创作引擎",
"section.content_input": "📖 内容输入",
"section.style_settings": "⚙️ 自定义设置",
"section.audio_settings": "🔊 声音设置",
"section.visual_settings": "🎨 画面设置",
"section.video_generation": "🎬 生成视频",
"input_mode.book": "📚 书名",

View File

@@ -394,12 +394,6 @@ def main():
placeholder=tr("input.title_placeholder"),
help=tr("input.title_help")
)
# ====================================================================
# Video Settings (moved from right column)
# ====================================================================
with st.container(border=True):
st.markdown(f"**{tr('video.title')}**")
# Number of scenes (only show in generate mode)
if mode == "generate":
@@ -412,16 +406,18 @@ def main():
label_visibility="collapsed"
)
st.caption(tr("video.frames_label", n=n_scenes))
st.markdown("---")
else:
# Fixed mode: n_scenes is ignored, set default value
n_scenes = 5
st.info(tr("video.frames_fixed_mode_hint"))
# ====================================================================
# Audio Settings (Voice + BGM)
# ====================================================================
with st.container(border=True):
st.markdown(f"**{tr('section.audio_settings')}**")
st.markdown("---")
# Voice selection (moved from middle column)
# Voice selection
st.markdown(f"**{tr('voice.title')}**")
voice_id = st.selectbox(
"Voice",
@@ -461,15 +457,8 @@ def main():
except Exception as e:
st.error(tr("voice.preview_failed", error=str(e)))
logger.exception(e)
# ========================================================================
# Middle Column: Custom Settings (BGM & Visual Style & Template)
# ========================================================================
with middle_col:
with st.container(border=True):
st.markdown(f"**{tr('section.style_settings')}**")
# Background music (moved from left column)
# Background music
st.markdown(f"**{tr('bgm.title')}**")
st.caption(tr("bgm.custom_help"))
@@ -508,7 +497,13 @@ def main():
# Use full filename for bgm_path (including extension)
bgm_path = None if bgm_choice == tr("bgm.none") else bgm_choice
# ========================================================================
# Middle Column: Visual Settings (Style & Template)
# ========================================================================
with middle_col:
with st.container(border=True):
st.markdown(f"**{tr('section.visual_settings')}**")
# Visual style (Workflow + Prompt Prefix)
st.markdown(f"**{tr('style.title')}**")