Refactor global styles and enhance MITM functionality

- Updated global CSS to implement a new brand color palette and improve light/dark theme consistency.
- Enhanced the MitmServerCard component to provide clearer user feedback regarding admin privileges.
- Filtered LLM combos in the CombosPage to ensure only relevant data is displayed.
- Improved APIPageClient layout for better usability and visual consistency.
- Added functionality to save and load DNS tool states in the MITM manager.
- Updated OAuth configuration URLs for Qwen to reflect the new endpoint structure.
- Refined tunnel management logic to improve reliability and user experience.
This commit is contained in:
decolua
2026-05-03 18:00:35 +07:00
parent 1686adc704
commit 6cdf40b44e
40 changed files with 1029 additions and 762 deletions

View File

@@ -138,9 +138,6 @@ export async function GET() {
object: "model",
created: timestamp,
owned_by: "combo",
permission: [],
root: combo.name,
parent: null,
});
}
@@ -154,9 +151,6 @@ export async function GET() {
object: "model",
created: timestamp,
owned_by: alias,
permission: [],
root: model.id,
parent: null,
});
}
}
@@ -175,9 +169,6 @@ export async function GET() {
object: "model",
created: timestamp,
owned_by: providerAlias,
permission: [],
root: modelId,
parent: null,
});
}
} else {
@@ -267,9 +258,6 @@ export async function GET() {
object: "model",
created: timestamp,
owned_by: outputAlias,
permission: [],
root: modelId,
parent: null,
});
}
}

View File

@@ -1,32 +1 @@
const CORS_HEADERS = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, OPTIONS",
"Access-Control-Allow-Headers": "*"
};
/**
* Handle CORS preflight
*/
export async function OPTIONS() {
return new Response(null, { headers: CORS_HEADERS });
}
/**
* GET /v1 - Return models list (OpenAI compatible)
*/
export async function GET() {
const models = [
{ id: "claude-sonnet-4-20250514", object: "model", owned_by: "anthropic" },
{ id: "claude-3-5-sonnet-20241022", object: "model", owned_by: "anthropic" },
{ id: "gpt-4o", object: "model", owned_by: "openai" },
{ id: "gemini-2.5-pro", object: "model", owned_by: "google" }
];
return new Response(JSON.stringify({
object: "list",
data: models
}), {
headers: { "Content-Type": "application/json", ...CORS_HEADERS }
});
}
export { GET, OPTIONS } from "./models/route";