Skip to content

Commit d729e17

Browse files
committed
fix url for metacubexd
1 parent 4ded822 commit d729e17

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { GiEgyptianBird } from "react-icons/gi";
2020
import { Subscriptions, About, Debug } from "./pages";
2121

2222
import * as backend from "./backend/backend";
23-
import axios from "axios";
2423

2524
import { ApiCallBackend, PyBackend, EnhancedMode } from "./backend";
2625
import { ActionButtonItem, VersionComponent } from "./components";
@@ -38,7 +37,7 @@ let current_dashboard = "";
3837
let allow_remote_access = false;
3938
let _secret = "";
4039

41-
const Content: FC<{}> = ({}) => {
40+
const Content: FC<{}> = ({ }) => {
4241
if (!usdplReady) {
4342
return <PanelSection>Init...</PanelSection>;
4443
}
@@ -271,6 +270,7 @@ const Content: FC<{}> = ({}) => {
271270
if (currentDashboard_name) {
272271
param = `/${currentDashboard_name}/#`;
273272
if (secret) {
273+
// secret 不为空时,使用完整的参数,但是不同 dashboard 使用不同的 page
274274
switch (currentDashboard_name) {
275275
case "metacubexd":
276276
case "zashboard":
@@ -281,6 +281,9 @@ const Content: FC<{}> = ({}) => {
281281
break;
282282
}
283283
param += `/${page}?hostname=127.0.0.1&port=9090&secret=${secret}`;
284+
} else if (currentDashboard_name == "metacubexd") {
285+
// 即使没有设置 secret,metacubexd 也会有奇怪的跳转问题,加上host和port
286+
param += `/${page}?hostname=127.0.0.1&port=9090`;
284287
}
285288
}
286289
Navigation.NavigateToExternalWeb(

0 commit comments

Comments
 (0)