refactor: 清理冗余样式,优化组件结构和响应式设计
This commit is contained in:
@@ -638,12 +638,6 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.user-edit-container {
|
|
||||||
padding: 32px;
|
|
||||||
min-height: 100vh;
|
|
||||||
background: var(--ant-color-bg-layout);
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-edit-header {
|
.user-edit-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -660,23 +654,6 @@ onMounted(() => {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-title h1 {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 32px;
|
|
||||||
font-weight: 700;
|
|
||||||
color: var(--ant-color-text);
|
|
||||||
background: linear-gradient(135deg, var(--ant-color-primary), var(--ant-color-primary-hover));
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
-webkit-text-fill-color: transparent;
|
|
||||||
background-clip: text;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subtitle {
|
|
||||||
margin: 4px 0 0 0;
|
|
||||||
font-size: 16px;
|
|
||||||
color: var(--ant-color-text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-edit-content {
|
.user-edit-content {
|
||||||
max-width: 1200px;
|
max-width: 1200px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
@@ -727,7 +704,6 @@ onMounted(() => {
|
|||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 表单标签 */
|
|
||||||
.form-label {
|
.form-label {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -765,40 +741,12 @@ onMounted(() => {
|
|||||||
box-shadow: 0 0 0 4px rgba(24, 144, 255, 0.1);
|
box-shadow: 0 0 0 4px rgba(24, 144, 255, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-card {
|
.switch-description {
|
||||||
margin-bottom: 24px;
|
|
||||||
border-radius: 12px;
|
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-card :deep(.ant-card-head) {
|
|
||||||
border-bottom: 2px solid var(--ant-color-border-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-card :deep(.ant-card-head-title) {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--ant-color-text);
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-form :deep(.ant-form-item-label > label) {
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--ant-color-text);
|
|
||||||
}
|
|
||||||
|
|
||||||
.switch-description,
|
|
||||||
.task-description {
|
|
||||||
margin-left: 12px;
|
margin-left: 12px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: var(--ant-color-text-secondary);
|
color: var(--ant-color-text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-description {
|
|
||||||
display: block;
|
|
||||||
margin-top: 4px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cancel-button {
|
.cancel-button {
|
||||||
border: 1px solid var(--ant-color-border);
|
border: 1px solid var(--ant-color-border);
|
||||||
background: var(--ant-color-bg-container);
|
background: var(--ant-color-bg-container);
|
||||||
@@ -820,53 +768,11 @@ onMounted(() => {
|
|||||||
border-color: var(--ant-color-primary-hover);
|
border-color: var(--ant-color-primary-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 表单标签样式 */
|
|
||||||
.form-label {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 6px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--ant-color-text);
|
|
||||||
}
|
|
||||||
|
|
||||||
.help-icon {
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--ant-color-text-tertiary);
|
|
||||||
cursor: help;
|
|
||||||
transition: color 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.help-icon:hover {
|
|
||||||
color: var(--ant-color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 响应式设计 */
|
|
||||||
@media (max-width: 768px) {
|
|
||||||
.user-edit-container {
|
|
||||||
padding: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-edit-header {
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 16px;
|
|
||||||
align-items: stretch;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-title h1 {
|
|
||||||
font-size: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-edit-content {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.float-button {
|
.float-button {
|
||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 路径输入组样式 */
|
|
||||||
.path-input-group {
|
.path-input-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
@@ -909,12 +815,18 @@ onMounted(() => {
|
|||||||
.path-button:hover {
|
.path-button:hover {
|
||||||
background: var(--ant-color-primary);
|
background: var(--ant-color-primary);
|
||||||
color: white;
|
color: white;
|
||||||
transform: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.path-button:disabled {
|
/* 响应式设计 */
|
||||||
background: var(--ant-color-bg-container);
|
@media (max-width: 768px) {
|
||||||
color: var(--ant-color-text-tertiary);
|
.user-edit-header {
|
||||||
cursor: not-allowed;
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-edit-content {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -510,20 +510,15 @@ onMounted(() => {
|
|||||||
min-width: 120px;
|
min-width: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-card {
|
.activity-card,
|
||||||
|
.resource-card,
|
||||||
|
.proxy-card {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.resource-card {
|
.activity-card :deep(.ant-card-head-title),
|
||||||
margin-bottom: 24px;
|
.resource-card :deep(.ant-card-head-title),
|
||||||
}
|
.proxy-card :deep(.ant-card-head-title) {
|
||||||
|
|
||||||
.activity-card :deep(.ant-card-head-title) {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.resource-card :deep(.ant-card-head-title) {
|
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
@@ -534,7 +529,8 @@ onMounted(() => {
|
|||||||
gap: 16px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.resource-item {
|
.resource-item,
|
||||||
|
.activity-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
@@ -544,7 +540,8 @@ onMounted(() => {
|
|||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.resource-item:hover {
|
.resource-item:hover,
|
||||||
|
.activity-item:hover {
|
||||||
border-color: var(--ant-color-primary);
|
border-color: var(--ant-color-primary);
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
@@ -606,10 +603,6 @@ onMounted(() => {
|
|||||||
color: var(--ant-color-text);
|
color: var(--ant-color-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-tip {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.time-icon {
|
.time-icon {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: var(--ant-color-text-secondary);
|
color: var(--ant-color-text-secondary);
|
||||||
@@ -625,32 +618,12 @@ onMounted(() => {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time-value.remaining {
|
|
||||||
color: var(--ant-color-warning);
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.activity-list {
|
.activity-list {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(4, 1fr);
|
grid-template-columns: repeat(4, 1fr);
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 16px;
|
|
||||||
background: var(--ant-color-bg-container);
|
|
||||||
border: 1px solid var(--ant-color-border);
|
|
||||||
border-radius: 8px;
|
|
||||||
transition: all 0.2s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.activity-item:hover {
|
|
||||||
border-color: var(--ant-color-primary);
|
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.stage-info {
|
.stage-info {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
@@ -665,11 +638,6 @@ onMounted(() => {
|
|||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stage-value {
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--ant-color-text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.drop-info {
|
.drop-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -684,7 +652,6 @@ onMounted(() => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
@@ -695,11 +662,6 @@ onMounted(() => {
|
|||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
.desc-icon {
|
|
||||||
font-size: 24px;
|
|
||||||
color: var(--ant-color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.drop-details {
|
.drop-details {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
@@ -713,57 +675,17 @@ onMounted(() => {
|
|||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drop-id {
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--ant-color-text-tertiary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.empty-state {
|
.empty-state {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 40px 0;
|
padding: 40px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1500px) {
|
.proxy-list .proxy-item {
|
||||||
.activity-list,
|
|
||||||
.resource-list {
|
|
||||||
grid-template-columns: repeat(4, 1fr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1200px) {
|
|
||||||
.activity-list,
|
|
||||||
.resource-list {
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 代理状态样式 */
|
|
||||||
.proxy-card {
|
|
||||||
margin-bottom: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.proxy-card :deep(.ant-card-head-title) {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.proxy-list {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.proxy-item {
|
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
background: var(--ant-color-bg-container);
|
background: var(--ant-color-bg-container);
|
||||||
border: 1px solid var(--ant-color-border);
|
border: 1px solid var(--ant-color-border);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
transition: all 0.2s ease;
|
margin-bottom: 16px;
|
||||||
}
|
|
||||||
|
|
||||||
.proxy-item:hover {
|
|
||||||
border-color: var(--ant-color-primary);
|
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.proxy-header {
|
.proxy-header {
|
||||||
@@ -780,91 +702,60 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.user-icon {
|
.user-icon {
|
||||||
font-size: 16px;
|
color: var(--ant-color-text-secondary);
|
||||||
color: var(--ant-color-primary);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.username {
|
.username {
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--ant-color-text);
|
color: var(--ant-color-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.proxy-status {
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.proxy-stats {
|
.proxy-stats {
|
||||||
display: flex;
|
display: grid;
|
||||||
flex-wrap: wrap;
|
grid-template-columns: 1fr;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-item {
|
|
||||||
flex: 1;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-item.full-width {
|
.stat-item.full-width {
|
||||||
flex: 0 0 100%;
|
grid-column: 1 / -1;
|
||||||
/* 占满整行 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-item.half-width {
|
.stat-item.half-width {
|
||||||
flex: 0 0 calc(50% - 8px);
|
display: inline-block;
|
||||||
/* 每个占一半宽度,减去间距 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat-item {
|
.proxy-stats .stat-item.half-width:nth-child(2),
|
||||||
flex: 1;
|
.proxy-stats .stat-item.half-width:nth-child(3) {
|
||||||
min-width: 0;
|
display: inline-grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 小屏时自动折行成两列或一列 */
|
/* 响应式设计 */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 1500px) {
|
||||||
.proxy-stats {
|
.activity-list,
|
||||||
flex-wrap: wrap;
|
.resource-list {
|
||||||
|
grid-template-columns: repeat(4, 1fr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.stat-item {
|
@media (max-width: 1200px) {
|
||||||
flex: 1 1 100%;
|
.activity-list,
|
||||||
|
.resource-list {
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.page-container {
|
.header {
|
||||||
padding: 16px;
|
flex-direction: column;
|
||||||
|
gap: 16px;
|
||||||
|
align-items: stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity-list,
|
.activity-list,
|
||||||
.resource-list {
|
.resource-list {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: repeat(2, 1fr);
|
||||||
}
|
|
||||||
|
|
||||||
.activity-item,
|
|
||||||
.resource-item {
|
|
||||||
padding: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drop-image {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.proxy-item {
|
|
||||||
padding: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.proxy-header {
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: flex-start;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.proxy-stats :deep(.ant-col) {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -20,21 +20,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue'
|
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { ArrowLeftOutlined } from '@ant-design/icons-vue'
|
import { ArrowLeftOutlined } from '@ant-design/icons-vue'
|
||||||
import LogViewer from '@/components/LogViewer.vue'
|
import LogViewer from '@/components/LogViewer.vue'
|
||||||
import { useTheme } from '@/composables/useTheme'
|
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { isDark } = useTheme()
|
|
||||||
|
|
||||||
const textColor = computed(() =>
|
|
||||||
isDark.value ? 'rgba(255, 255, 255, 0.88)' : 'rgba(0, 0, 0, 0.88)'
|
|
||||||
)
|
|
||||||
const textSecondaryColor = computed(() =>
|
|
||||||
isDark.value ? 'rgba(255, 255, 255, 0.65)' : 'rgba(0, 0, 0, 0.65)'
|
|
||||||
)
|
|
||||||
|
|
||||||
const goBack = () => {
|
const goBack = () => {
|
||||||
router.push('/settings')
|
router.push('/settings')
|
||||||
@@ -66,12 +56,12 @@ const goBack = () => {
|
|||||||
margin: 0 0 8px 0;
|
margin: 0 0 8px 0;
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: v-bind(textColor);
|
color: var(--ant-color-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.logs-description {
|
.logs-description {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: v-bind(textSecondaryColor);
|
color: var(--ant-color-text-secondary);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -239,7 +239,6 @@ onMounted(() => {
|
|||||||
|
|
||||||
.title-section {
|
.title-section {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.test-header h2 {
|
.test-header h2 {
|
||||||
|
|||||||
@@ -641,10 +641,6 @@ const handleToggleUserStatus = async (user: User) => {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link {
|
|
||||||
margin-left: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.empty-state {
|
.empty-state {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 40px 20px;
|
padding: 40px 20px;
|
||||||
@@ -654,11 +650,6 @@ const handleToggleUserStatus = async (user: User) => {
|
|||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-image {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.empty-title {
|
.empty-title {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@@ -667,39 +658,55 @@ const handleToggleUserStatus = async (user: User) => {
|
|||||||
|
|
||||||
.empty-description {
|
.empty-description {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: rgba(0, 0, 0, 0.45);
|
color: var(--ant-color-text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-select-modal :deep(.ant-modal-content) {
|
/* 模态框通用样式 */
|
||||||
|
.type-select-modal :deep(.ant-modal-content),
|
||||||
|
.general-mode-modal :deep(.ant-modal-content),
|
||||||
|
.template-select-modal :deep(.ant-modal-content) {
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-select-modal :deep(.ant-modal-header) {
|
.type-select-modal :deep(.ant-modal-header),
|
||||||
|
.general-mode-modal :deep(.ant-modal-header),
|
||||||
|
.template-select_modal :deep(.ant-modal-header) {
|
||||||
border-bottom: 1px solid var(--ant-color-border);
|
border-bottom: 1px solid var(--ant-color-border);
|
||||||
padding: 16px 24px;
|
padding: 16px 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-select-modal :deep(.ant-modal-title) {
|
.type-select-modal :deep(.ant-modal-title),
|
||||||
|
.general-mode_modal :deep(.ant-modal-title),
|
||||||
|
.template-select-modal :deep(.ant-modal-title) {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-select-modal :deep(.ant-modal-body) {
|
.type-select-modal :deep(.ant-modal-body),
|
||||||
|
.general-mode-modal :deep(.ant-modal-body) {
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-selection {
|
.template-select-modal :deep(.ant-modal-body) {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 选择组样式 */
|
||||||
|
.type-selection,
|
||||||
|
.mode-selection {
|
||||||
margin: 16px 0;
|
margin: 16px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-radio-group {
|
.type-radio-group,
|
||||||
|
.mode-radio-group {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-radio-group :deep(.ant-radio-button-wrapper) {
|
.type-radio-group :deep(.ant-radio-button-wrapper),
|
||||||
|
.mode-radio-group :deep(.ant-radio-button-wrapper) {
|
||||||
height: auto;
|
height: auto;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 1px solid var(--ant-color-border);
|
border: 1px solid var(--ant-color-border);
|
||||||
@@ -709,21 +716,25 @@ const handleToggleUserStatus = async (user: User) => {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-radio-group :deep(.ant-radio-button-wrapper:hover) {
|
.type-radio-group :deep(.ant-radio-button-wrapper:hover),
|
||||||
|
.mode-radio-group :deep(.ant-radio-button-wrapper:hover) {
|
||||||
border-color: var(--ant-color-primary);
|
border-color: var(--ant-color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-radio-group :deep(.ant-radio-button-wrapper-checked) {
|
.type-radio-group :deep(.ant-radio-button-wrapper-checked),
|
||||||
|
.mode-radio-group :deep(.ant-radio-button-wrapper-checked) {
|
||||||
border-color: var(--ant-color-primary);
|
border-color: var(--ant-color-primary);
|
||||||
background: var(--ant-color-primary-bg);
|
background: var(--ant-color-primary-bg);
|
||||||
color: var(--ant-color-primary);
|
color: var(--ant-color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-radio-group :deep(.ant-radio-button-wrapper::before) {
|
.type-radio-group :deep(.ant-radio-button-wrapper::before),
|
||||||
|
.mode-radio-group :deep(.ant-radio-button-wrapper::before) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-radio-group :deep(.ant-radio-button-wrapper .ant-radio-button) {
|
.type-radio-group :deep(.ant-radio-button-wrapper .ant-radio-button),
|
||||||
|
.mode-radio-group :deep(.ant-radio-button-wrapper .ant-radio-button) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -735,6 +746,13 @@ const handleToggleUserStatus = async (user: User) => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mode-content {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
padding: 16px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.type-logo-container {
|
.type-logo-container {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -753,98 +771,18 @@ const handleToggleUserStatus = async (user: User) => {
|
|||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-info {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.type-title {
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--ant-color-text);
|
|
||||||
margin-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.type-description {
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--ant-color-text-secondary);
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 通用脚本创建方式选择弹窗样式 */
|
|
||||||
.general-mode-modal :deep(.ant-modal-content) {
|
|
||||||
border-radius: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.general-mode-modal :deep(.ant-modal-header) {
|
|
||||||
border-bottom: 1px solid var(--ant-color-border);
|
|
||||||
padding: 16px 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.general-mode-modal :deep(.ant-modal-title) {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.general-mode-modal :deep(.ant-modal-body) {
|
|
||||||
padding: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mode-selection {
|
|
||||||
margin: 16px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mode-radio-group {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mode-radio-group :deep(.ant-radio-button-wrapper) {
|
|
||||||
height: auto;
|
|
||||||
padding: 0;
|
|
||||||
border: 1px solid var(--ant-color-border);
|
|
||||||
border-radius: 8px;
|
|
||||||
background: var(--ant-color-bg-container);
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mode-radio-group :deep(.ant-radio-button-wrapper:hover) {
|
|
||||||
border-color: var(--ant-color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mode-radio-group :deep(.ant-radio-button-wrapper-checked) {
|
|
||||||
border-color: var(--ant-color-primary);
|
|
||||||
background: var(--ant-color-primary-bg);
|
|
||||||
color: var(--ant-color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mode-radio-group :deep(.ant-radio-button-wrapper::before) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mode-radio-group :deep(.ant-radio-button-wrapper .ant-radio-button) {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mode-content {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
padding: 16px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mode-icon {
|
.mode-icon {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
color: var(--ant-color-primary);
|
color: var(--ant-color-primary);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.type-info,
|
||||||
.mode-info {
|
.mode-info {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.type-title,
|
||||||
.mode-title {
|
.mode-title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -852,118 +790,44 @@ const handleToggleUserStatus = async (user: User) => {
|
|||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.type-description,
|
||||||
.mode-description {
|
.mode-description {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: var(--ant-color-text-secondary);
|
color: var(--ant-color-text-secondary);
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-modal-content {
|
/* 模板选择样式 */
|
||||||
border-radius: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-modal-header {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-modal-title {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-modal-close {
|
|
||||||
color: rgba(0, 0, 0, 0.45);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-modal-close:hover {
|
|
||||||
color: rgba(0, 0, 0, 0.65);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-btn-primary {
|
|
||||||
background: #1890ff;
|
|
||||||
border-color: #1890ff;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-btn-primary:hover {
|
|
||||||
background: #40a9ff;
|
|
||||||
border-color: #40a9ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-btn-primary:focus {
|
|
||||||
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-radio-button-wrapper {
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-radio-button-wrapper:hover {
|
|
||||||
border-color: #1890ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-radio-button-wrapper-checked {
|
|
||||||
background: #1890ff;
|
|
||||||
border-color: #1890ff;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-input {
|
|
||||||
border-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-input:focus {
|
|
||||||
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-spin {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 模板选择弹窗样式 */
|
|
||||||
.template-select-modal :deep(.ant-modal-content) {
|
|
||||||
border-radius: 16px;
|
|
||||||
overflow: hidden;
|
|
||||||
background: var(--ant-color-bg-container);
|
|
||||||
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
|
|
||||||
}
|
|
||||||
|
|
||||||
.template-select-modal :deep(.ant-modal-header) {
|
|
||||||
background: linear-gradient(135deg, var(--ant-color-bg-container), var(--ant-color-primary-bg));
|
|
||||||
border-bottom: 1px solid var(--ant-color-border);
|
|
||||||
padding: 20px 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.template-select-modal :deep(.ant-modal-title) {
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--ant-color-text);
|
|
||||||
}
|
|
||||||
|
|
||||||
.template-select-modal :deep(.ant-modal-body) {
|
|
||||||
padding: 24px;
|
|
||||||
background: var(--ant-color-bg-layout);
|
|
||||||
}
|
|
||||||
|
|
||||||
.template-selection {
|
.template-selection {
|
||||||
margin: 0;
|
min-height: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-templates {
|
||||||
|
text-align: center;
|
||||||
|
padding: 60px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-templates-content {
|
||||||
|
color: var(--ant-color-text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-templates-icon {
|
||||||
|
font-size: 48px;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
color: var(--ant-color-text-tertiary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.templates-container {
|
.templates-container {
|
||||||
background: var(--ant-color-bg-container);
|
height: 600px;
|
||||||
border-radius: 12px;
|
display: flex;
|
||||||
padding: 20px;
|
flex-direction: column;
|
||||||
margin-top: 16px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.templates-header {
|
.templates-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 16px;
|
padding: 24px;
|
||||||
padding-bottom: 12px;
|
|
||||||
border-bottom: 1px solid var(--ant-color-border);
|
border-bottom: 1px solid var(--ant-color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -976,18 +840,14 @@ const handleToggleUserStatus = async (user: User) => {
|
|||||||
.count-badge {
|
.count-badge {
|
||||||
background: var(--ant-color-primary);
|
background: var(--ant-color-primary);
|
||||||
color: white;
|
color: white;
|
||||||
padding: 4px 8px;
|
padding: 2px 8px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
min-width: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.count-text {
|
.count-text {
|
||||||
font-size: 14px;
|
color: var(--ant-color-text-secondary);
|
||||||
font-weight: 500;
|
|
||||||
color: var(--ant-color-text);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-container {
|
.search-container {
|
||||||
@@ -996,77 +856,71 @@ const handleToggleUserStatus = async (user: User) => {
|
|||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.template-search {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.templates-list {
|
.templates-list {
|
||||||
max-height: 400px;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding-right: 8px;
|
padding: 0 24px 24px;
|
||||||
|
/* 隐藏滚动条 */
|
||||||
|
scrollbar-width: none; /* Firefox */
|
||||||
|
-ms-overflow-style: none; /* IE and Edge */
|
||||||
}
|
}
|
||||||
|
|
||||||
.templates-list::-webkit-scrollbar {
|
.templates-list::-webkit-scrollbar {
|
||||||
width: 6px;
|
display: none; /* Chrome, Safari and Opera */
|
||||||
}
|
}
|
||||||
|
|
||||||
.templates-list::-webkit-scrollbar-track {
|
.no-search-results {
|
||||||
background: var(--ant-color-bg-layout);
|
text-align: center;
|
||||||
border-radius: 3px;
|
padding: 60px 20px;
|
||||||
|
color: var(--ant-color-text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.templates-list::-webkit-scrollbar-thumb {
|
.no-results-icon {
|
||||||
background: var(--ant-color-border);
|
font-size: 48px;
|
||||||
border-radius: 3px;
|
margin-bottom: 16px;
|
||||||
|
color: var(--ant-color-text-tertiary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.templates-list::-webkit-scrollbar-thumb:hover {
|
.no-results-tip {
|
||||||
background: var(--ant-color-primary-hover);
|
font-size: 14px;
|
||||||
|
color: var(--ant-color-text-tertiary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.template-item {
|
.template-item {
|
||||||
background: var(--ant-color-bg-elevated);
|
|
||||||
border: 1px solid var(--ant-color-border);
|
border: 1px solid var(--ant-color-border);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 16px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
overflow: hidden;
|
background: var(--ant-color-bg-container);
|
||||||
}
|
}
|
||||||
|
|
||||||
.template-item:hover {
|
.template-item:hover {
|
||||||
border-color: var(--ant-color-primary-hover);
|
border-color: var(--ant-color-primary);
|
||||||
transform: translateY(-1px);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.template-item.selected {
|
.template-item.selected {
|
||||||
border-color: var(--ant-color-primary);
|
border-color: var(--ant-color-primary);
|
||||||
background: var(--ant-color-primary-bg);
|
background: var(--ant-color-primary-bg);
|
||||||
box-shadow: 0 4px 16px rgba(24, 144, 255, 0.2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.template-content {
|
.template-content {
|
||||||
padding: 16px 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.template-header {
|
.template-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 12px;
|
||||||
}
|
|
||||||
|
|
||||||
.template-info {
|
|
||||||
flex: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.template-name {
|
.template-name {
|
||||||
|
margin: 0 0 8px 0;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--ant-color-text);
|
color: var(--ant-color-text);
|
||||||
margin: 0 0 6px 0;
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.template-meta {
|
.template-meta {
|
||||||
@@ -1084,10 +938,8 @@ const handleToggleUserStatus = async (user: User) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.template-description {
|
.template-description {
|
||||||
font-size: 14px;
|
|
||||||
color: var(--ant-color-text-secondary);
|
color: var(--ant-color-text-secondary);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
margin-top: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.template-description :deep(p) {
|
.template-description :deep(p) {
|
||||||
@@ -1097,77 +949,4 @@ const handleToggleUserStatus = async (user: User) => {
|
|||||||
.template-description :deep(p:last-child) {
|
.template-description :deep(p:last-child) {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.template-description :deep(code) {
|
|
||||||
background: var(--ant-color-bg-layout);
|
|
||||||
padding: 2px 4px;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 12px;
|
|
||||||
font-family: 'Consolas', 'Monaco', monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
.template-description :deep(strong) {
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--ant-color-text);
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-templates {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
min-height: 300px;
|
|
||||||
background: var(--ant-color-bg-container);
|
|
||||||
border-radius: 16px;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-templates-content {
|
|
||||||
text-align: center;
|
|
||||||
padding: 40px;
|
|
||||||
max-width: 400px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-templates-icon {
|
|
||||||
font-size: 64px;
|
|
||||||
color: var(--ant-color-text-tertiary);
|
|
||||||
margin-bottom: 24px;
|
|
||||||
opacity: 0.6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-templates-content h3 {
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--ant-color-text);
|
|
||||||
margin: 0 0 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-templates-content p {
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--ant-color-text-secondary);
|
|
||||||
line-height: 1.6;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-search-results {
|
|
||||||
text-align: center;
|
|
||||||
padding: 40px 20px;
|
|
||||||
color: var(--ant-color-text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-results-icon {
|
|
||||||
font-size: 48px;
|
|
||||||
color: var(--ant-color-text-tertiary);
|
|
||||||
margin-bottom: 16px;
|
|
||||||
opacity: 0.6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-search-results p {
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-results-tip {
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--ant-color-text-tertiary);
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user