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