Files
banban/banban-mini/src/pages/device/index.scss
2026-05-27 17:06:12 +08:00

695 lines
10 KiB
SCSS

.device-page {
min-height: 100%;
background: #F5F7FA;
padding-bottom: 160px;
padding-bottom: calc(160px + constant(safe-area-inset-bottom));
padding-bottom: calc(160px + env(safe-area-inset-bottom));
}
.page-header {
padding: 80px 32px 24px;
.page-title {
display: block;
font-size: 48px;
line-height: 1.2;
font-weight: 700;
color: #1A1A1A;
}
}
.status-card {
position: relative;
overflow: hidden;
margin: 0 24px 32px;
padding: 40px 36px;
border-radius: 28px;
background: linear-gradient(135deg, #FF8C42 0%, #FF6B35 100%);
&::before {
content: '';
position: absolute;
top: 50%;
right: -20px;
width: 200px;
height: 200px;
border-radius: 50%;
transform: translateY(-50%);
background: rgba(255, 255, 255, 0.1);
}
}
.status-badge {
display: inline-flex;
align-items: center;
margin-bottom: 24px;
padding: 10px 20px;
border-radius: 20px;
background: rgba(255, 255, 255, 0.25);
.status-dot {
width: 12px;
height: 12px;
margin-right: 8px;
border-radius: 50%;
background: #4CD964;
}
.status-text {
font-size: 24px;
font-weight: 500;
color: #FFFFFF;
}
}
.battery-section {
position: relative;
z-index: 1;
.battery-percent {
display: block;
margin-bottom: 12px;
font-size: 72px;
line-height: 1;
font-weight: 700;
color: #FFFFFF;
.percent {
margin-left: 4px;
font-size: 32px;
font-weight: 600;
}
}
.battery-label {
font-size: 26px;
color: rgba(255, 255, 255, 0.9);
}
}
.status-meta {
position: relative;
z-index: 1;
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-top: 24px;
}
.status-pill {
min-width: 140px;
padding: 12px 18px;
border-radius: 18px;
background: rgba(255, 255, 255, 0.18);
}
.status-pill-label {
display: block;
margin-bottom: 4px;
font-size: 22px;
color: rgba(255, 255, 255, 0.78);
}
.status-pill-value {
display: block;
font-size: 28px;
line-height: 1.2;
font-weight: 700;
color: #FFFFFF;
}
.device-avatar {
position: absolute;
top: 50%;
right: 36px;
display: flex;
align-items: center;
justify-content: center;
width: 120px;
height: 120px;
border: 3px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
transform: translateY(-50%);
background: rgba(255, 255, 255, 0.2);
}
.robot-icon {
.robot-img {
width: 56px;
height: 56px;
border-radius: 50%;
background: #FFFFFF;
}
}
.section-title {
display: block;
margin: 0 24px 20px;
font-size: 32px;
font-weight: 700;
color: #1A1A1A;
}
.control-card {
overflow: hidden;
margin: 0 24px 24px;
border-radius: 16px;
background: #FFFFFF;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.control-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 24px;
&.sleep-item:active {
background: #F8F9FA;
}
&.volume-item {
flex-direction: column;
align-items: stretch;
padding: 20px 24px 24px;
}
&.quick-sleep-item {
flex-direction: column;
align-items: stretch;
padding: 20px 24px 24px;
}
}
.control-left {
display: flex;
align-items: center;
flex: 1;
min-width: 0;
}
.icon-bg {
display: flex;
align-items: center;
justify-content: center;
width: 72px;
height: 72px;
margin-right: 20px;
border-radius: 50%;
&.purple {
background: #F0E6FF;
}
&.orange {
background: #FFF0E6;
}
.control-icon-img {
width: 36px;
height: 36px;
}
}
.control-info {
display: flex;
flex-direction: column;
min-width: 0;
}
.control-name {
margin-bottom: 6px;
font-size: 32px;
font-weight: 600;
color: #1A1A1A;
}
.control-detail {
font-size: 26px;
font-weight: 500;
color: #FF8C42;
}
.control-link {
flex-shrink: 0;
margin-left: 16px;
font-size: 26px;
font-weight: 700;
color: #FF8C42;
}
.divider {
height: 1px;
margin: 0 24px;
background: #F0F0F0;
}
.volume-header {
display: flex;
align-items: center;
margin-bottom: 16px;
.control-left {
flex: 1;
}
}
.quick-sleep-header {
display: flex;
align-items: center;
margin-bottom: 18px;
}
.quick-sleep-actions {
display: flex;
gap: 16px;
}
.quick-sleep-btn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
height: 82px;
border-radius: 18px;
&.sleep {
background: #1F2937;
}
&.wake {
background: #FF8C42;
}
&.disabled {
opacity: 0.65;
}
}
.quick-sleep-btn-text {
font-size: 28px;
font-weight: 700;
color: #FFFFFF;
}
.alarm-card {
margin: 0 24px 24px;
border-radius: 20px;
background: #FFFFFF;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
overflow: hidden;
}
.alarm-header {
padding: 24px 24px 18px;
background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 100%);
}
.alarm-title {
display: block;
font-size: 30px;
font-weight: 700;
color: #9F1239;
}
.alarm-subtitle {
display: block;
margin-top: 8px;
font-size: 24px;
line-height: 1.6;
color: #BE123C;
}
.alarm-body {
padding: 6px 24px 10px;
}
.alarm-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 0;
border-bottom: 1px solid #F7E4E8;
&:last-child {
border-bottom: none;
}
}
.alarm-row-vertical {
align-items: flex-start;
gap: 20px;
}
.alarm-label {
font-size: 28px;
color: #666666;
}
.alarm-value {
max-width: 60%;
font-size: 28px;
text-align: right;
word-break: break-all;
color: #1A1A1A;
}
.alarm-location-value {
flex: 1;
min-width: 0;
text-align: right;
}
.alarm-location-main {
display: block;
font-size: 28px;
line-height: 1.5;
word-break: break-all;
color: #1A1A1A;
}
.alarm-location-hint {
display: block;
margin-top: 6px;
font-size: 22px;
line-height: 1.5;
color: #9CA3AF;
}
.alarm-empty {
padding: 24px;
}
.alarm-empty-text {
font-size: 26px;
line-height: 1.7;
color: #666666;
}
.alarm-history {
padding: 0 24px 20px;
border-top: 1px solid #F7E4E8;
}
.alarm-history-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 22px 0 18px;
}
.alarm-history-title {
font-size: 28px;
font-weight: 700;
color: #1A1A1A;
}
.alarm-history-count {
font-size: 24px;
color: #9CA3AF;
}
.alarm-history-item {
padding: 18px 0;
border-top: 1px solid #F5F5F5;
&:first-of-type {
border-top: none;
}
}
.alarm-history-main {
display: flex;
align-items: center;
justify-content: space-between;
gap: 24px;
}
.alarm-history-time {
flex: 1;
min-width: 0;
font-size: 26px;
font-weight: 600;
color: #1F2937;
}
.alarm-history-type {
flex-shrink: 0;
font-size: 24px;
font-weight: 600;
color: #BE123C;
}
.alarm-history-meta {
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
margin-top: 10px;
}
.alarm-history-child,
.alarm-history-device {
flex: 1;
min-width: 0;
font-size: 24px;
color: #6B7280;
word-break: break-all;
}
.alarm-history-device {
text-align: right;
}
.alarm-history-location,
.alarm-history-location-hint {
display: block;
margin-top: 8px;
font-size: 24px;
line-height: 1.5;
color: #4B5563;
word-break: break-all;
}
.alarm-history-location-hint {
margin-top: 4px;
font-size: 22px;
color: #9CA3AF;
}
.alarm-history-empty {
padding: 8px 0 4px;
}
.alarm-history-empty-text {
font-size: 24px;
color: #9CA3AF;
}
.volume-slider {
display: flex;
align-items: center;
padding: 0 8px;
.volume-icon {
flex-shrink: 0;
width: 24px;
height: 24px;
}
.slider {
flex: 1;
margin: 0 16px;
}
}
.fold-card {
overflow: hidden;
margin: 0 24px 24px;
border-radius: 20px;
background: #FFFFFF;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.fold-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 24px;
}
.fold-heading {
flex: 1;
min-width: 0;
margin-right: 20px;
}
.fold-title {
display: block;
font-size: 30px;
font-weight: 700;
color: #1A1A1A;
}
.fold-subtitle {
display: block;
margin-top: 8px;
font-size: 24px;
color: #666666;
word-break: break-all;
}
.fold-action {
display: flex;
align-items: center;
justify-content: center;
min-width: 88px;
height: 56px;
padding: 0 20px;
border-radius: 999px;
background: #FEF3E8;
font-size: 24px;
font-weight: 600;
color: #FF8C42;
}
.detail-body {
padding: 0 24px 10px;
}
.detail-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px 0;
border-bottom: 1px solid #F3F3F3;
&:last-child {
border-bottom: none;
}
}
.detail-label {
font-size: 28px;
color: #666666;
}
.detail-value {
max-width: 60%;
font-size: 28px;
text-align: right;
word-break: break-all;
color: #1A1A1A;
}
.loading {
display: flex;
align-items: center;
justify-content: center;
min-height: 100%;
text {
font-size: 32px;
color: #999999;
}
}
.empty-card {
margin: 0 24px;
padding: 48px 32px;
border-radius: 24px;
background: #FFFFFF;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
text-align: center;
}
.empty-robot {
display: flex;
align-items: center;
justify-content: center;
width: 132px;
height: 132px;
margin: 0 auto 24px;
border-radius: 50%;
background: #FEF3E8;
.robot-img {
width: 68px;
height: 68px;
}
}
.empty-title {
display: block;
font-size: 34px;
font-weight: 700;
color: #1A1A1A;
}
.empty-subtitle {
display: block;
margin-top: 16px;
font-size: 26px;
line-height: 1.6;
color: #666666;
}
.empty-btn {
display: flex;
align-items: center;
justify-content: center;
height: 92px;
margin-top: 28px;
border-radius: 16px;
background: #FF8C42;
}
.empty-btn-text {
font-size: 30px;
font-weight: 600;
color: #FFFFFF;
}
.child-focus-card {
display: flex;
align-items: center;
margin: 0 24px 24px;
padding: 28px 24px;
border-radius: 24px;
background: #FFFFFF;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.child-focus-avatar {
display: flex;
align-items: center;
justify-content: center;
width: 96px;
height: 96px;
margin-right: 20px;
border-radius: 50%;
background: #FEF3E8;
}
.child-focus-icon {
font-size: 40px;
}
.child-focus-info {
flex: 1;
}
.child-focus-name {
display: block;
font-size: 32px;
font-weight: 700;
color: #1A1A1A;
}
.child-focus-desc {
display: block;
margin-top: 8px;
font-size: 26px;
color: #666666;
}