mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 02:00:31 +08:00
Fix mixed content warning when connecting to local node
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
+1
-1
@@ -278,7 +278,7 @@ export function extractHost(origin: string): Host {
|
||||
origin === "127.0.0.1" ||
|
||||
origin === "127.0.0.1:8080"
|
||||
) {
|
||||
return { host: "0.0.0.0", port: 8080, scheme: "http" };
|
||||
return { host: "127.0.0.1", port: 8080, scheme: "http" };
|
||||
} else if (origin.includes(":")) {
|
||||
return {
|
||||
host: origin.split(":")[0],
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
<script lang="ts">
|
||||
import type { Host } from "@app/lib/api";
|
||||
|
||||
import Clipboard from "@app/components/Clipboard.svelte";
|
||||
import Floating from "@app/components/Floating.svelte";
|
||||
import { closeFocused } from "@app/components/Floating.svelte";
|
||||
import { parseRepositoryId } from "@app/lib/utils";
|
||||
|
||||
export let seedHost: string;
|
||||
export let seedHost: Host;
|
||||
export let id: string;
|
||||
export let name: string;
|
||||
|
||||
$: radCloneUrl = `rad clone ${id}`;
|
||||
$: gitCloneUrl = `git clone https://${seedHost}/${
|
||||
parseRepositoryId(id)?.pubkey ?? id
|
||||
}.git ${name}`;
|
||||
$: gitCloneUrl = `git clone ${seedHost.scheme}://${seedHost.host}:${
|
||||
seedHost.port
|
||||
}/${parseRepositoryId(id)?.pubkey ?? id}.git ${name}`;
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
on:branchChanged={event => updateRevision(event.detail)} />
|
||||
|
||||
{#if seed.addr.host}
|
||||
<CloneButton seedHost={seed.addr.host} {id} name={project.name} />
|
||||
<CloneButton seedHost={seed.addr} {id} name={project.name} />
|
||||
{/if}
|
||||
|
||||
<span>
|
||||
|
||||
Reference in New Issue
Block a user