otp/pages/index/index.wxss
“xHuPo” 2b8870a40e init
2025-06-09 13:35:15 +08:00

301 lines
No EOL
4.3 KiB
Text

/**index.wxss**/
.container {
padding: 20rpx;
box-sizing: border-box;
min-height: 100vh;
background: #f8f9fa;
}
.container.is-loading {
overflow: hidden;
}
/* 加载状态 */
.loading-container {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.9);
display: flex;
align-items: center;
justify-content: center;
z-index: 999;
}
.loading {
width: 100%;
text-align: center;
padding: 40rpx 0;
color: #666;
}
/* 错误提示 */
.error-message {
width: 100%;
padding: 20rpx;
background-color: #ffebee;
color: #c62828;
text-align: center;
margin-bottom: 20rpx;
border-radius: 8rpx;
font-size: 28rpx;
}
/* 滚动视图 */
.scroll-view {
width: 100%;
height: calc(100vh - 40rpx);
}
/* 空状态 */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 120rpx 40rpx;
text-align: center;
}
.empty-icon {
font-size: 80rpx;
margin-bottom: 20rpx;
}
.empty-title {
font-size: 36rpx;
color: #333;
margin-bottom: 12rpx;
font-weight: 500;
}
.empty-desc {
font-size: 28rpx;
color: #999;
}
/* 令牌列表 */
.token-list {
width: 100%;
padding-bottom: 180rpx;
}
.token-item {
background: #fff;
border-radius: 12rpx;
padding: 24rpx;
margin-bottom: 20rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
position: relative;
transition: all 0.3s ease;
}
.token-item.warn {
background: #fff8f8;
}
.token-content {
width: 100%;
}
/* 令牌头部 */
.token-header {
display: flex;
align-items: center;
margin-bottom: 16rpx;
}
.token-type {
font-size: 24rpx;
padding: 4rpx 12rpx;
border-radius: 4rpx;
margin-right: 12rpx;
}
.token-type.totp {
background: #e3f2fd;
color: #1976d2;
}
.token-type.hotp {
background: #f3e5f5;
color: #7b1fa2;
}
.token-issuer {
font-size: 32rpx;
color: #333;
font-weight: 500;
}
/* 令牌主体 */
.token-body {
width: 100%;
}
.code-container {
display: flex;
align-items: center;
justify-content: space-between;
margin: 20rpx 0;
}
.code {
font-size: 48rpx;
font-family: monospace;
color: #007AFF;
font-weight: bold;
letter-spacing: 2rpx;
}
.code-actions {
display: flex;
align-items: center;
}
/* HOTP刷新按钮 */
.refresh-btn {
width: 64rpx;
height: 64rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 12rpx;
opacity: 0.6;
transition: all 0.3s ease;
}
.refresh-btn.refreshing {
opacity: 0.3;
pointer-events: none;
}
.refresh-icon {
font-size: 36rpx;
}
.refresh-icon.spin {
animation: spin 1s linear infinite;
}
/* 编辑按钮 */
.edit-btn {
width: 64rpx;
height: 64rpx;
display: flex;
align-items: center;
justify-content: center;
opacity: 0.6;
}
.edit-icon {
font-size: 32rpx;
}
/* 删除按钮 */
.delete-btn {
width: 64rpx;
height: 64rpx;
display: flex;
align-items: center;
justify-content: center;
opacity: 0.6;
margin-left: 12rpx;
}
.delete-icon {
font-size: 32rpx;
color: #ff4d4f;
}
.delete-btn.button-hover {
opacity: 0.8;
}
/* TOTP进度条 */
.totp-info {
margin-top: 16rpx;
}
.remaining-time {
font-size: 24rpx;
color: #666;
margin-bottom: 8rpx;
}
.progress-bar {
width: 100%;
height: 4rpx;
background: #e0e0e0;
border-radius: 2rpx;
overflow: hidden;
}
.progress-bar .progress {
height: 100%;
background: #4caf50;
transition: width 1s linear;
}
.progress-bar.warn .progress {
background: #f44336;
}
/* HOTP计数器信息 */
.counter-info {
margin-top: 16rpx;
font-size: 24rpx;
color: #666;
}
.counter-info .hint {
margin-left: 12rpx;
color: #999;
}
/* 添加按钮 */
.add-button {
position: fixed;
bottom: 40rpx;
left: 50%;
transform: translateX(-50%);
background: #007AFF;
border-radius: 40rpx;
padding: 20rpx 32rpx;
display: flex;
align-items: center;
box-shadow: 0 4rpx 12rpx rgba(0, 122, 255, 0.3);
transition: all 0.3s ease;
}
.add-icon {
color: white;
font-size: 40rpx;
margin-right: 8rpx;
}
.add-text {
color: white;
font-size: 28rpx;
}
/* 广告容器 */
.ad-container {
width: 100%;
margin-top: 20rpx;
margin-bottom: 20rpx;
}
/* 动画 */
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
/* 按钮点击效果 */
.button-hover {
opacity: 0.7;
transform: scale(0.98);
}