fix: list every discovered dev server on the phone, like the web
The web client's "running dev servers" list is machine-wide. The phone filtered it to the current project's directory, which hid servers from other checkouts (for example the telegram-antispam-bot server on 8080). The empty state now shows the same set of ports that answered with a web page, regardless of their project, and still hides the non-web ports the web client puts behind "show hidden ports". Version 0.7.2+702.
This commit is contained in:
1 parent
695d27cdd7
commit
b372bce63f
4 files changed
+16
-10
No files matched your search
@@ -5,6 +5,15 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 0.7.2 开发服务器列表改为全机器范围(分支 `flutter`)
|
||||||
|
|
||||||
|
| 项 | 结果 |
|
||||||
|
| --- | --- |
|
||||||
|
| 列表 | 网页端的「正在运行的开发服务器」是整台宿主机的列表,不按当前项目过滤;手机端之前多了一层「当前项目目录」过滤,导致 `telegram-antispam-bot` 的 8080 在手机上不显示。现在同样列出服务端发现的所有「返回了网页」的端口(无页面的 adb/模拟器端口仍隐藏),与网页端一致 |
|
||||||
|
| 版本 | **0.7.2(code 702)** |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 0.7.1 浏览器通过服务端 dev tunnel 预览(分支 `flutter`)
|
## 0.7.1 浏览器通过服务端 dev tunnel 预览(分支 `flutter`)
|
||||||
|
|
||||||
| 项 | 结果 |
|
| 项 | 结果 |
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ Android first. This branch (`flutter`) is a framework evaluation: the same
|
|||||||
feature set as the earlier Asuka/Go and MyGo attempts, reimplemented in
|
feature set as the earlier Asuka/Go and MyGo attempts, reimplemented in
|
||||||
Flutter to compare mobile UI maturity.
|
Flutter to compare mobile UI maturity.
|
||||||
|
|
||||||
Status: 0.7.1 — servers (passwordless / password login, HTTP/HTTPS and
|
Status: 0.7.2 — servers (passwordless / password login, HTTP/HTTPS and
|
||||||
SOCKS5/socks5h proxy, self-signed certificates and pinning, or a pairing link
|
SOCKS5/socks5h proxy, self-signed certificates and pinning, or a pairing link
|
||||||
over the OpenChamber private relay with end-to-end encryption; the pairing
|
over the OpenChamber private relay with end-to-end encryption; the pairing
|
||||||
link is pasted or scanned with the camera), session list with search and live
|
link is pasted or scanned with the camera), session list with search and live
|
||||||
|
|||||||
@@ -181,16 +181,13 @@ class _BrowserPanelState extends State<BrowserPanel> {
|
|||||||
try {
|
try {
|
||||||
final list = await cl.devServers(directory: widget.directory);
|
final list = await cl.devServers(directory: widget.directory);
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
final dir = slashPath(widget.directory);
|
// The web client's "running dev servers" list is machine-wide, not
|
||||||
|
// scoped to the open project, so show the same set here. Only ports
|
||||||
|
// that answered with a page (the web client hides the rest behind
|
||||||
|
// "show hidden ports") are listed.
|
||||||
final filtered = [
|
final filtered = [
|
||||||
for (final server in list)
|
for (final server in list)
|
||||||
// A discovered port that answered with a page is a web dev server;
|
if (server.title.isNotEmpty) server,
|
||||||
// adb/emulator/native ports with no page would only be noise.
|
|
||||||
if (server.title.isNotEmpty &&
|
|
||||||
(server.directory.isEmpty ||
|
|
||||||
slashPath(server.directory) == dir ||
|
|
||||||
isUnderDirectory(server.directory, dir)))
|
|
||||||
server,
|
|
||||||
]..sort((a, b) => a.port.compareTo(b.port));
|
]..sort((a, b) => a.port.compareTo(b.port));
|
||||||
setState(() {
|
setState(() {
|
||||||
_servers = filtered;
|
_servers = filtered;
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ name: openchamber
|
|||||||
description: "A lightweight OpenChamber client for phones."
|
description: "A lightweight OpenChamber client for phones."
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 0.7.1+701
|
version: 0.7.2+702
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.14.0
|
sdk: ^3.14.0
|
||||||
|
|||||||
Reference in new issue
Block a user