Rename hostnamePort to hostAndPort

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
Sebastian Martinez
2023-06-14 16:19:05 +02:00
parent 52cece4680
commit 4df9810088
15 changed files with 78 additions and 75 deletions
+2 -2
View File
@@ -120,7 +120,7 @@
route={{
resource: "seeds",
params: {
hostnamePort: httpd.api.hostnamePort,
hostAndPort: httpd.api.hostAndPort,
projectPageIndex: 0,
},
}}>
@@ -152,7 +152,7 @@
route={{
resource: "seeds",
params: {
hostnamePort: httpd.api.hostnamePort,
hostAndPort: httpd.api.hostAndPort,
projectPageIndex: 0,
},
}}>
+4 -3
View File
@@ -6,7 +6,7 @@
import * as modal from "@app/lib/modal";
import * as router from "@app/lib/router";
import { searchPlaceholder } from "@app/lib/shared";
import { unreachable } from "@app/lib/utils";
import { getHostAndPort, unreachable } from "@app/lib/utils";
import Icon from "@app/components/Icon.svelte";
import SearchResultsModal from "@app/App/Header/SearchResultsModal.svelte";
@@ -47,13 +47,14 @@
} else if (searchResult.type === "projects") {
input = "";
if (searchResult.results.length === 1) {
const { project, baseUrl } = searchResult.results[0];
void router.push({
resource: "projects",
params: {
view: { resource: "tree" },
id: searchResult.results[0].project.id,
id: project.id,
peer: undefined,
hostnamePort: searchResult.results[0].baseUrl.hostname,
hostAndPort: getHostAndPort(baseUrl),
hash: undefined,
search: undefined,
},
+2 -2
View File
@@ -2,7 +2,7 @@
import type { ProjectBaseUrl } from "@app/lib/search";
import * as modal from "@app/lib/modal";
import { formatRepositoryId } from "@app/lib/utils";
import { formatRepositoryId, getHostAndPort } from "@app/lib/utils";
import Link from "@app/components/Link.svelte";
import Modal from "@app/components/Modal.svelte";
@@ -40,7 +40,7 @@
resource: "projects",
params: {
view: { resource: "tree" },
hostnamePort: result.baseUrl.hostname,
hostAndPort: getHostAndPort(result.baseUrl),
id: result.project.id,
},
}}>