mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00:30 +08:00
Compare commits
2 Commits
4f5af4ee30
...
d8fdbebc4b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8fdbebc4b | ||
|
|
96ef2d2bbc |
@ -433,15 +433,19 @@ export async function createWindow(): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function triggerMainWindow(): void {
|
export function triggerMainWindow(force?: boolean): void {
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
getAppConfig()
|
getAppConfig()
|
||||||
.then(({ triggerMainWindowBehavior = 'show' }) => {
|
.then(({ triggerMainWindowBehavior = 'toggle' }) => {
|
||||||
if (triggerMainWindowBehavior === 'toggle' && mainWindow?.isVisible()) {
|
if (force === true || triggerMainWindowBehavior === 'toggle') {
|
||||||
|
if (mainWindow?.isVisible()) {
|
||||||
closeMainWindow()
|
closeMainWindow()
|
||||||
} else {
|
} else {
|
||||||
showMainWindow()
|
showMainWindow()
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
showMainWindow()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(showMainWindow)
|
.catch(showMainWindow)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,7 @@ export async function registerShortcut(
|
|||||||
switch (action) {
|
switch (action) {
|
||||||
case 'showWindowShortcut': {
|
case 'showWindowShortcut': {
|
||||||
return globalShortcut.register(newShortcut, () => {
|
return globalShortcut.register(newShortcut, () => {
|
||||||
triggerMainWindow()
|
triggerMainWindow(true)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
case 'showFloatingWindowShortcut': {
|
case 'showFloatingWindowShortcut': {
|
||||||
|
|||||||
@ -169,6 +169,7 @@
|
|||||||
"mihomo.socksPort": "Socks Port",
|
"mihomo.socksPort": "Socks Port",
|
||||||
"mihomo.httpPort": "Http Port",
|
"mihomo.httpPort": "Http Port",
|
||||||
"mihomo.redirPort": "Redir Port",
|
"mihomo.redirPort": "Redir Port",
|
||||||
|
"mihomo.tproxyPort": "Tproxy Port",
|
||||||
"mihomo.externalController": "External Controller Address",
|
"mihomo.externalController": "External Controller Address",
|
||||||
"mihomo.externalControllerSecret": "External Controller Secret",
|
"mihomo.externalControllerSecret": "External Controller Secret",
|
||||||
"mihomo.ipv6": "IPv6",
|
"mihomo.ipv6": "IPv6",
|
||||||
|
|||||||
@ -147,6 +147,7 @@
|
|||||||
"mihomo.socksPort": "پورت Socks",
|
"mihomo.socksPort": "پورت Socks",
|
||||||
"mihomo.httpPort": "پورت Http",
|
"mihomo.httpPort": "پورت Http",
|
||||||
"mihomo.redirPort": "پورت Redir",
|
"mihomo.redirPort": "پورت Redir",
|
||||||
|
"mihomo.tproxyPort": "پورت Tproxy",
|
||||||
"mihomo.externalController": "آدرس کنترلکننده خارجی",
|
"mihomo.externalController": "آدرس کنترلکننده خارجی",
|
||||||
"mihomo.externalControllerSecret": "رمز کنترلکننده خارجی",
|
"mihomo.externalControllerSecret": "رمز کنترلکننده خارجی",
|
||||||
"mihomo.ipv6": "IPv6",
|
"mihomo.ipv6": "IPv6",
|
||||||
|
|||||||
@ -147,6 +147,7 @@
|
|||||||
"mihomo.socksPort": "Порт Socks",
|
"mihomo.socksPort": "Порт Socks",
|
||||||
"mihomo.httpPort": "Порт Http",
|
"mihomo.httpPort": "Порт Http",
|
||||||
"mihomo.redirPort": "Порт Redir",
|
"mihomo.redirPort": "Порт Redir",
|
||||||
|
"mihomo.tproxyPort": "Порт Tproxy",
|
||||||
"mihomo.externalController": "Адрес внешнего контроллера",
|
"mihomo.externalController": "Адрес внешнего контроллера",
|
||||||
"mihomo.externalControllerSecret": "Секрет внешнего контроллера",
|
"mihomo.externalControllerSecret": "Секрет внешнего контроллера",
|
||||||
"mihomo.ipv6": "IPv6",
|
"mihomo.ipv6": "IPv6",
|
||||||
|
|||||||
@ -169,6 +169,7 @@
|
|||||||
"mihomo.socksPort": "Socks 端口",
|
"mihomo.socksPort": "Socks 端口",
|
||||||
"mihomo.httpPort": "Http 端口",
|
"mihomo.httpPort": "Http 端口",
|
||||||
"mihomo.redirPort": "Redir 端口",
|
"mihomo.redirPort": "Redir 端口",
|
||||||
|
"mihomo.tproxyPort": "Tproxy 端口",
|
||||||
"mihomo.externalController": "外部控制地址",
|
"mihomo.externalController": "外部控制地址",
|
||||||
"mihomo.externalControllerSecret": "外部控制访问密钥",
|
"mihomo.externalControllerSecret": "外部控制访问密钥",
|
||||||
"mihomo.ipv6": "IPv6",
|
"mihomo.ipv6": "IPv6",
|
||||||
|
|||||||
@ -733,7 +733,7 @@ const Mihomo: React.FC = () => {
|
|||||||
</SettingItem>
|
</SettingItem>
|
||||||
)}
|
)}
|
||||||
{platform === 'linux' && (
|
{platform === 'linux' && (
|
||||||
<SettingItem title="TProxy 端口" divider>
|
<SettingItem title={t('mihomo.tproxyPort')} divider>
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
{tproxyPortInput !== tproxyPort && (
|
{tproxyPortInput !== tproxyPort && (
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user