feat: add notifications and environment settings pages

This commit is contained in:
shenghuo2
2025-06-21 10:38:04 +08:00
parent b99f4810b5
commit ccb4cf909f
6 changed files with 1070 additions and 3 deletions

View File

@ -0,0 +1,286 @@
#notifications-page {
background-color: #f5f5f5;
min-height: 100vh;
padding-bottom: 20px;
}
/* 页面头部 */
.page-header {
background: #f6f6f6;
color: rgb(43, 42, 42);
padding: 15px 0;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.header-content {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
max-width: 1200px;
margin: 0 auto;
}
.back-btn, .settings-btn {
background: none;
border: none;
color: rgb(0, 0, 0);
font-size: 18px;
padding: 8px;
border-radius: 50%;
cursor: pointer;
transition: background-color 0.3s ease;
}
.back-btn:hover, .settings-btn:hover {
background-color: rgba(255, 255, 255, 0.1);
}
.page-title {
font-size: 18px;
font-weight: 600;
margin: 0;
}
/* 设置说明 */
.settings-description {
background: white;
margin: 20px;
border-radius: 12px;
padding: 15px 20px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.settings-description p {
margin: 0;
font-size: 14px;
color: #666;
line-height: 1.5;
}
/* 设置列表 */
.settings-list {
margin: 0 20px;
}
.room-section {
background: white;
border-radius: 12px;
margin-bottom: 20px;
overflow: hidden;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.room-title {
background: #f8f9fa;
margin: 0;
padding: 15px 20px;
font-size: 16px;
font-weight: 600;
color: #333;
border-bottom: 1px solid #eee;
}
.device-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
border-bottom: 1px solid #f0f0f0;
transition: background-color 0.3s ease;
}
.device-item:last-child {
border-bottom: none;
}
.device-item:hover {
background-color: #f8f9fa;
}
.device-info {
display: flex;
align-items: center;
gap: 15px;
flex: 1;
}
.device-icon {
width: 40px;
height: 40px;
border-radius: 50%;
background: linear-gradient(135deg, #ff6900, #ff8533);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 16px;
box-shadow: 0 2px 8px rgba(255, 105, 0, 0.3);
}
.device-details h4 {
margin: 0 0 4px 0;
font-size: 14px;
font-weight: 500;
color: #333;
line-height: 1.3;
}
.device-location {
margin: 0;
font-size: 12px;
color: #999;
}
.device-value {
display: flex;
align-items: center;
gap: 15px;
}
.value-number {
font-size: 16px;
font-weight: 600;
color: #ff6900;
min-width: 30px;
text-align: right;
}
/* 开关样式 */
.toggle-switch {
position: relative;
display: inline-block;
width: 44px;
height: 24px;
}
.toggle-switch input {
opacity: 0;
width: 0;
height: 0;
}
.toggle-switch label {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
border-radius: 24px;
transition: 0.3s;
}
.toggle-switch label:before {
position: absolute;
content: "";
height: 18px;
width: 18px;
left: 3px;
bottom: 3px;
background-color: white;
border-radius: 50%;
transition: 0.3s;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.toggle-switch input:checked + label {
background-color: #ff6900;
}
.toggle-switch input:checked + label:before {
transform: translateX(20px);
}
.toggle-switch input:focus + label {
box-shadow: 0 0 1px #ff6900;
}
/* 响应式设计 */
@media (max-width: 768px) {
.header-content {
padding: 0 15px;
}
.settings-description,
.settings-list {
margin-left: 15px;
margin-right: 15px;
}
.device-item {
padding: 14px 16px;
}
.device-icon {
width: 36px;
height: 36px;
font-size: 14px;
}
}
@media (max-width: 480px) {
.page-header {
padding: 12px 0;
}
.header-content {
padding: 0 12px;
}
.settings-description,
.settings-list {
margin-left: 12px;
margin-right: 12px;
}
.device-item {
padding: 12px 14px;
gap: 12px;
}
.room-title {
padding: 12px 16px;
font-size: 15px;
}
}
/* 动画效果 */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.settings-description,
.room-section {
animation: fadeInUp 0.6s ease-out;
}
.room-section:nth-child(1) {
animation-delay: 0.1s;
}
.room-section:nth-child(2) {
animation-delay: 0.2s;
}
.room-section:nth-child(3) {
animation-delay: 0.3s;
}
.room-section:nth-child(4) {
animation-delay: 0.4s;
}
.room-section:nth-child(5) {
animation-delay: 0.5s;
}