7 Commits

Author SHA1 Message Date
coolcoala
a1e1fedc3f v0.2.7 2025-09-29 02:52:35 +03:00
coolcoala
84dc631d80 updated UPDATELOG.md 2025-09-29 02:52:05 +03:00
coolcoala
6a3072fe04 hide the icon from the dock on macOS when clicking the close button 2025-09-29 02:33:53 +03:00
coolcoala
98d943f39d update dependencies 2025-09-29 02:30:28 +03:00
coolcoala
bcf724273d added message about global mode enabled 2025-09-29 02:29:13 +03:00
coolcoala
8703918a8c fixed some bugs with UI 2025-09-29 02:21:50 +03:00
coolcoala
7e88f3ba29 fixed localization 2025-09-29 02:02:34 +03:00
11 changed files with 2575 additions and 2233 deletions

View File

@@ -1,3 +1,9 @@
## v0.2.7
- fixed bug in proxy groups menu
- added message about global mode enabled on main screen
- fixed minor bugs
- updated Mihomo core to v1.19.14
## v0.2.6 ## v0.2.6
- fixed deep links - fixed deep links

View File

@@ -1,6 +1,6 @@
{ {
"name": "koala-clash", "name": "koala-clash",
"version": "0.2.6", "version": "0.2.7",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"scripts": { "scripts": {
"dev": "cross-env RUST_BACKTRACE=1 tauri dev -f verge-dev", "dev": "cross-env RUST_BACKTRACE=1 tauri dev -f verge-dev",
@@ -29,55 +29,55 @@
"@dnd-kit/sortable": "^10.0.0", "@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2", "@dnd-kit/utilities": "^3.2.2",
"@emotion/react": "^11.14.0", "@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0", "@emotion/styled": "^11.14.1",
"@hookform/resolvers": "^5.1.1", "@hookform/resolvers": "^5.2.2",
"@juggle/resize-observer": "^3.4.0", "@juggle/resize-observer": "^3.4.0",
"@mui/icons-material": "^7.1.1", "@mui/icons-material": "^7.3.2",
"@mui/lab": "7.0.0-beta.13", "@mui/lab": "7.0.0-beta.13",
"@mui/material": "^7.1.1", "@mui/material": "^7.3.2",
"@mui/x-data-grid": "^8.5.1", "@mui/x-data-grid": "^8.11.3",
"@radix-ui/react-alert-dialog": "^1.1.14", "@radix-ui/react-alert-dialog": "^1.1.15",
"@radix-ui/react-context-menu": "^2.2.15", "@radix-ui/react-context-menu": "^2.2.16",
"@radix-ui/react-dialog": "^1.1.14", "@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.15", "@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-icons": "^1.3.2", "@radix-ui/react-icons": "^1.3.2",
"@radix-ui/react-label": "^2.1.7", "@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-popover": "^1.1.14", "@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-progress": "^1.1.7", "@radix-ui/react-progress": "^1.1.7",
"@radix-ui/react-select": "^2.2.5", "@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-separator": "^1.1.7", "@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slot": "^1.2.3", "@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-switch": "^1.2.5", "@radix-ui/react-switch": "^1.2.6",
"@radix-ui/react-tooltip": "^1.2.7", "@radix-ui/react-tooltip": "^1.2.8",
"@tailwindcss/vite": "^4.1.11", "@tailwindcss/vite": "^4.1.13",
"@tanstack/react-table": "^8.21.3", "@tanstack/react-table": "^8.21.3",
"@tauri-apps/api": "2.5.0", "@tauri-apps/api": "2.5.0",
"@tauri-apps/plugin-clipboard-manager": "^2.2.2", "@tauri-apps/plugin-clipboard-manager": "^2.3.0",
"@tauri-apps/plugin-deep-link": "~2", "@tauri-apps/plugin-deep-link": "~2.4.3",
"@tauri-apps/plugin-dialog": "^2.2.2", "@tauri-apps/plugin-dialog": "^2.4.0",
"@tauri-apps/plugin-fs": "^2.3.0", "@tauri-apps/plugin-fs": "^2.4.2",
"@tauri-apps/plugin-global-shortcut": "^2.2.1", "@tauri-apps/plugin-global-shortcut": "^2.3.0",
"@tauri-apps/plugin-notification": "^2.2.2", "@tauri-apps/plugin-notification": "^2.3.1",
"@tauri-apps/plugin-process": "^2.2.1", "@tauri-apps/plugin-process": "^2.3.0",
"@tauri-apps/plugin-shell": "2.2.1", "@tauri-apps/plugin-shell": "2.2.1",
"@tauri-apps/plugin-updater": "2.7.1", "@tauri-apps/plugin-updater": "2.7.1",
"@tauri-apps/plugin-window-state": "^2.2.2", "@tauri-apps/plugin-window-state": "^2.4.0",
"@types/d3-shape": "^3.1.7", "@types/d3-shape": "^3.1.7",
"@types/json-schema": "^7.0.15", "@types/json-schema": "^7.0.15",
"ahooks": "^3.8.5", "ahooks": "^3.9.5",
"axios": "^1.9.0", "axios": "^1.12.2",
"chart.js": "^4.4.9", "chart.js": "^4.5.0",
"class-variance-authority": "^0.7.1", "class-variance-authority": "^0.7.1",
"cli-color": "^2.0.4", "cli-color": "^2.0.4",
"clsx": "^2.1.1", "clsx": "^2.1.1",
"cmdk": "^1.1.1", "cmdk": "^1.1.1",
"d3-shape": "^3.2.0", "d3-shape": "^3.2.0",
"dayjs": "1.11.13", "dayjs": "1.11.13",
"foxact": "^0.2.45", "foxact": "^0.2.49",
"framer-motion": "^12.23.12", "framer-motion": "^12.23.16",
"glob": "^11.0.2", "glob": "^11.0.3",
"i18next": "^25.2.1", "i18next": "^25.5.2",
"js-base64": "^3.7.7", "js-base64": "^3.7.8",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"lucide-react": "^0.514.0", "lucide-react": "^0.514.0",
@@ -85,26 +85,26 @@
"monaco-yaml": "^5.4.0", "monaco-yaml": "^5.4.0",
"nanoid": "^5.1.5", "nanoid": "^5.1.5",
"next-themes": "^0.4.6", "next-themes": "^0.4.6",
"peggy": "^5.0.3", "peggy": "^5.0.6",
"react": "19.1.0", "react": "19.1.0",
"react-chartjs-2": "^5.3.0", "react-chartjs-2": "^5.3.0",
"react-colorful": "^5.6.1", "react-colorful": "^5.6.1",
"react-dom": "19.1.0", "react-dom": "19.1.0",
"react-error-boundary": "6.0.0", "react-error-boundary": "6.0.0",
"react-hook-form": "^7.57.0", "react-hook-form": "^7.63.0",
"react-i18next": "15.5.2", "react-i18next": "15.5.2",
"react-markdown": "10.1.0", "react-markdown": "10.1.0",
"react-monaco-editor": "0.58.0", "react-monaco-editor": "0.58.0",
"react-router-dom": "7.6.2", "react-router-dom": "7.6.2",
"react-virtuoso": "^4.12.8", "react-virtuoso": "^4.14.0",
"sockette": "^2.0.6", "sockette": "^2.0.6",
"sonner": "^2.0.5", "sonner": "^2.0.7",
"swr": "^2.3.3", "swr": "^2.3.6",
"tailwind-merge": "^3.3.1", "tailwind-merge": "^3.3.1",
"tar": "^7.4.3", "tar": "^7.4.3",
"types-pac": "^1.0.3", "types-pac": "^1.0.3",
"zod": "^3.25.67", "zod": "^3.25.76",
"zustand": "^5.0.5" "zustand": "^5.0.8"
}, },
"devDependencies": { "devDependencies": {
"@actions/github": "^6.0.1", "@actions/github": "^6.0.1",
@@ -112,30 +112,30 @@
"@types/js-cookie": "^3.0.6", "@types/js-cookie": "^3.0.6",
"@types/js-yaml": "^4.0.9", "@types/js-yaml": "^4.0.9",
"@types/lodash-es": "^4.17.12", "@types/lodash-es": "^4.17.12",
"@types/node": "^24.0.0", "@types/node": "^24.5.2",
"@types/react": "19.1.6", "@types/react": "19.1.6",
"@types/react-dom": "19.1.6", "@types/react-dom": "19.1.6",
"@vitejs/plugin-legacy": "^6.1.1", "@vitejs/plugin-legacy": "^6.1.1",
"@vitejs/plugin-react": "4.5.1", "@vitejs/plugin-react": "4.5.1",
"adm-zip": "^0.5.16", "adm-zip": "^0.5.16",
"autoprefixer": "^10.4.21", "autoprefixer": "^10.4.21",
"commander": "^14.0.0", "commander": "^14.0.1",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"https-proxy-agent": "^7.0.6", "https-proxy-agent": "^7.0.6",
"husky": "^9.1.7", "husky": "^9.1.7",
"meta-json-schema": "^1.19.10", "meta-json-schema": "^1.19.13",
"node-fetch": "^3.3.2", "node-fetch": "^3.3.2",
"postcss": "^8.5.4", "postcss": "^8.5.6",
"prettier": "^3.5.3", "prettier": "^3.6.2",
"pretty-quick": "^4.2.2", "pretty-quick": "^4.2.2",
"sass": "^1.89.1", "sass": "^1.93.0",
"tailwindcss": "^4.1.11", "tailwindcss": "^4.1.13",
"terser": "^5.41.0", "terser": "^5.44.0",
"tw-animate-css": "^1.3.4", "tw-animate-css": "^1.3.8",
"typescript": "^5.8.3", "typescript": "^5.9.2",
"vite": "^6.3.5", "vite": "^6.3.6",
"vite-plugin-monaco-editor": "^1.1.0", "vite-plugin-monaco-editor": "^1.1.0",
"vite-plugin-svgr": "^4.3.0" "vite-plugin-svgr": "^4.5.0"
}, },
"prettier": { "prettier": {
"tabWidth": 2, "tabWidth": 2,
@@ -145,4 +145,4 @@
}, },
"type": "module", "type": "module",
"packageManager": "pnpm@9.13.2" "packageManager": "pnpm@9.13.2"
} }

