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:
@@ -7,13 +7,15 @@ const IS_WIN = process.platform === "win32";
|
||||
* Uses `net session` which only succeeds when elevated.
|
||||
*/
|
||||
function isAdmin() {
|
||||
if (!IS_WIN) return false;
|
||||
try {
|
||||
execSync("net session >nul 2>&1", { windowsHide: true, stdio: "ignore" });
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
if (IS_WIN) {
|
||||
try {
|
||||
execSync("net session >nul 2>&1", { windowsHide: true, stdio: "ignore" });
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return typeof process.getuid === "function" && process.getuid() === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user