feat: extract theme tokens and reusable ui components
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
min-height: 100vh;
|
||||
padding: calc(var(--top-safe-height, 0px) + 24rpx) 24rpx 156rpx;
|
||||
box-sizing: border-box;
|
||||
background: linear-gradient(180deg, #1e2432 0%, #191f2c 100%);
|
||||
background: linear-gradient(180deg, var(--color-bg-page-gradient-start) 0%, var(--color-bg-page-gradient-end) 100%);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@@ -34,33 +34,37 @@
|
||||
.device-header {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
padding-right: calc(var(--menu-safe-width, 0px) + 12rpx);
|
||||
margin-bottom: 26rpx;
|
||||
margin-bottom: 8rpx;
|
||||
min-height: calc((var(--menu-top, 0px) - var(--top-safe-height, 0px) - 24rpx) + var(--menu-height, 32px) + 36rpx + 6rpx);
|
||||
}
|
||||
|
||||
.device-header__login {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: calc(var(--menu-top, 0px) - var(--top-safe-height, 0px) - 24rpx);
|
||||
min-width: 92rpx;
|
||||
height: 48rpx;
|
||||
height: var(--menu-height, 32px);
|
||||
padding: 0 24rpx;
|
||||
border-radius: 999rpx;
|
||||
background: linear-gradient(90deg, #35e5b3 0%, #20c9bf 100%);
|
||||
color: #ffffff;
|
||||
background: linear-gradient(90deg, var(--color-brand-start) 0%, var(--color-brand-end) 100%);
|
||||
color: var(--color-text-white);
|
||||
font-size: 22rpx;
|
||||
line-height: 48rpx;
|
||||
line-height: var(--menu-height, 32px);
|
||||
text-align: center;
|
||||
box-shadow: 0 12rpx 24rpx rgba(32, 214, 181, 0.22);
|
||||
box-shadow: 0 12rpx 24rpx var(--color-brand-shadow);
|
||||
}
|
||||
|
||||
.device-header__add {
|
||||
position: absolute;
|
||||
right: calc(var(--menu-safe-width, 0px) + 2rpx);
|
||||
top: calc((var(--menu-top, 0px) - var(--top-safe-height, 0px) - 24rpx) + var(--menu-height, 32px) + 6rpx);
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin-top: 28rpx;
|
||||
border: 2rpx solid rgba(255, 255, 255, 0.86);
|
||||
border: 2rpx solid var(--color-border-strong);
|
||||
border-radius: 50%;
|
||||
color: #ffffff;
|
||||
color: var(--color-text-white);
|
||||
font-size: 30rpx;
|
||||
line-height: 30rpx;
|
||||
text-align: center;
|
||||
@@ -72,7 +76,9 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 22rpx;
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
margin-bottom: 18rpx;
|
||||
}
|
||||
|
||||
.device-summary__title-wrap {
|
||||
@@ -82,108 +88,29 @@
|
||||
}
|
||||
|
||||
.device-summary__title {
|
||||
color: #f3f7ff;
|
||||
color: var(--color-text-title);
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.device-summary__count {
|
||||
color: #ff964f;
|
||||
color: var(--color-text-highlight);
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.device-summary__arrow {
|
||||
color: #8a93a7;
|
||||
color: var(--color-text-muted);
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.device-actions-card {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
border-radius: 24rpx;
|
||||
background: rgba(42, 48, 66, 0.96);
|
||||
box-shadow: inset 0 0 0 2rpx rgba(255, 255, 255, 0.03);
|
||||
}
|
||||
|
||||
.device-actions-card {
|
||||
padding: 34rpx 30rpx;
|
||||
}
|
||||
|
||||
.device-action {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 74rpx;
|
||||
border-radius: 999rpx;
|
||||
background: linear-gradient(90deg, #39e6ad 0%, #1fc9c1 100%);
|
||||
box-shadow: 0 14rpx 26rpx rgba(20, 184, 166, 0.18);
|
||||
}
|
||||
|
||||
.device-action--secondary {
|
||||
margin-top: 34rpx;
|
||||
}
|
||||
|
||||
.device-action__icon {
|
||||
position: relative;
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.device-action__icon::before,
|
||||
.device-action__icon::after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.device-action__icon--scan::before {
|
||||
inset: 4rpx;
|
||||
border: 2rpx solid #ffffff;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.device-action__icon--scan::after {
|
||||
left: 8rpx;
|
||||
right: 8rpx;
|
||||
top: 15rpx;
|
||||
height: 2rpx;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.device-action__icon--bluetooth::before {
|
||||
left: 14rpx;
|
||||
top: 2rpx;
|
||||
width: 2rpx;
|
||||
height: 28rpx;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.device-action__icon--bluetooth::after {
|
||||
left: 8rpx;
|
||||
top: 6rpx;
|
||||
width: 14rpx;
|
||||
height: 14rpx;
|
||||
border-top: 2rpx solid #ffffff;
|
||||
border-right: 2rpx solid #ffffff;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.device-action__label {
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.device-notice-card {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-top: 22rpx;
|
||||
padding: 22rpx 24rpx 24rpx;
|
||||
border-radius: 22rpx;
|
||||
background: #fbefc7;
|
||||
box-shadow: 0 12rpx 24rpx rgba(6, 10, 22, 0.14);
|
||||
}
|
||||
|
||||
.device-notice-card__title-row {
|
||||
@@ -198,7 +125,7 @@
|
||||
height: 16rpx;
|
||||
margin-right: 12rpx;
|
||||
border-radius: 4rpx;
|
||||
background: #ff9d57;
|
||||
background: var(--color-warning-main);
|
||||
}
|
||||
|
||||
.device-notice-card__horn::before,
|
||||
@@ -214,7 +141,7 @@
|
||||
height: 0;
|
||||
border-top: 6rpx solid transparent;
|
||||
border-bottom: 6rpx solid transparent;
|
||||
border-left: 8rpx solid #ff9d57;
|
||||
border-left: 8rpx solid var(--color-warning-main);
|
||||
}
|
||||
|
||||
.device-notice-card__horn::after {
|
||||
@@ -222,14 +149,14 @@
|
||||
top: 2rpx;
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-top: 2rpx solid #ff9d57;
|
||||
border-right: 2rpx solid #ff9d57;
|
||||
border-top: 2rpx solid var(--color-warning-main);
|
||||
border-right: 2rpx solid var(--color-warning-main);
|
||||
border-radius: 0 8rpx 0 0;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.device-notice-card__title {
|
||||
color: #af7e42;
|
||||
color: var(--color-text-warning);
|
||||
font-size: 22rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
@@ -241,94 +168,7 @@
|
||||
}
|
||||
|
||||
.device-notice-card__item {
|
||||
color: #9f7a4c;
|
||||
color: var(--color-text-warning-secondary);
|
||||
font-size: 22rpx;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.device-tabbar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 5;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-around;
|
||||
padding: 16rpx 24rpx calc(20rpx + env(safe-area-inset-bottom));
|
||||
background: rgba(30, 35, 48, 0.98);
|
||||
box-shadow: 0 -8rpx 24rpx rgba(4, 8, 20, 0.34);
|
||||
}
|
||||
|
||||
.device-tabbar__item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
min-width: 88rpx;
|
||||
}
|
||||
|
||||
.device-tabbar__icon {
|
||||
position: relative;
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
margin-bottom: 8rpx;
|
||||
border-radius: 10rpx;
|
||||
border: 2rpx solid #8f97a9;
|
||||
opacity: 0.86;
|
||||
}
|
||||
|
||||
.device-tabbar__icon::before,
|
||||
.device-tabbar__icon::after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.device-tabbar__icon::before {
|
||||
left: 8rpx;
|
||||
right: 8rpx;
|
||||
top: 10rpx;
|
||||
height: 2rpx;
|
||||
background: currentColor;
|
||||
color: #8f97a9;
|
||||
}
|
||||
|
||||
.device-tabbar__icon::after {
|
||||
left: 8rpx;
|
||||
right: 8rpx;
|
||||
bottom: 10rpx;
|
||||
height: 2rpx;
|
||||
background: currentColor;
|
||||
color: #8f97a9;
|
||||
}
|
||||
|
||||
.device-tabbar__icon--active {
|
||||
border-color: #36e4aa;
|
||||
background: rgba(54, 228, 170, 0.12);
|
||||
}
|
||||
|
||||
.device-tabbar__icon--active::before,
|
||||
.device-tabbar__icon--active::after {
|
||||
color: #36e4aa;
|
||||
}
|
||||
|
||||
.device-tabbar__badge {
|
||||
position: absolute;
|
||||
top: -4rpx;
|
||||
right: -4rpx;
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 50%;
|
||||
background: #ff4d4f;
|
||||
box-shadow: 0 0 0 4rpx rgba(30, 35, 48, 0.98);
|
||||
}
|
||||
|
||||
.device-tabbar__label {
|
||||
color: #b0b6c4;
|
||||
font-size: 20rpx;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.device-tabbar__label--active {
|
||||
color: #36e4aa;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user