feat: add LAN access configuration for desktop app, allowing users to enable public API access with corresponding UI updates and translations

This commit is contained in:
wizardchen
2026-04-11 16:34:40 +08:00
committed by lyingbug
parent d99e2cbac3
commit dfaaa62f14
14 changed files with 421 additions and 558 deletions
+12
View File
@@ -1987,6 +1987,18 @@ export default {
desktopPortSaved: 'Saved. Restart the app for it to take effect.',
desktopPortSaveFailed: 'Save failed',
desktopPortInvalid: 'Enter a port between 0 and 65535',
desktopBindPublicLabel: 'Allow LAN access to the API',
desktopBindPublicDescription:
'When enabled, the embedded server listens on 0.0.0.0 so other devices on your LAN can reach the API via the address below. This increases exposure—use host firewalls and routing rules as needed. Restart the app after changing this.',
desktopBindPublicSaved: 'Saved. Restart the app for it to take effect.',
desktopBindPublicSaveFailed: 'Save failed',
lanUrlLabel: 'LAN API base URL',
lanUrlDescription:
'Shown after “Allow LAN access” is on and the app has restarted. If the IP is wrong, replace the host with your machine’s IPv4 from system network settings.',
lanUrlCopyTitle: 'Copy LAN API URL',
lanUrlCopySuccess: 'LAN API URL copied',
lanUrlUnavailable:
'The API is listening on all interfaces, but no LAN IPv4 could be detected automatically. Find your IPv4 in network settings and build http://YOUR_IP:PORT/api/v1 manually.',
}
},
system: {
+13
View File
@@ -1435,8 +1435,21 @@ export default {
desktopPortSaved: "저장되었습니다. 적용하려면 앱을 다시 시작하세요.",
desktopPortSaveFailed: "저장 실패",
desktopPortInvalid: "0~65535 사이의 포트를 입력하세요",
desktopBindPublicLabel: "Allow LAN access to the API",
desktopBindPublicDescription:
"When enabled, the embedded server listens on 0.0.0.0 so other devices on your LAN can reach the API via the address below. This increases exposure—use host firewalls and routing rules as needed. Restart the app after changing this.",
desktopBindPublicSaved: "Saved. Restart the app for it to take effect.",
desktopBindPublicSaveFailed: "Save failed",
lanUrlLabel: "LAN API base URL",
lanUrlDescription:
"Shown after \"Allow LAN access\" is on and the app has restarted. If the IP is wrong, replace the host with your machine IPv4 from system network settings.",
lanUrlCopyTitle: "Copy LAN API URL",
lanUrlCopySuccess: "LAN API URL copied",
lanUrlUnavailable:
"The API is listening on all interfaces, but no LAN IPv4 could be detected automatically. Find your IPv4 in network settings and build http://YOUR_IP:PORT/api/v1 manually.",
},
},
system: {
title: "시스템 정보",
sectionDescription: "시스템 버전 정보 및 사용자 계정 설정 보기",
+12
View File
@@ -1282,6 +1282,18 @@ export default {
desktopPortSaved: 'Сохранено. Перезапустите приложение, чтобы применить.',
desktopPortSaveFailed: 'Не удалось сохранить',
desktopPortInvalid: 'Введите порт от 0 до 65535',
desktopBindPublicLabel: 'Разрешить доступ к API в LAN',
desktopBindPublicDescription:
'Встроенный сервер слушает 0.0.0.0 — другие устройства в локальной сети смогут обращаться к API по адресу ниже. Риски доступа выше; настройте брандмауэр и маршрутизацию. После изменения перезапустите приложение.',
desktopBindPublicSaved: 'Сохранено. Перезапустите приложение, чтобы применить.',
desktopBindPublicSaveFailed: 'Не удалось сохранить',
lanUrlLabel: 'Базовый URL API для LAN',
lanUrlDescription:
'Отображается после включения доступа в LAN и перезапуска. Если IP неверный, подставьте IPv4 из сетевых настроек системы.',
lanUrlCopyTitle: 'Копировать LAN URL API',
lanUrlCopySuccess: 'LAN URL API скопирован',
lanUrlUnavailable:
'API слушает все интерфейсы, но LAN IPv4 не удалось определить автоматически. Узнайте IPv4 в настройках сети и соберите http://ВАШ_IP:ПОРТ/api/v1 вручную.',
}
},
system: {
+12
View File
@@ -1429,6 +1429,18 @@ export default {
desktopPortSaved: "已保存,请重启应用后生效",
desktopPortSaveFailed: "保存失败",
desktopPortInvalid: "请输入 0–65535 之间的端口",
desktopBindPublicLabel: "允许局域网访问 API",
desktopBindPublicDescription:
"开启后内嵌服务监听 0.0.0.0,同一局域网内其他设备可通过下方地址调用 API。存在数据暴露风险,请在防火墙与路由侧自行做好访问控制;修改后需重启应用。",
desktopBindPublicSaved: "已保存,请重启应用后生效",
desktopBindPublicSaveFailed: "保存失败",
lanUrlLabel: "局域网 API 地址",
lanUrlDescription:
"在已开启「允许局域网访问」且应用已重启后显示;若 IP 不准确,请在本机网络设置中查看实际 IPv4 后替换主机部分。",
lanUrlCopyTitle: "复制局域网 API 地址",
lanUrlCopySuccess: "局域网 API 地址已复制",
lanUrlUnavailable:
"当前已监听所有网卡,但未能自动识别本机 IPv4。请在本机网络设置中查看局域网地址,并手动拼接为 http://你的IP:端口/api/v1。",
},
},
system: {