feat: datasource

This commit is contained in:
tao.chen
2026-08-13 20:13:37 +08:00
parent 0b5b50edb9
commit 462617b66d
9 changed files with 601 additions and 14 deletions
+5 -4
View File
@@ -18,17 +18,18 @@ import { bindSchedulesApi } from "../features/schedules/state/schedulesStore";
import "../styles/platform.css";
type ActivePage = "home" | "scripts" | "schedules" | "system";
type ActivePage = "home" | "scripts" | "data-resources" | "schedules" | "system";
function pageFromPath(pathname: string): ActivePage {
const page = pathname.replace(/^\/+|\/+$/g, "");
return ["scripts", "schedules", "system"].includes(page)
return ["scripts", "data-resources", "schedules", "system"].includes(page)
? (page as ActivePage)
: "home";
}
function pathForPage(page: ActivePage): string {
return page === "home" ? "/workbench" : `/${page}`;
if (page === "home") return "/workbench";
return `/${page}`;
}
export function meta({}: Route.MetaArgs) {
@@ -137,4 +138,4 @@ function AuthenticatedLayout() {
<Toast toast={toast} />
</div>
);
}
}