mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-04-28 23:16:44 +00:00
fix(settings): polish insight context controls
This commit is contained in:
@@ -915,6 +915,29 @@
|
|||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.insight-collapsible-setting {
|
||||||
|
display: grid;
|
||||||
|
grid-template-rows: 0fr;
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(-4px);
|
||||||
|
transition: grid-template-rows 0.22s ease, opacity 0.18s ease, transform 0.2s ease;
|
||||||
|
|
||||||
|
&.expanded {
|
||||||
|
grid-template-rows: 1fr;
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.collapsed {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.insight-collapsible-setting-inner {
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
/* Premium Switch Style */
|
/* Premium Switch Style */
|
||||||
.switch {
|
.switch {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -3616,22 +3639,35 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.insight-social-tab {
|
&.insight-social-tab {
|
||||||
|
--insight-moments-column-width: 76px;
|
||||||
|
--insight-social-column-width: minmax(220px, 300px);
|
||||||
|
--insight-status-column-width: 82px;
|
||||||
|
--insight-social-list-grid: minmax(0, 1fr) var(--insight-moments-column-width) var(--insight-social-column-width) var(--insight-status-column-width);
|
||||||
|
|
||||||
.anti-revoke-list-header {
|
.anti-revoke-list-header {
|
||||||
grid-template-columns: minmax(0, 1fr) 86px minmax(240px, 340px) auto;
|
grid-template-columns: var(--insight-social-list-grid);
|
||||||
|
gap: 14px;
|
||||||
|
|
||||||
.insight-moments-column-title {
|
.insight-moments-column-title {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
color: var(--text-tertiary);
|
color: var(--text-tertiary);
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.insight-social-column-title {
|
.insight-social-column-title {
|
||||||
|
min-width: 0;
|
||||||
|
color: var(--text-tertiary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.anti-revoke-status-column-title {
|
||||||
|
justify-self: end;
|
||||||
color: var(--text-tertiary);
|
color: var(--text-tertiary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.anti-revoke-row {
|
.anti-revoke-row {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: minmax(0, 1fr) 86px minmax(240px, 340px) auto;
|
grid-template-columns: var(--insight-social-list-grid);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 14px;
|
gap: 14px;
|
||||||
}
|
}
|
||||||
@@ -3772,9 +3808,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.anti-revoke-row-status {
|
.anti-revoke-row-status {
|
||||||
justify-self: flex-end;
|
justify-self: end;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
|
min-width: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3322,7 +3322,8 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{aiInsightAllowContext && (
|
<div className={`insight-collapsible-setting ${aiInsightAllowContext ? 'expanded' : 'collapsed'}`} aria-hidden={!aiInsightAllowContext}>
|
||||||
|
<div className="insight-collapsible-setting-inner">
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label>发送近期对话条数</label>
|
<label>发送近期对话条数</label>
|
||||||
<span className="form-hint">
|
<span className="form-hint">
|
||||||
@@ -3334,6 +3335,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
|
|||||||
value={aiInsightContextCount}
|
value={aiInsightContextCount}
|
||||||
min={1}
|
min={1}
|
||||||
max={200}
|
max={200}
|
||||||
|
disabled={!aiInsightAllowContext}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const val = Math.max(1, Math.min(200, parseInt(e.target.value, 10) || 40))
|
const val = Math.max(1, Math.min(200, parseInt(e.target.value, 10) || 40))
|
||||||
setAiInsightContextCount(val)
|
setAiInsightContextCount(val)
|
||||||
@@ -3342,7 +3344,8 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
|
|||||||
style={{ width: 100 }}
|
style={{ width: 100 }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="divider" />
|
<div className="divider" />
|
||||||
|
|
||||||
@@ -3369,7 +3372,8 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{aiInsightAllowMomentsContext && (
|
<div className={`insight-collapsible-setting ${aiInsightAllowMomentsContext ? 'expanded' : 'collapsed'}`} aria-hidden={!aiInsightAllowMomentsContext}>
|
||||||
|
<div className="insight-collapsible-setting-inner">
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label>发送近期朋友圈条数</label>
|
<label>发送近期朋友圈条数</label>
|
||||||
<span className="form-hint">
|
<span className="form-hint">
|
||||||
@@ -3381,6 +3385,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
|
|||||||
value={aiInsightMomentsContextCount}
|
value={aiInsightMomentsContextCount}
|
||||||
min={1}
|
min={1}
|
||||||
max={20}
|
max={20}
|
||||||
|
disabled={!aiInsightAllowMomentsContext}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const val = Math.max(1, Math.min(20, parseInt(e.target.value, 10) || 5))
|
const val = Math.max(1, Math.min(20, parseInt(e.target.value, 10) || 5))
|
||||||
setAiInsightMomentsContextCount(val)
|
setAiInsightMomentsContextCount(val)
|
||||||
@@ -3389,7 +3394,8 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
|
|||||||
style={{ width: 100 }}
|
style={{ width: 100 }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="divider" />
|
<div className="divider" />
|
||||||
|
|
||||||
@@ -3428,7 +3434,8 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{aiInsightAllowSocialContext && (
|
<div className={`insight-collapsible-setting ${aiInsightAllowSocialContext ? 'expanded' : 'collapsed'}`} aria-hidden={!aiInsightAllowSocialContext}>
|
||||||
|
<div className="insight-collapsible-setting-inner">
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label>发送近期社交平台内容条数</label>
|
<label>发送近期社交平台内容条数</label>
|
||||||
<span className="form-hint">
|
<span className="form-hint">
|
||||||
@@ -3442,6 +3449,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
|
|||||||
value={aiInsightSocialContextCount}
|
value={aiInsightSocialContextCount}
|
||||||
min={1}
|
min={1}
|
||||||
max={5}
|
max={5}
|
||||||
|
disabled={!aiInsightAllowSocialContext}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const val = Math.max(1, Math.min(5, parseInt(e.target.value, 10) || 3))
|
const val = Math.max(1, Math.min(5, parseInt(e.target.value, 10) || 3))
|
||||||
setAiInsightSocialContextCount(val)
|
setAiInsightSocialContextCount(val)
|
||||||
@@ -3450,7 +3458,8 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
|
|||||||
style={{ width: 100 }}
|
style={{ width: 100 }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="divider" />
|
<div className="divider" />
|
||||||
{/* 自定义 System Prompt */}
|
{/* 自定义 System Prompt */}
|
||||||
@@ -3728,7 +3737,7 @@ function SettingsPage({ onClose }: SettingsPageProps = {}) {
|
|||||||
<span>对话({filteredSessions.length})</span>
|
<span>对话({filteredSessions.length})</span>
|
||||||
<span className="insight-moments-column-title">朋友圈</span>
|
<span className="insight-moments-column-title">朋友圈</span>
|
||||||
<span className="insight-social-column-title">社交平台(微博)</span>
|
<span className="insight-social-column-title">社交平台(微博)</span>
|
||||||
<span>状态</span>
|
<span className="anti-revoke-status-column-title">状态</span>
|
||||||
</div>
|
</div>
|
||||||
{filteredSessions.map((session) => {
|
{filteredSessions.map((session) => {
|
||||||
const isSelected = aiInsightFilterList.has(session.username)
|
const isSelected = aiInsightFilterList.has(session.username)
|
||||||
|
|||||||
Reference in New Issue
Block a user