feat: add proxy import flow
This commit is contained in:
@@ -69,6 +69,9 @@
|
||||
<Icon name="trash" size="md" class="mr-2" />
|
||||
{{ t('admin.proxies.batchDeleteAction') }}
|
||||
</button>
|
||||
<button @click="showImportData = true" class="btn btn-secondary">
|
||||
{{ t('admin.proxies.dataImport') }}
|
||||
</button>
|
||||
<button @click="showExportDataDialog = true" class="btn btn-secondary">
|
||||
{{ t('admin.proxies.dataExport') }}
|
||||
</button>
|
||||
@@ -619,6 +622,12 @@
|
||||
@cancel="showExportDataDialog = false"
|
||||
/>
|
||||
|
||||
<ImportDataModal
|
||||
:show="showImportData"
|
||||
@close="showImportData = false"
|
||||
@imported="handleDataImported"
|
||||
/>
|
||||
|
||||
<!-- Proxy Accounts Dialog -->
|
||||
<BaseDialog
|
||||
:show="showAccountsModal"
|
||||
@@ -680,6 +689,7 @@ import Pagination from '@/components/common/Pagination.vue'
|
||||
import BaseDialog from '@/components/common/BaseDialog.vue'
|
||||
import ConfirmDialog from '@/components/common/ConfirmDialog.vue'
|
||||
import EmptyState from '@/components/common/EmptyState.vue'
|
||||
import ImportDataModal from '@/components/admin/proxy/ImportDataModal.vue'
|
||||
import Select from '@/components/common/Select.vue'
|
||||
import Icon from '@/components/icons/Icon.vue'
|
||||
import PlatformTypeBadge from '@/components/common/PlatformTypeBadge.vue'
|
||||
@@ -743,6 +753,7 @@ const pagination = reactive({
|
||||
|
||||
const showCreateModal = ref(false)
|
||||
const showEditModal = ref(false)
|
||||
const showImportData = ref(false)
|
||||
const showDeleteDialog = ref(false)
|
||||
const showBatchDeleteDialog = ref(false)
|
||||
const showExportDataDialog = ref(false)
|
||||
@@ -902,6 +913,11 @@ const closeCreateModal = () => {
|
||||
batchParseResult.proxies = []
|
||||
}
|
||||
|
||||
const handleDataImported = () => {
|
||||
showImportData.value = false
|
||||
loadProxies()
|
||||
}
|
||||
|
||||
// Parse proxy URL: protocol://user:pass@host:port or protocol://host:port
|
||||
const parseProxyUrl = (
|
||||
line: string
|
||||
|
||||
Reference in New Issue
Block a user