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
+12 -10
View File
@@ -6,6 +6,7 @@ import Link from "next/link";
import PropTypes from "prop-types";
import ProviderIcon from "@/shared/components/ProviderIcon";
import HeaderMenu from "@/shared/components/HeaderMenu";
import ThemeToggle from "@/shared/components/ThemeToggle";
import { OAUTH_PROVIDERS, APIKEY_PROVIDERS } from "@/shared/constants/config";
import { MEDIA_PROVIDER_KINDS, AI_PROVIDERS } from "@/shared/constants/providers";
import { translate } from "@/i18n/runtime";
@@ -181,9 +182,9 @@ export default function Header({ onMenuClick, showMenuButton = true }) {
};
return (
<header className="flex items-center justify-between px-8 py-5 border-b border-black/5 dark:border-white/5 bg-bg/80 backdrop-blur-xl z-10 sticky top-0">
<header className="shrink-0 flex items-center justify-between gap-3 px-4 lg:px-8 pt-3 pb-2 border-b border-border-subtle bg-surface/60 backdrop-blur-xl lg:bg-transparent lg:backdrop-blur-none z-20">
{/* Mobile menu button */}
<div className="flex items-center gap-3 lg:hidden">
<div className="flex items-center gap-3 lg:hidden shrink-0">
{showMenuButton && (
<button
onClick={onMenuClick}
@@ -194,8 +195,8 @@ export default function Header({ onMenuClick, showMenuButton = true }) {
)}
</div>
{/* Page title with breadcrumbs - desktop */}
<div className="hidden lg:flex flex-col">
{/* Page title with breadcrumbs */}
<div className="flex flex-col min-w-0 flex-1">
{breadcrumbs.length > 0 ? (
<div className="flex items-center gap-2">
{breadcrumbs.map((crumb, index) => (
@@ -226,7 +227,7 @@ export default function Header({ onMenuClick, showMenuButton = true }) {
fallbackText={crumb.label.slice(0, 2).toUpperCase()}
/>
)}
<h1 className="text-2xl font-semibold text-text-main tracking-tight">
<h1 className="text-base lg:text-2xl font-semibold text-text-main tracking-tight truncate">
{translate(crumb.label)}
</h1>
</div>
@@ -238,16 +239,16 @@ export default function Header({ onMenuClick, showMenuButton = true }) {
<div>
<div className="flex items-center gap-2">
{icon && (
<span className="material-symbols-outlined text-primary text-2xl">
<span className="material-symbols-outlined text-primary text-xl lg:text-2xl">
{icon}
</span>
)}
<h1 className="text-2xl font-semibold tracking-tight">
<h1 className="text-base lg:text-2xl font-semibold tracking-tight truncate">
{translate(title)}
</h1>
</div>
{description && (
<p className="text-sm text-text-muted">
<p className="hidden lg:block text-sm text-text-muted truncate">
{translate(description)}
</p>
)}
@@ -255,8 +256,9 @@ export default function Header({ onMenuClick, showMenuButton = true }) {
) : null}
</div>
{/* Right actions - consolidated into dropdown menu */}
<div className="flex items-center ml-auto">
{/* Right actions */}
<div className="flex items-center gap-1 shrink-0">
<ThemeToggle />
<HeaderMenu onLogout={handleLogout} />
</div>
</header>