Compare commits

..

No commits in common. "d8fdbebc4b653fa40dd5d537af8a5782fd658cbc" and "4f5af4ee30f3c65f1f927f3cde569b6402dc82c8" have entirely different histories.

7 changed files with 6 additions and 14 deletions

View File

@ -433,16 +433,12 @@ export async function createWindow(): Promise<void> {
}
}
export function triggerMainWindow(force?: boolean): void {
export function triggerMainWindow(): void {
if (mainWindow) {
getAppConfig()
.then(({ triggerMainWindowBehavior = 'toggle' }) => {
if (force === true || triggerMainWindowBehavior === 'toggle') {
if (mainWindow?.isVisible()) {
closeMainWindow()
} else {
showMainWindow()
}
.then(({ triggerMainWindowBehavior = 'show' }) => {
if (triggerMainWindowBehavior === 'toggle' && mainWindow?.isVisible()) {
closeMainWindow()
} else {
showMainWindow()
}

View File

@ -27,7 +27,7 @@ export async function registerShortcut(
switch (action) {
case 'showWindowShortcut': {
return globalShortcut.register(newShortcut, () => {
triggerMainWindow(true)
triggerMainWindow()
})
}
case 'showFloatingWindowShortcut': {

View File

@ -169,7 +169,6 @@
"mihomo.socksPort": "Socks Port",
"mihomo.httpPort": "Http Port",
"mihomo.redirPort": "Redir Port",
"mihomo.tproxyPort": "Tproxy Port",
"mihomo.externalController": "External Controller Address",
"mihomo.externalControllerSecret": "External Controller Secret",
"mihomo.ipv6": "IPv6",

View File

@ -147,7 +147,6 @@
"mihomo.socksPort": "پورت Socks",
"mihomo.httpPort": "پورت Http",
"mihomo.redirPort": "پورت Redir",
"mihomo.tproxyPort": "پورت Tproxy",
"mihomo.externalController": "آدرس کنترل‌کننده خارجی",
"mihomo.externalControllerSecret": "رمز کنترل‌کننده خارجی",
"mihomo.ipv6": "IPv6",

View File

@ -147,7 +147,6 @@
"mihomo.socksPort": "Порт Socks",
"mihomo.httpPort": "Порт Http",
"mihomo.redirPort": "Порт Redir",
"mihomo.tproxyPort": "Порт Tproxy",
"mihomo.externalController": "Адрес внешнего контроллера",
"mihomo.externalControllerSecret": "Секрет внешнего контроллера",
"mihomo.ipv6": "IPv6",

View File

@ -169,7 +169,6 @@
"mihomo.socksPort": "Socks 端口",
"mihomo.httpPort": "Http 端口",
"mihomo.redirPort": "Redir 端口",
"mihomo.tproxyPort": "Tproxy 端口",
"mihomo.externalController": "外部控制地址",
"mihomo.externalControllerSecret": "外部控制访问密钥",
"mihomo.ipv6": "IPv6",

View File

@ -733,7 +733,7 @@ const Mihomo: React.FC = () => {
</SettingItem>
)}
{platform === 'linux' && (
<SettingItem title={t('mihomo.tproxyPort')} divider>
<SettingItem title="TProxy 端口" divider>
<div className="flex">
{tproxyPortInput !== tproxyPort && (
<Button