2657
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

1951
src-tauri/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "koala-clash" name = "koala-clash"
version = "0.2.6" version = "0.2.7"
description = "koala clash" description = "koala clash"
authors = ["zzzgydi", "wonfen", "MystiPanda", "coolcoala"] authors = ["zzzgydi", "wonfen", "MystiPanda", "coolcoala"]
license = "GPL-3.0-only" license = "GPL-3.0-only"

View File

@@ -411,6 +411,7 @@ pub fn run() {
match event { match event {
tauri::WindowEvent::CloseRequested { api, .. } => { tauri::WindowEvent::CloseRequested { api, .. } => {
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
AppHandleManager::global().set_activation_policy_accessory();
if core::handle::Handle::global().is_exiting() { if core::handle::Handle::global().is_exiting() {
return; return;
} }

View File

@@ -1,5 +1,5 @@
{ {
"version": "0.2.6", "version": "0.2.7",
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"bundle": { "bundle": {
"active": true, "active": true,
@@ -11,9 +11,15 @@
"icons/icon.icns", "icons/icon.icns",
"icons/icon.ico" "icons/icon.ico"
], ],
"resources": ["resources", "resources/locales/*"], "resources": [
"resources",
"resources/locales/*"
],
"publisher": "Koala Clash", "publisher": "Koala Clash",
"externalBin": ["sidecar/koala-mihomo", "sidecar/koala-mihomo-alpha"], "externalBin": [
"sidecar/koala-mihomo",
"sidecar/koala-mihomo-alpha"
],
"copyright": "GNU General Public License v3.0", "copyright": "GNU General Public License v3.0",
"category": "DeveloperTool", "category": "DeveloperTool",
"shortDescription": "Koala Clash", "shortDescription": "Koala Clash",
@@ -40,18 +46,28 @@
}, },
"deep-link": { "deep-link": {
"desktop": { "desktop": {
"schemes": ["clash", "koala-clash"] "schemes": [
"clash",
"koala-clash"
]
} }
} }
}, },
"app": { "app": {
"security": { "security": {
"capabilities": ["desktop-capability", "migrated"], "capabilities": [
"desktop-capability",
"migrated"
],
"assetProtocol": { "assetProtocol": {
"scope": ["$APPDATA/**", "$RESOURCE/../**", "**"], "scope": [
"$APPDATA/**",
"$RESOURCE/../**",
"**"
],
"enable": true "enable": true
}, },
"csp": null "csp": null
} }
} }
} }

View File

@@ -2,7 +2,6 @@ import React, { useState, useEffect, useMemo, useCallback } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { cn } from "@root/lib/utils"; import { cn } from "@root/lib/utils";
// Компоненты и иконки
import { import {
Select, Select,
SelectContent, SelectContent,
@@ -18,15 +17,13 @@ import {
TooltipProvider, TooltipProvider,
TooltipTrigger, TooltipTrigger,
} from "@/components/ui/tooltip"; } from "@/components/ui/tooltip";
import { ChevronsUpDown, Timer, WholeWord } from "lucide-react"; import {AlertTriangle, ChevronsUpDown, Timer, WholeWord} from "lucide-react";
// Логика
import { useVerge } from "@/hooks/use-verge"; import { useVerge } from "@/hooks/use-verge";
import { useAppData } from "@/providers/app-data-provider"; import { useAppData } from "@/providers/app-data-provider";
import delayManager from "@/services/delay"; import delayManager from "@/services/delay";
import { updateProxy, deleteConnection } from "@/services/api"; import { updateProxy, deleteConnection } from "@/services/api";
// --- Типы и константы ---
const STORAGE_KEY_GROUP = "clash-verge-selected-proxy-group"; const STORAGE_KEY_GROUP = "clash-verge-selected-proxy-group";
const STORAGE_KEY_SORT_TYPE = "clash-verge-proxy-sort-type"; const STORAGE_KEY_SORT_TYPE = "clash-verge-proxy-sort-type";
const presetList = ["DIRECT", "REJECT", "REJECT-DROP", "PASS", "COMPATIBLE"]; const presetList = ["DIRECT", "REJECT", "REJECT-DROP", "PASS", "COMPATIBLE"];
@@ -40,7 +37,6 @@ interface IProxyGroup {
icon?: string; icon?: string;
} }
// --- Вспомогательная функция для цвета задержки ---
function getDelayColorClasses(delayValue: number): string { function getDelayColorClasses(delayValue: number): string {
if (delayValue < 0) { if (delayValue < 0) {
return "text-muted-foreground border-border"; return "text-muted-foreground border-border";
@@ -51,7 +47,6 @@ function getDelayColorClasses(delayValue: number): string {
return "text-green-600 border-green-500/40 dark:text-green-400 dark:border-green-400/30"; return "text-green-600 border-green-500/40 dark:text-green-400 dark:border-green-400/30";
} }
// --- Дочерний компонент для элемента списка с "живым" обновлением пинга ---
const ProxySelectItem = ({ const ProxySelectItem = ({
proxyName, proxyName,
groupName, groupName,
@@ -268,7 +263,6 @@ export const ProxySelectors: React.FC = () => {
})) }))
.filter((p: { name: string }) => p.name); .filter((p: { name: string }) => p.name);
// Удаляем дубли по имени прокси
const uniqueNames = new Set<string>(); const uniqueNames = new Set<string>();
options = rawOptions.filter((proxy: any) => { options = rawOptions.filter((proxy: any) => {
if (!uniqueNames.has(proxy.name)) { if (!uniqueNames.has(proxy.name)) {
@@ -306,11 +300,20 @@ export const ProxySelectors: React.FC = () => {
disabled={isGlobalMode || isDirectMode} disabled={isGlobalMode || isDirectMode}
> >
<SelectTrigger className="w-100"> <SelectTrigger className="w-100">
{isGlobalMode ? (
<div className="flex items-center gap-2 text-destructive">
<AlertTriangle className="h-4 w-4 text-destructive" />
<span className="font-medium text-sm">
{t("Global Mode Active")}
</span>
</div>
) : (
<div className="flex items-center gap-2 truncate"> <div className="flex items-center gap-2 truncate">
<span className="truncate"> <span className="truncate">
<SelectValue placeholder={t("Select a group...")} /> <SelectValue placeholder={t("Select a group...")} />
</span> </span>
</div> </div>
)}
</SelectTrigger> </SelectTrigger>
<SelectContent> <SelectContent>
{selectorGroups.map((group: IProxyGroup) => ( {selectorGroups.map((group: IProxyGroup) => (

View File

@@ -32,7 +32,6 @@ import { BaseSearchBox } from "../base/base-search-box";
import { showNotice } from "@/services/noticeService"; import { showNotice } from "@/services/noticeService";
import { cn } from "@root/lib/utils"; import { cn } from "@root/lib/utils";
// --- Компоненты shadcn/ui и иконки ---
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { import {
Dialog, Dialog,
@@ -85,7 +84,6 @@ import {
ArrowUpToLine, ArrowUpToLine,
} from "lucide-react"; } from "lucide-react";
// --- Вспомогательные функции, константы и валидаторы ---
const portValidator = (value: string): boolean => const portValidator = (value: string): boolean =>
/^(?:[1-9]\d{0,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/.test( /^(?:[1-9]\d{0,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/.test(
value, value,
@@ -109,7 +107,6 @@ interface Props {
onSave?: (prev?: string, curr?: string) => void; onSave?: (prev?: string, curr?: string) => void;
} }
// --- Новый компонент Combobox (одиночный выбор) ---
const Combobox = ({ const Combobox = ({
options, options,
value, value,
@@ -123,7 +120,7 @@ const Combobox = ({
}) => { }) => {
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
return ( return (
<Popover open={open} onOpenChange={setOpen}> <Popover open={open} onOpenChange={setOpen} modal={true}>
<PopoverTrigger asChild> <PopoverTrigger asChild>
<Button <Button
variant="outline" variant="outline"
@@ -168,7 +165,6 @@ const Combobox = ({
); );
}; };
// --- Новый компонент MultiSelectCombobox (множественный выбор) ---
const MultiSelectCombobox = ({ const MultiSelectCombobox = ({
options, options,
value, value,
@@ -194,7 +190,7 @@ const MultiSelectCombobox = ({
}; };
return ( return (
<Popover open={open} onOpenChange={setOpen}> <Popover open={open} onOpenChange={setOpen} modal={true}>
<PopoverTrigger asChild> <PopoverTrigger asChild>
<Button <Button
variant="outline" variant="outline"
@@ -246,7 +242,6 @@ const MultiSelectCombobox = ({
); );
}; };
// --- Новый компонент для элемента списка групп ---
const EditorGroupItem = ({ const EditorGroupItem = ({
type, type,
group, group,
@@ -407,22 +402,6 @@ export const GroupsEditorViewer = (props: Props) => {
} }
}; };
useEffect(() => {
if (currData === "" || !visualization) return;
try {
let obj = yaml.load(currData) as {
prepend: [];
append: [];
delete: [];
} | null;
setPrependSeq(obj?.prepend || []);
setAppendSeq(obj?.append || []);
setDeleteSeq(obj?.delete || []);
} catch (e) {
/* Ignore parsing errors while typing */
}
}, [visualization, currData]);
useEffect(() => { useEffect(() => {
if (prependSeq && appendSeq && deleteSeq && visualization) { if (prependSeq && appendSeq && deleteSeq && visualization) {
const serialize = () => { const serialize = () => {
@@ -580,9 +559,8 @@ export const GroupsEditorViewer = (props: Props) => {
{visualization ? ( {visualization ? (
<Form {...form}> <Form {...form}>
<form className="h-full flex gap-4"> <form className="h-full flex gap-4">
{/* Левая панель: Конструктор групп */}
<div className="w-1/2 flex flex-col border rounded-md p-4"> <div className="w-1/2 flex flex-col border rounded-md p-4">
<h3 className="text-lg font-medium mb-4">Constructor</h3> <h3 className="text-lg font-medium mb-4">{t("Constructor")}</h3>
<Separator className="mb-4" /> <Separator className="mb-4" />
<div className="space-y-3 overflow-y-auto p-1 -mr-3 "> <div className="space-y-3 overflow-y-auto p-1 -mr-3 ">
<FormField <FormField

View File

@@ -680,5 +680,10 @@
"Template without RU Rules": "Without-ru template", "Template without RU Rules": "Without-ru template",
"Stopping Core...": "Stopping Core...", "Stopping Core...": "Stopping Core...",
"Uninstalling Service...": "Uninstalling Service...", "Uninstalling Service...": "Uninstalling Service...",
"Try running core as Sidecar...": "Try running core as Sidecar..." "Try running core as Sidecar...": "Try running core as Sidecar...",
"Global Mode Active": "Global Mode Active",
"Update Interval (mins)": "Update Interval (mins)",
"Profile Name": "Profile Name",
"Profile Description": "Profile Description",
"Constructor": "Group constructor"
} }

View File

@@ -680,5 +680,10 @@
"Template without RU Rules": "Шаблон without-ru", "Template without RU Rules": "Шаблон without-ru",
"Stopping Core...": "Остановка ядра...", "Stopping Core...": "Остановка ядра...",
"Uninstalling Service...": "Удаление сервиса...", "Uninstalling Service...": "Удаление сервиса...",
"Try running core as Sidecar...": "Попытка запустить ядро как Sidecar..." "Try running core as Sidecar...": "Попытка запустить ядро как Sidecar...",
"Global Mode Active": "Глобальный режим активен",
"Update Interval (mins)": "Интервал обновления (в минутах)",
"Profile Name": "Имя профиля",
"Profile Description": "Описание профиля",
"Constructor": "Конструктор групп"
} }