♻️ refactor: Replace useQuery with Zustand store for subscription and node data management

This commit is contained in:
web
2025-09-17 02:20:54 -07:00
parent bdd53b1551
commit c6dd0b63f2
28 changed files with 448 additions and 359 deletions
@@ -91,6 +91,7 @@ export function getProtocolDefaultConfig(proto: ProtocolType) {
case 'mieru':
return {
type: 'mieru',
enable: false,
port: null,
multiplex: 'none',
transport: 'tcp',
@@ -98,6 +99,7 @@ export function getProtocolDefaultConfig(proto: ProtocolType) {
case 'anytls':
return {
type: 'anytls',
enable: false,
port: null,
security: 'tls',
padding_scheme: null,
@@ -18,7 +18,7 @@ export {
} from './constants';
// Re-export all types
export type { FieldConfig, ProtocolType, ServerFormValues } from './types';
export type { FieldConfig, ProtocolType } from './types';
// Re-export all schemas
export { formSchema, protocolApiScheme } from './schemas';
@@ -1,6 +1,4 @@
import { z } from 'zod';
import { protocols } from './constants';
import { formSchema } from './schemas';
export type FieldConfig = {
name: string;
@@ -22,6 +20,4 @@ export type FieldConfig = {
gridSpan?: 1 | 2;
};
export type ServerFormValues = z.infer<typeof formSchema>;
export type ProtocolType = (typeof protocols)[number];