Files
offerpai_browser_plug/src/components/SidebarPanel.scss
T

677 lines
11 KiB
SCSS

$primary: #000;
$bg-card: #fafafa;
$radius-lg: 20px;
$radius-md: 14px;
$radius-sm: 12px;
.op-container {
position: fixed;
top: 10px;
right: 10px;
width: 380px;
min-height: 470px;
max-height: calc(100vh - 20px);
background: #fff;
border-radius: $radius-lg;
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
z-index: 2147483647;
display: flex;
flex-direction: column;
color: $primary;
font-size: 14px;
font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
user-select: none;
/* 收起状态 */
&--collapsed {
width: auto;
min-height: auto;
max-height: none;
background: transparent;
box-shadow: none;
border-radius: 50%;
}
}
/* 收起状态的 logo 圆圈 */
.op-collapsed-logo {
width: 60px;
height: 60px;
border-radius: 50%;
background: #fff;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: box-shadow 0.2s;
&:hover {
box-shadow: 0 6px 28px rgba(0, 0, 0, 0.18);
}
}
/* 拖拽提示气泡 */
.op-drag-tooltip {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #fff;
color: #333;
font-size: 13px;
padding: 8px 16px;
border-radius: 8px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
white-space: nowrap;
z-index: 10000;
pointer-events: none;
}
/* 内层容器:承载 padding 和滚动 */
.op-inner {
padding: 20px 20px 24px;
overflow-y: auto;
flex: 1;
display: flex;
flex-direction: column;
}
/* 面板填写遮罩:和 op-inner 同级,覆盖整个 op-container */
.op-filling-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.05);
border-radius: $radius-lg;
z-index: 9999;
}
.op-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
gap: 12px;
&-left {
display: flex;
align-items: center;
gap: 8px;
}
&-logo {
flex-shrink: 0;
}
&-status {
font-size: 13px;
color: #555;
font-weight: 500;
}
}
.op-collapse-btn {
background: none;
border: none;
cursor: pointer;
padding: 4px;
display: flex;
align-items: center;
color: #666;
border-radius: 4px;
transition: background 0.15s;
&:hover {
background: #f0f0f0;
}
}
.op-title {
font-size: 22px;
font-weight: 700;
margin-bottom: 16px;
}
.op-job {
&-card {
display: flex;
align-items: center;
gap: 12px;
border-radius: $radius-md;
margin-bottom: 24px;
}
&-icon {
width: 40px;
height: 40px;
border-radius: 10px;
background: #f0f0f0;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
&-info {
flex: 1;
min-width: 0;
}
&-title {
font-size: 15px;
font-weight: 600;
line-height: 20px;
}
&-meta {
font-size: 12px;
color: #888;
margin-top: 2px;
line-height: 16px;
}
}
.op-match-score {
flex-shrink: 0;
}
.op-autofill-btn {
width: 100%;
height: 40px;
background: #52CAD1;
color: #fff;
border: none;
border-radius: 4px;
font-size: 16px;
font-weight: 700;
cursor: pointer;
margin-bottom: 6px;
transition: opacity 0.2s;
&:hover { opacity: 0.85; }
&:disabled { opacity: 0.7; cursor: not-allowed; }
}
.op-credits {
&-row {
justify-content: space-between;
align-items: center;
margin-bottom: 2px;
padding: 0 2px;
text-align: center;
}
&-text {
font-size: 13px;
font-weight: 600;
}
&-link {
font-size: 12px;
font-weight: 500;
text-decoration: underline;
text-underline-offset: 3px;
cursor: pointer;
color: #666;
}
}
.op-section-label {
font-size: 14px;
font-weight: 600;
margin-bottom: 10px;
}
.op-resume {
&-card {
display: flex;
align-items: center;
gap: 10px;
padding: 2px 0px;
border-radius: $radius-sm;
margin-bottom: 12px;
}
&-avatar {
width: 36px;
height: 16px;
border-radius: 2px;
background: #E7F8F9;
display: flex;
align-items: center;
justify-content: center;
font-size: 8px;
color: #52CAD1;
flex-shrink: 0;
}
&-info {
flex: 1;
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
min-width: 0;
}
&-name {
font-size: 13px;
font-weight: 600;
color:#666;
}
&-tag {
font-size: 11px;
border: 1px solid #ddd;
border-radius: 10px;
padding: 1px 8px;
line-height: 18px;
white-space: nowrap;
}
&-change {
font-size: 14px;
font-weight: 600;
cursor: pointer;
flex-shrink: 0;
}
}
.op-optimize-btn {
width: 100%;
height: 48px;
background: #f0faf5;
color: $primary;
border: none;
border-radius: $radius-sm;
font-size: 17px;
font-weight: 600;
cursor: pointer;
margin-bottom: 20px;
transition: background 0.2s;
&:hover { background: #e0f5ec; }
}
.op-progress {
&-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
}
&-label {
font-size: 13px;
font-weight: 600;
}
&-value {
font-size: 12px;
color:#666;
}
&-bar-bg {
width: 100%;
height: 6px;
background: #D7F3F4;
border-radius: 3px;
}
&-bar-fill {
width: 50%;
height: 100%;
background: #52CAD1;
border-radius: 3px;
transition: width 0.3s;
}
}
/* 未登录提示区域 */
.op-login-prompt {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 60px 20px;
}
.op-login-text {
font-size: 15px;
color: #555;
margin-bottom: 24px;
text-align: center;
}
.op-login-btn {
width: 100%;
height: 48px;
background: $primary;
color: #fff;
border: none;
border-radius: $radius-md;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: opacity 0.2s;
&:hover { opacity: 0.85; }
}
/* ============ 字段列表区域(待填写 / 已填写) ============ */
.op-field-section {
margin-top: 16px;
&-title {
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
font-weight: 600;
margin-bottom: 8px;
color: #333;
}
&-dot {
width: 8px;
height: 8px;
border-radius: 50%;
flex-shrink: 0;
&--red { background: #ff4d4f; }
&--green { background: #34c759; }
}
&-count {
font-size: 11px;
font-weight: 500;
color: #999;
margin-left: 2px;
}
&-required-count {
font-size: 11px;
font-weight: 500;
color: #ff4d4f;
margin-left: 4px;
}
}
.op-field-list {
max-height: 301px;
overflow-y: auto;
border: 1px solid #f0f0f0;
border-radius: 10px;
padding: 6px 0;
/* 自定义滚动条 */
&::-webkit-scrollbar {
width: 4px;
}
&::-webkit-scrollbar-thumb {
background: #ddd;
border-radius: 2px;
}
}
.op-field-group {
&-title {
font-size: 12.5px;
font-weight: 600;
color: #222;
padding: 10px 14px 4px;
}
&-segment {
font-size: 11px;
font-weight: 500;
color: #888;
padding: 6px 14px 2px 22px;
border-top: 1px dashed #f0f0f0;
margin-top: 2px;
}
}
.op-field-item {
display: flex;
align-items: center;
gap: 6px;
padding: 7px 14px;
cursor: pointer;
transition: background 0.15s;
user-select: none;
&:hover {
background: #f5f8fa;
}
&-check {
flex-shrink: 0;
}
&-icon {
flex-shrink: 0;
}
&-name {
font-size: 12.5px;
color: #333;
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&-required {
font-size: 10px;
color: #ff4d4f;
font-weight: 500;
flex-shrink: 0;
padding: 1px 5px;
border: 1px solid #ffccc7;
border-radius: 4px;
line-height: 14px;
}
}
/* ============ 助手已记住的表单 弹窗 ============ */
.op-cache-modal-mask {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.4);
z-index: 2147483647;
display: flex;
align-items: center;
justify-content: center;
}
.op-cache-modal {
width: 700px;
height: 500px;
background: #fff;
border-radius: 12px;
box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
display: flex;
flex-direction: column;
overflow: hidden;
}
.op-cache-modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
border-bottom: 1px solid #f0f0f0;
flex-shrink: 0;
}
.op-cache-modal-title {
font-size: 16px;
font-weight: 700;
color: #222;
}
.op-cache-modal-close {
background: none;
border: none;
font-size: 18px;
color: #999;
cursor: pointer;
padding: 4px 8px;
border-radius: 4px;
transition: background 0.15s;
&:hover {
background: #f5f5f5;
color: #333;
}
}
.op-cache-modal-body {
flex: 1;
overflow-y: auto;
padding: 16px 20px;
&::-webkit-scrollbar {
width: 5px;
}
&::-webkit-scrollbar-thumb {
background: #ddd;
border-radius: 3px;
}
}
.op-cache-modal-empty {
text-align: center;
color: #999;
font-size: 14px;
padding: 60px 0;
}
.op-cache-modal-section {
margin-bottom: 20px;
&-title {
font-size: 15px;
font-weight: 700;
color: #111;
margin-bottom: 12px;
padding-bottom: 6px;
border-bottom: 1px solid #eee;
}
}
.op-cache-modal-segment {
margin-bottom: 14px;
&-title {
font-size: 13px;
font-weight: 600;
color: #555;
margin-bottom: 8px;
padding-left: 4px;
}
}
.op-cache-modal-fields {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.op-cache-modal-field {
display: inline-flex;
align-items: center;
gap: 6px;
/* 长文本 textarea 独占一行 */
&--full {
width: 100%;
flex-direction: column;
align-items: flex-start;
}
}
.op-cache-modal-label {
font-size: 12px;
color: #555;
white-space: nowrap;
flex-shrink: 0;
}
.op-cache-modal-input {
width: 200px;
height: 30px;
border: 1px solid #ddd;
border-radius: 4px;
padding: 0 8px;
font-size: 13px;
color: #333;
outline: none;
transition: border-color 0.2s;
&:focus {
border-color: #52CAD1;
}
}
.op-cache-modal-textarea {
width: 100%;
border: 1px solid #ddd;
border-radius: 4px;
padding: 6px 8px;
font-size: 13px;
color: #333;
outline: none;
resize: vertical;
font-family: inherit;
transition: border-color 0.2s;
&:focus {
border-color: #52CAD1;
}
}
.op-cache-modal-footer {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 20px;
border-top: 1px solid #f0f0f0;
flex-shrink: 0;
}
.op-cache-modal-btn {
height: 34px;
padding: 0 20px;
border: none;
border-radius: 6px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: opacity 0.2s;
&:hover { opacity: 0.85; }
&--clear {
background: #fff1f0;
color: #ff4d4f;
border: 1px solid #ffccc7;
}
&--save {
background: #52CAD1;
color: #fff;
}
}