Revert "feat(frontend): unify ui with slate control center"
This reverts commit 91aa6e83ca.
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useProxiesStore, ProxyInfo } from '../stores/proxies.store';
|
||||
import PageShell from '../components/PageShell.vue';
|
||||
import ProxyList from '../components/ProxyList.vue';
|
||||
import AddProxyForm from '../components/AddProxyForm.vue';
|
||||
import AddProxyForm from '../components/AddProxyForm.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const proxiesStore = useProxiesStore();
|
||||
@@ -12,6 +11,7 @@ const proxiesStore = useProxiesStore();
|
||||
const showForm = ref(false);
|
||||
const editingProxy = ref<ProxyInfo | null>(null);
|
||||
|
||||
// 组件挂载时获取代理列表
|
||||
onMounted(() => {
|
||||
proxiesStore.fetchProxies();
|
||||
});
|
||||
@@ -42,18 +42,21 @@ const closeForm = () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<PageShell
|
||||
:title="t('proxies.title')"
|
||||
:subtitle="t('proxies.controlCenterSubtitle', '在统一的控制中心里管理代理入口、账号和转发策略。')"
|
||||
>
|
||||
<template #actions>
|
||||
<el-button type="primary" @click="openAddForm">
|
||||
<i class="fas fa-plus mr-2"></i>
|
||||
{{ t('proxies.addProxy') }}
|
||||
</el-button>
|
||||
</template>
|
||||
<div class="p-4 bg-background text-foreground"> <!-- Outer container with padding -->
|
||||
<div class="max-w-6xl mx-auto"> <!-- Inner container for max-width and centering -->
|
||||
<h2 class="text-xl font-semibold text-foreground mb-4 pb-2 border-b border-border"> <!-- Title styling consistent with Notifications -->
|
||||
{{ t('proxies.title') }}
|
||||
</h2>
|
||||
|
||||
<el-card shadow="never" class="control-panel">
|
||||
<button
|
||||
@click="openAddForm"
|
||||
v-if="!showForm"
|
||||
class="px-4 py-2 bg-button text-button-text rounded hover:bg-button-hover mb-4 inline-flex items-center text-sm font-medium"
|
||||
> <!-- Button styling consistent with Notifications -->
|
||||
{{ t('proxies.addProxy') }}
|
||||
</button>
|
||||
|
||||
<!-- 添加/编辑代理表单 -->
|
||||
<AddProxyForm
|
||||
v-if="showForm"
|
||||
:proxy-to-edit="editingProxy"
|
||||
@@ -62,7 +65,13 @@ const closeForm = () => {
|
||||
@proxy-updated="handleProxyUpdated"
|
||||
/>
|
||||
|
||||
<!-- 代理列表 -->
|
||||
<ProxyList @edit-proxy="handleEditRequest" />
|
||||
</el-card>
|
||||
</PageShell>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* Remove scoped styles previously handled by Tailwind */
|
||||
/* .proxies-view, button, button:hover, button:disabled, .placeholder-form, .placeholder-list rules are removed */
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user