修复批量生成后查看历史按钮跳转失效
This commit is contained in:
@@ -372,13 +372,28 @@ def render_batch_output(pixelle_video, video_params):
|
|||||||
st.success(tr("batch.success_message"))
|
st.success(tr("batch.success_message"))
|
||||||
st.info(tr("batch.view_in_history"))
|
st.info(tr("batch.view_in_history"))
|
||||||
|
|
||||||
# Button to go to History page
|
# Button to go to History page using JavaScript URL navigation
|
||||||
if st.button(
|
st.markdown(
|
||||||
f"📚 {tr('batch.goto_history')}",
|
f"""
|
||||||
type="secondary",
|
<a href="/History" target="_blank">
|
||||||
use_container_width=True
|
<button style="
|
||||||
):
|
width: 100%;
|
||||||
st.switch_page("pages/2_📚_History.py")
|
padding: 0.5rem 1rem;
|
||||||
|
background-color: white;
|
||||||
|
color: rgb(49, 51, 63);
|
||||||
|
border: 1px solid rgba(49, 51, 63, 0.2);
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 400;
|
||||||
|
text-align: center;
|
||||||
|
">
|
||||||
|
📚 {tr('batch.goto_history')}
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
""",
|
||||||
|
unsafe_allow_html=True
|
||||||
|
)
|
||||||
|
|
||||||
# Show failed tasks if any
|
# Show failed tasks if any
|
||||||
if batch_result["errors"]:
|
if batch_result["errors"]:
|
||||||
|
|||||||
Reference in New Issue
Block a user