mirror of
https://github.com/fatedier/frp.git
synced 2026-04-09 02:29:15 +08:00
add persistent proxy/visitor store with CRUD API and web UI (#5188)
This commit is contained in:
@@ -48,6 +48,28 @@
|
||||
>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
<el-select
|
||||
v-model="filterSource"
|
||||
placeholder="Source"
|
||||
clearable
|
||||
class="filter-select"
|
||||
>
|
||||
<el-option label="Config" value="config" />
|
||||
<el-option label="Store" value="store" />
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="filterType"
|
||||
placeholder="Type"
|
||||
clearable
|
||||
class="filter-select"
|
||||
>
|
||||
<el-option
|
||||
v-for="type in availableTypes"
|
||||
:key="type"
|
||||
:label="type.toUpperCase()"
|
||||
:value="type"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-model="searchText"
|
||||
placeholder="Search..."
|
||||
@@ -58,6 +80,18 @@
|
||||
<el-tooltip content="Refresh" placement="top">
|
||||
<el-button :icon="Refresh" circle @click="fetchData" />
|
||||
</el-tooltip>
|
||||
<el-tooltip
|
||||
v-if="storeEnabled"
|
||||
content="Add new proxy"
|
||||
placement="top"
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
:icon="Plus"
|
||||
circle
|
||||
@click="handleCreate"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -68,10 +102,46 @@
|
||||
v-for="proxy in filteredStatus"
|
||||
:key="proxy.name"
|
||||
:proxy="proxy"
|
||||
@edit="handleEdit"
|
||||
@delete="handleDelete"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="!loading" class="empty-state">
|
||||
<el-empty description="No proxies found" />
|
||||
<div class="empty-content">
|
||||
<div class="empty-icon">
|
||||
<svg
|
||||
viewBox="0 0 64 64"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<rect
|
||||
x="8"
|
||||
y="16"
|
||||
width="48"
|
||||
height="32"
|
||||
rx="4"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
/>
|
||||
<circle cx="20" cy="32" r="4" fill="currentColor" />
|
||||
<circle cx="32" cy="32" r="4" fill="currentColor" />
|
||||
<circle cx="44" cy="32" r="4" fill="currentColor" />
|
||||
</svg>
|
||||
</div>
|
||||
<p class="empty-text">No proxies configured</p>
|
||||
<p class="empty-hint">
|
||||
Add proxies in your configuration file or use Store to create
|
||||
dynamic proxies
|
||||
</p>
|
||||
<el-button
|
||||
v-if="storeEnabled"
|
||||
type="primary"
|
||||
:icon="Plus"
|
||||
@click="handleCreate"
|
||||
>
|
||||
Create First Proxy
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -90,7 +160,9 @@
|
||||
v-for="(count, type) in proxyTypeCounts"
|
||||
:key="type"
|
||||
class="proxy-type-item"
|
||||
:class="{ active: filterType === type }"
|
||||
v-show="count > 0"
|
||||
@click="toggleTypeFilter(String(type))"
|
||||
>
|
||||
<div class="proxy-type-name">
|
||||
{{ String(type).toUpperCase() }}
|
||||
@@ -125,6 +197,178 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- Store Status Card -->
|
||||
<el-card class="store-status-card" shadow="hover">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span class="card-title">Store</span>
|
||||
<el-tag
|
||||
size="small"
|
||||
:type="storeEnabled ? 'success' : 'info'"
|
||||
effect="plain"
|
||||
>
|
||||
{{ storeEnabled ? 'Enabled' : 'Disabled' }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
<div class="store-info">
|
||||
<template v-if="storeEnabled">
|
||||
<div class="store-stat">
|
||||
<span class="store-stat-label">Store Proxies</span>
|
||||
<span class="store-stat-value">{{ storeProxies.length }}</span>
|
||||
</div>
|
||||
<div class="store-stat">
|
||||
<span class="store-stat-label">Store Visitors</span>
|
||||
<span class="store-stat-value">{{ storeVisitors.length }}</span>
|
||||
</div>
|
||||
<p class="store-hint">
|
||||
Proxies from Store are marked with a purple indicator
|
||||
</p>
|
||||
</template>
|
||||
<template v-else>
|
||||
<p class="store-disabled-text">
|
||||
Enable Store in your configuration to dynamically manage proxies
|
||||
</p>
|
||||
</template>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- Disabled Store Proxies Section -->
|
||||
<el-row v-if="storeEnabled && disabledStoreProxies.length > 0" :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-card class="disabled-proxies-card" shadow="hover">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<div class="header-left">
|
||||
<span class="card-title">Disabled Store Proxies</span>
|
||||
<el-tag size="small" type="warning">
|
||||
{{ disabledStoreProxies.length }} disabled
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="disabled-proxy-list">
|
||||
<div
|
||||
v-for="proxy in disabledStoreProxies"
|
||||
:key="proxy.name"
|
||||
class="disabled-proxy-card"
|
||||
>
|
||||
<div class="disabled-proxy-info">
|
||||
<span class="disabled-proxy-name">{{ proxy.name }}</span>
|
||||
<el-tag size="small" type="info">{{
|
||||
proxy.type.toUpperCase()
|
||||
}}</el-tag>
|
||||
<el-tag size="small" type="warning" effect="plain"
|
||||
>Disabled</el-tag
|
||||
>
|
||||
</div>
|
||||
<div class="disabled-proxy-actions">
|
||||
<el-button size="small" @click="handleEditStoreProxy(proxy)">
|
||||
Edit
|
||||
</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="danger"
|
||||
@click="handleDeleteStoreProxy(proxy)"
|
||||
>
|
||||
Delete
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="disabled-proxy-hint">
|
||||
Edit a proxy and enable it to make it active again.
|
||||
</p>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- Store Visitors Section -->
|
||||
<el-row v-if="storeEnabled" :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-card class="visitors-card" shadow="hover">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<div class="header-left">
|
||||
<span class="card-title">Store Visitors</span>
|
||||
<el-tag size="small" type="info"
|
||||
>{{ storeVisitors.length }} visitors</el-tag
|
||||
>
|
||||
</div>
|
||||
<el-tooltip content="Add new visitor" placement="top">
|
||||
<el-button
|
||||
type="primary"
|
||||
:icon="Plus"
|
||||
circle
|
||||
@click="handleCreateVisitor"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
<div v-if="storeVisitors.length > 0" class="visitor-list">
|
||||
<div
|
||||
v-for="visitor in storeVisitors"
|
||||
:key="visitor.name"
|
||||
class="visitor-card"
|
||||
>
|
||||
<div class="visitor-card-header">
|
||||
<div class="visitor-info">
|
||||
<span class="visitor-name">{{ visitor.name }}</span>
|
||||
<el-tag size="small" type="info">{{
|
||||
visitor.type.toUpperCase()
|
||||
}}</el-tag>
|
||||
</div>
|
||||
<div class="visitor-actions">
|
||||
<el-button size="small" @click="handleEditVisitor(visitor)">
|
||||
Edit
|
||||
</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="danger"
|
||||
@click="handleDeleteVisitor(visitor.name)"
|
||||
>
|
||||
Delete
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="visitor-card-body">
|
||||
<span v-if="visitor.config?.serverName">
|
||||
Server: {{ visitor.config.serverName }}
|
||||
</span>
|
||||
<span
|
||||
v-if="
|
||||
visitor.config?.bindAddr || visitor.config?.bindPort != null
|
||||
"
|
||||
>
|
||||
Bind: {{ visitor.config.bindAddr || '127.0.0.1'
|
||||
}}<template v-if="visitor.config?.bindPort != null"
|
||||
>:{{ visitor.config.bindPort }}</template
|
||||
>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="empty-state">
|
||||
<div class="empty-content">
|
||||
<p class="empty-text">No visitors configured</p>
|
||||
<p class="empty-hint">
|
||||
Create your first visitor to connect to secure proxies.
|
||||
</p>
|
||||
<el-button
|
||||
type="primary"
|
||||
:icon="Plus"
|
||||
@click="handleCreateVisitor"
|
||||
>
|
||||
Create First Visitor
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -132,17 +376,37 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Search, Refresh } from '@element-plus/icons-vue'
|
||||
import { getStatus } from '../api/frpc'
|
||||
import type { ProxyStatus } from '../types/proxy'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { Search, Refresh, Plus } from '@element-plus/icons-vue'
|
||||
import {
|
||||
getStatus,
|
||||
listStoreProxies,
|
||||
deleteStoreProxy,
|
||||
listStoreVisitors,
|
||||
deleteStoreVisitor,
|
||||
} from '../api/frpc'
|
||||
import type {
|
||||
ProxyStatus,
|
||||
StoreProxyConfig,
|
||||
StoreVisitorConfig,
|
||||
} from '../types/proxy'
|
||||
import StatCard from '../components/StatCard.vue'
|
||||
import ProxyCard from '../components/ProxyCard.vue'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
// State
|
||||
const status = ref<ProxyStatus[]>([])
|
||||
const storeProxies = ref<StoreProxyConfig[]>([])
|
||||
const storeVisitors = ref<StoreVisitorConfig[]>([])
|
||||
const storeEnabled = ref(false)
|
||||
const loading = ref(false)
|
||||
const searchText = ref('')
|
||||
const filterSource = ref('')
|
||||
const filterType = ref('')
|
||||
|
||||
// Computed
|
||||
const stats = computed(() => {
|
||||
const total = status.value.length
|
||||
const running = status.value.filter((p) => p.status === 'running').length
|
||||
@@ -163,41 +427,181 @@ const hasActiveProxies = computed(() => {
|
||||
return status.value.length > 0
|
||||
})
|
||||
|
||||
const filteredStatus = computed(() => {
|
||||
if (!searchText.value) {
|
||||
return status.value
|
||||
}
|
||||
const search = searchText.value.toLowerCase()
|
||||
return status.value.filter(
|
||||
(p) =>
|
||||
p.name.toLowerCase().includes(search) ||
|
||||
p.type.toLowerCase().includes(search) ||
|
||||
p.local_addr.toLowerCase().includes(search) ||
|
||||
p.remote_addr.toLowerCase().includes(search),
|
||||
)
|
||||
const availableTypes = computed(() => {
|
||||
const types = new Set<string>()
|
||||
status.value.forEach((p) => types.add(p.type))
|
||||
return Array.from(types).sort()
|
||||
})
|
||||
|
||||
const filteredStatus = computed(() => {
|
||||
let result = status.value
|
||||
|
||||
if (filterSource.value) {
|
||||
if (filterSource.value === 'store') {
|
||||
result = result.filter((p) => p.source === 'store')
|
||||
} else {
|
||||
result = result.filter((p) => !p.source || p.source !== 'store')
|
||||
}
|
||||
}
|
||||
|
||||
if (filterType.value) {
|
||||
result = result.filter((p) => p.type === filterType.value)
|
||||
}
|
||||
|
||||
if (searchText.value) {
|
||||
const search = searchText.value.toLowerCase()
|
||||
result = result.filter(
|
||||
(p) =>
|
||||
p.name.toLowerCase().includes(search) ||
|
||||
p.type.toLowerCase().includes(search) ||
|
||||
p.local_addr.toLowerCase().includes(search) ||
|
||||
p.remote_addr.toLowerCase().includes(search),
|
||||
)
|
||||
}
|
||||
|
||||
return result
|
||||
})
|
||||
|
||||
const disabledStoreProxies = computed(() => {
|
||||
return storeProxies.value.filter((p) => p.config?.enabled === false)
|
||||
})
|
||||
|
||||
// Methods
|
||||
const toggleTypeFilter = (type: string) => {
|
||||
filterType.value = filterType.value === type ? '' : type
|
||||
}
|
||||
|
||||
const fetchStatus = async () => {
|
||||
try {
|
||||
const json = await getStatus()
|
||||
const list: ProxyStatus[] = []
|
||||
for (const key in json) {
|
||||
for (const ps of json[key]) {
|
||||
list.push(ps)
|
||||
}
|
||||
}
|
||||
status.value = list
|
||||
} catch (err: any) {
|
||||
ElMessage.error('Failed to get status: ' + err.message)
|
||||
}
|
||||
}
|
||||
|
||||
const fetchStoreProxies = async () => {
|
||||
try {
|
||||
const res = await listStoreProxies()
|
||||
storeProxies.value = res.proxies || []
|
||||
storeEnabled.value = true
|
||||
} catch (err: any) {
|
||||
if (err.status === 404) {
|
||||
storeEnabled.value = false
|
||||
storeProxies.value = []
|
||||
} else {
|
||||
console.error('Failed to fetch store proxies:', err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const fetchStoreVisitors = async () => {
|
||||
try {
|
||||
const res = await listStoreVisitors()
|
||||
storeVisitors.value = res.visitors || []
|
||||
} catch (err: any) {
|
||||
if (err.status === 404) {
|
||||
storeVisitors.value = []
|
||||
} else {
|
||||
console.error('Failed to fetch store visitors:', err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const fetchData = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const json = await getStatus()
|
||||
status.value = []
|
||||
for (const key in json) {
|
||||
for (const ps of json[key]) {
|
||||
status.value.push(ps)
|
||||
}
|
||||
}
|
||||
} catch (err: any) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: 'Get status info from frpc failed! ' + err.message,
|
||||
type: 'warning',
|
||||
})
|
||||
await Promise.all([
|
||||
fetchStoreProxies(),
|
||||
fetchStoreVisitors(),
|
||||
fetchStatus(),
|
||||
])
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const handleCreate = () => {
|
||||
router.push('/proxies/create')
|
||||
}
|
||||
|
||||
const handleEdit = (proxy: ProxyStatus) => {
|
||||
if (proxy.source !== 'store') return
|
||||
router.push('/proxies/' + encodeURIComponent(proxy.name) + '/edit')
|
||||
}
|
||||
|
||||
const confirmAndDeleteProxy = async (name: string) => {
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`Are you sure you want to delete "${name}"? This action cannot be undone.`,
|
||||
'Delete Proxy',
|
||||
{
|
||||
confirmButtonText: 'Delete',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'el-button--danger',
|
||||
},
|
||||
)
|
||||
await deleteStoreProxy(name)
|
||||
ElMessage.success('Proxy deleted')
|
||||
fetchData()
|
||||
} catch (err: any) {
|
||||
if (err !== 'cancel' && err !== 'close') {
|
||||
ElMessage.error('Delete failed: ' + (err.message || 'Unknown error'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const handleDelete = async (proxy: ProxyStatus) => {
|
||||
if (proxy.source !== 'store') return
|
||||
confirmAndDeleteProxy(proxy.name)
|
||||
}
|
||||
|
||||
const handleEditStoreProxy = (proxy: StoreProxyConfig) => {
|
||||
router.push('/proxies/' + encodeURIComponent(proxy.name) + '/edit')
|
||||
}
|
||||
|
||||
const handleDeleteStoreProxy = async (proxy: StoreProxyConfig) => {
|
||||
confirmAndDeleteProxy(proxy.name)
|
||||
}
|
||||
|
||||
const handleCreateVisitor = () => {
|
||||
router.push('/visitors/create')
|
||||
}
|
||||
|
||||
const handleEditVisitor = (visitor: StoreVisitorConfig) => {
|
||||
router.push('/visitors/' + encodeURIComponent(visitor.name) + '/edit')
|
||||
}
|
||||
|
||||
const handleDeleteVisitor = async (name: string) => {
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`Are you sure you want to delete visitor "${name}"? This action cannot be undone.`,
|
||||
'Delete Visitor',
|
||||
{
|
||||
confirmButtonText: 'Delete',
|
||||
cancelButtonText: 'Cancel',
|
||||
type: 'warning',
|
||||
confirmButtonClass: 'el-button--danger',
|
||||
},
|
||||
)
|
||||
await deleteStoreVisitor(name)
|
||||
ElMessage.success('Visitor deleted')
|
||||
fetchData()
|
||||
} catch (err: any) {
|
||||
if (err !== 'cancel' && err !== 'close') {
|
||||
ElMessage.error('Delete failed: ' + (err.message || 'Unknown error'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Initial load
|
||||
fetchData()
|
||||
</script>
|
||||
|
||||
@@ -222,19 +626,22 @@ fetchData()
|
||||
|
||||
.proxy-list-card,
|
||||
.types-card,
|
||||
.status-summary-card {
|
||||
.status-summary-card,
|
||||
.store-status-card {
|
||||
border-radius: 12px;
|
||||
border: 1px solid #e4e7ed;
|
||||
}
|
||||
|
||||
html.dark .proxy-list-card,
|
||||
html.dark .types-card,
|
||||
html.dark .status-summary-card {
|
||||
html.dark .status-summary-card,
|
||||
html.dark .store-status-card {
|
||||
border-color: #3a3d5c;
|
||||
background: #27293d;
|
||||
}
|
||||
|
||||
.status-summary-card {
|
||||
.status-summary-card,
|
||||
.store-status-card {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
@@ -255,7 +662,7 @@ html.dark .status-summary-card {
|
||||
.header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
@@ -268,8 +675,12 @@ html.dark .card-title {
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
.filter-select {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
width: 200px;
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.proxy-list-content {
|
||||
@@ -282,8 +693,45 @@ html.dark .card-title {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
/* Empty State */
|
||||
.empty-state {
|
||||
padding: 40px 0;
|
||||
padding: 48px 24px;
|
||||
}
|
||||
|
||||
.empty-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.empty-icon {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
margin-bottom: 20px;
|
||||
color: #c0c4cc;
|
||||
}
|
||||
|
||||
html.dark .empty-icon {
|
||||
color: #4b5563;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #606266;
|
||||
margin: 0 0 8px;
|
||||
}
|
||||
|
||||
html.dark .empty-text {
|
||||
color: #9ca3af;
|
||||
}
|
||||
|
||||
.empty-hint {
|
||||
font-size: 14px;
|
||||
color: #909399;
|
||||
margin: 0 0 20px;
|
||||
max-width: 320px;
|
||||
}
|
||||
|
||||
/* Proxy Types Grid */
|
||||
@@ -303,6 +751,7 @@ html.dark .card-title {
|
||||
background: #f8f9fa;
|
||||
border-radius: 8px;
|
||||
transition: all 0.2s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.proxy-type-item:hover {
|
||||
@@ -310,6 +759,19 @@ html.dark .card-title {
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.proxy-type-item.active {
|
||||
background: var(--el-color-primary-light-8);
|
||||
box-shadow: 0 0 0 2px var(--el-color-primary-light-5);
|
||||
}
|
||||
|
||||
.proxy-type-item.active .proxy-type-name {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
.proxy-type-item.active .proxy-type-count {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
|
||||
html.dark .proxy-type-item {
|
||||
background: #1e1e2d;
|
||||
}
|
||||
@@ -318,6 +780,11 @@ html.dark .proxy-type-item:hover {
|
||||
background: #2a2a3c;
|
||||
}
|
||||
|
||||
html.dark .proxy-type-item.active {
|
||||
background: var(--el-color-primary-dark-2);
|
||||
box-shadow: 0 0 0 2px var(--el-color-primary);
|
||||
}
|
||||
|
||||
.proxy-type-name {
|
||||
font-size: 11px;
|
||||
color: #909399;
|
||||
@@ -410,6 +877,213 @@ html.dark .status-item:hover {
|
||||
color: var(--el-text-color-primary);
|
||||
}
|
||||
|
||||
/* Store Status Card */
|
||||
.store-info {
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
.store-stat {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px 16px;
|
||||
background: linear-gradient(
|
||||
135deg,
|
||||
rgba(102, 126, 234, 0.08) 0%,
|
||||
rgba(118, 75, 162, 0.08) 100%
|
||||
);
|
||||
border-radius: 8px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
html.dark .store-stat {
|
||||
background: linear-gradient(
|
||||
135deg,
|
||||
rgba(129, 140, 248, 0.12) 0%,
|
||||
rgba(167, 139, 250, 0.12) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.store-stat-label {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
html.dark .store-stat-label {
|
||||
color: #9ca3af;
|
||||
}
|
||||
|
||||
.store-stat-value {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
html.dark .store-stat-value {
|
||||
background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
background-clip: text;
|
||||
}
|
||||
|
||||
.store-hint {
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.store-disabled-text {
|
||||
font-size: 13px;
|
||||
color: #909399;
|
||||
margin: 0;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* Disabled Proxies Card */
|
||||
.disabled-proxies-card {
|
||||
border-radius: 12px;
|
||||
border: 1px solid #e4e7ed;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
html.dark .disabled-proxies-card {
|
||||
border-color: #3a3d5c;
|
||||
background: #27293d;
|
||||
}
|
||||
|
||||
.disabled-proxy-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.disabled-proxy-card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 14px 16px;
|
||||
border-radius: 8px;
|
||||
background: #faf7f0;
|
||||
border: 1px solid #f1d9a6;
|
||||
}
|
||||
|
||||
html.dark .disabled-proxy-card {
|
||||
background: rgba(161, 98, 7, 0.14);
|
||||
border-color: rgba(245, 158, 11, 0.45);
|
||||
}
|
||||
|
||||
.disabled-proxy-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.disabled-proxy-name {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
html.dark .disabled-proxy-name {
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
.disabled-proxy-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.disabled-proxy-hint {
|
||||
margin: 12px 2px 0;
|
||||
font-size: 13px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
/* Visitors Card */
|
||||
.visitors-card {
|
||||
border-radius: 12px;
|
||||
border: 1px solid #e4e7ed;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
html.dark .visitors-card {
|
||||
border-color: #3a3d5c;
|
||||
background: #27293d;
|
||||
}
|
||||
|
||||
.visitor-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.visitor-card {
|
||||
padding: 16px;
|
||||
background: #f8f9fa;
|
||||
border-radius: 8px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.visitor-card:hover {
|
||||
background: #f0f2f5;
|
||||
}
|
||||
|
||||
html.dark .visitor-card {
|
||||
background: #1e1e2d;
|
||||
}
|
||||
|
||||
html.dark .visitor-card:hover {
|
||||
background: #2a2a3c;
|
||||
}
|
||||
|
||||
.visitor-card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.visitor-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.visitor-name {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
html.dark .visitor-name {
|
||||
color: #e5e7eb;
|
||||
}
|
||||
|
||||
.visitor-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.visitor-card-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
font-size: 13px;
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
html.dark .visitor-card-body {
|
||||
color: #9ca3af;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.card-header {
|
||||
flex-direction: column;
|
||||
@@ -432,10 +1106,21 @@ html.dark .status-item:hover {
|
||||
.proxy-types-grid {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
|
||||
.disabled-proxy-card {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.disabled-proxy-actions {
|
||||
width: 100%;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.status-summary-card {
|
||||
.status-summary-card,
|
||||
.store-status-card {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user