feat: 优化文章优化Tab
This commit is contained in:
+2
-3
@@ -798,14 +798,13 @@ with tab3:
|
||||
with st.container(border=True):
|
||||
st.markdown("粘贴或上传已写文章,一键提升 GEO 效果(结构化、可引用、自然植入品牌)")
|
||||
|
||||
with st.form("opt_form", clear_on_submit=False):
|
||||
# 输入方式与文章内容放在表单外,以便粘贴/上传后能触发重跑,从而正确更新「开始优化」按钮的可用状态
|
||||
input_mode = st.radio(
|
||||
"输入方式",
|
||||
["粘贴文本", "上传文件(TXT/MD)"],
|
||||
horizontal=True,
|
||||
key="opt_input_mode",
|
||||
)
|
||||
|
||||
if input_mode == "粘贴文本":
|
||||
original_article = st.text_area(
|
||||
"粘贴文章内容", height=360, key="opt_text"
|
||||
@@ -823,7 +822,6 @@ with tab3:
|
||||
except Exception as e:
|
||||
st.error(f"上传文件解析失败:{e}")
|
||||
original_article = ""
|
||||
|
||||
if original_article:
|
||||
st.text_area(
|
||||
"上传内容预览",
|
||||
@@ -833,6 +831,7 @@ with tab3:
|
||||
key="opt_upload_preview",
|
||||
)
|
||||
|
||||
with st.form("opt_form", clear_on_submit=False):
|
||||
target_platform = st.selectbox(
|
||||
"目标平台(影响文风,可选)",
|
||||
[
|
||||
|
||||
+15
-15
@@ -52,33 +52,33 @@ div[data-testid="stButton"] button[kind="primary"],
|
||||
div[data-testid="stFormSubmitButton"] button[kind="primary"] {
|
||||
# background-color: var(--primary) !important;
|
||||
# color: white !important;
|
||||
border-radius: var(--radius) !important;
|
||||
# border-radius: var(--radius) !important;
|
||||
# border: none !important;
|
||||
}
|
||||
|
||||
button[kind="secondary"],
|
||||
div[data-testid="stButton"] button[kind="secondary"] {
|
||||
background: #FFFFFF !important;
|
||||
border: 1px solid var(--border) !important;
|
||||
# color: var(--text) !important;
|
||||
border-radius: var(--radius) !important;
|
||||
}
|
||||
# button[kind="secondary"],
|
||||
# div[data-testid="stButton"] button[kind="secondary"] {
|
||||
# background: #FFFFFF !important;
|
||||
# border: 1px solid var(--border) !important;
|
||||
# # color: var(--text) !important;
|
||||
# border-radius: var(--radius) !important;
|
||||
# }
|
||||
|
||||
button:focus, button:focus-visible {
|
||||
box-shadow: 0 0 0 3px rgba(37,99,235,0.12) !important;
|
||||
outline: none !important;
|
||||
}
|
||||
# button:focus, button:focus-visible {
|
||||
# box-shadow: 0 0 0 3px rgba(37,99,235,0.12) !important;
|
||||
# outline: none !important;
|
||||
# }
|
||||
|
||||
/* 输入 */
|
||||
.stTextInput input, .stTextArea textarea, .stSelectbox div[data-baseweb="select"] {
|
||||
border-radius: 10px !important;
|
||||
}
|
||||
.stTextInput input, .stTextArea textarea {
|
||||
border: 1px solid var(--border) !important;
|
||||
# border: 1px solid var(--border) !important;
|
||||
padding: 0.75rem !important;
|
||||
}
|
||||
.stTextInput input:focus, .stTextArea textarea:focus {
|
||||
border-color: var(--primary) !important;
|
||||
# border-color: var(--primary) !important;
|
||||
box-shadow: 0 0 0 3px rgba(37,99,235,0.12) !important;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ button:focus, button:focus-visible {
|
||||
.stTabs [role="tab"]:focus-visible {
|
||||
outline: none !important;
|
||||
box-shadow: none !important;
|
||||
border: none !important;
|
||||
# border: none !important;
|
||||
}
|
||||
|
||||
/* Tabs 产品化 */
|
||||
|
||||
Reference in New Issue
Block a user