feat(proxy): update proxy edit api to feat "oldName" && "newName"
This commit is contained in:
@@ -323,6 +323,7 @@ export default {
|
|||||||
const showDeleteProxyModal = ref(false);
|
const showDeleteProxyModal = ref(false);
|
||||||
const isEditProxy = ref(false);
|
const isEditProxy = ref(false);
|
||||||
const selectedProxyName = ref('');
|
const selectedProxyName = ref('');
|
||||||
|
const originalProxyName = ref('');
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const userType = ref(getCookie('user-type') || 'visitor');
|
const userType = ref(getCookie('user-type') || 'visitor');
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@@ -544,6 +545,7 @@ export default {
|
|||||||
|
|
||||||
const editProxy = (proxy) => {
|
const editProxy = (proxy) => {
|
||||||
isEditProxy.value = true;
|
isEditProxy.value = true;
|
||||||
|
originalProxyName.value = proxy.name;
|
||||||
formData.value = {
|
formData.value = {
|
||||||
name: proxy.name,
|
name: proxy.name,
|
||||||
type: proxy.type,
|
type: proxy.type,
|
||||||
@@ -577,6 +579,7 @@ export default {
|
|||||||
const closeAddProxyModal = () => {
|
const closeAddProxyModal = () => {
|
||||||
showAddProxyModal.value = false;
|
showAddProxyModal.value = false;
|
||||||
selectedProxyName.value = '';
|
selectedProxyName.value = '';
|
||||||
|
originalProxyName.value = '';
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeEditConfigModal = () => {
|
const closeEditConfigModal = () => {
|
||||||
@@ -601,7 +604,8 @@ export default {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
try {
|
try {
|
||||||
const proxyInfo = {
|
const proxyInfo = {
|
||||||
name: formData.value.name,
|
oldName: isEditProxy.value ? originalProxyName.value : undefined,
|
||||||
|
newName: formData.value.name,
|
||||||
type: formData.value.type,
|
type: formData.value.type,
|
||||||
localIP: formData.value.localIP,
|
localIP: formData.value.localIP,
|
||||||
localPort: formData.value.localPort,
|
localPort: formData.value.localPort,
|
||||||
@@ -720,6 +724,7 @@ export default {
|
|||||||
showDeleteProxyModal,
|
showDeleteProxyModal,
|
||||||
isEditProxy,
|
isEditProxy,
|
||||||
selectedProxyName,
|
selectedProxyName,
|
||||||
|
originalProxyName,
|
||||||
loading,
|
loading,
|
||||||
formData,
|
formData,
|
||||||
goBack,
|
goBack,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { defineConfig } from 'vite'
|
import { defineConfig } from 'vite'
|
||||||
import vue from '@vitejs/plugin-vue'
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
|
||||||
const APP_TARGET = '192.168.20.4:19090'
|
const APP_TARGET = '192.168.1.19:19090'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
define: {
|
define: {
|
||||||
|
|||||||
Reference in New Issue
Block a user