feat(前端): 实现Seed抓取的异步交互与提示功能
- 将链接按钮改为带加载状态的交互按钮 - 添加异步请求逻辑,包含防抖和加载指示 - 实现三种状态的Toast提示(成功/无新增/错误) - 添加相关CSS样式和交互逻辑
This commit is contained in:
@@ -609,3 +609,43 @@ html, body {
|
||||
padding: 12px 16px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Toast (Bottom Right, Non-modal) */
|
||||
.toast-br {
|
||||
position: fixed;
|
||||
bottom: 24px;
|
||||
right: 24px;
|
||||
transform: translateY(0);
|
||||
background: rgba(0,0,0,0.8);
|
||||
color: #fff;
|
||||
padding: 10px 16px;
|
||||
border-radius: 20px;
|
||||
font-size: 13px;
|
||||
box-shadow: var(--shadow-md);
|
||||
opacity: 0;
|
||||
transition: all 0.3s ease;
|
||||
pointer-events: none;
|
||||
z-index: 2000;
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
.toast-br.show {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Button inner loading spinner (shown when .btn has .is-loading) */
|
||||
.btn-spinner {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 2px solid var(--border);
|
||||
border-top-color: var(--accent);
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
display: none;
|
||||
}
|
||||
.btn.is-loading .btn-spinner {
|
||||
display: inline-block;
|
||||
}
|
||||
.btn.is-loading {
|
||||
opacity: 0.9;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user