mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-20 22:00:43 +08:00
Add experimental switch in settings
Hide all read/write functionality behind this setting.
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
<script>
|
||||
import Command from "./Command.svelte";
|
||||
import { experimental } from "@app/lib/appearance";
|
||||
import { api, httpdStore } from "@app/lib/httpd";
|
||||
import { routeToPath, activeUnloadedRouteStore } from "@app/lib/router";
|
||||
|
||||
import Command from "@app/components/Command.svelte";
|
||||
import ExternalLink from "./ExternalLink.svelte";
|
||||
|
||||
$: path = routeToPath($activeUnloadedRouteStore);
|
||||
$: pathParam = path === "/" ? "" : `--path "${path}"`;
|
||||
</script>
|
||||
@@ -30,25 +33,41 @@
|
||||
</style>
|
||||
|
||||
<div>
|
||||
{#if $httpdStore.state === "running"}
|
||||
<div class="label">Authenticate with your local node to make changes.</div>
|
||||
<Command
|
||||
fullWidth
|
||||
command={`rad web ${window.origin} --connect ${api.hostname}:${api.port} ${pathParam}`} />
|
||||
{#if $experimental}
|
||||
{#if $httpdStore.state === "running"}
|
||||
<div class="label">
|
||||
Authenticate with your local node to make changes.
|
||||
</div>
|
||||
<Command
|
||||
fullWidth
|
||||
command={`rad web ${window.origin} --connect ${api.hostname}:${api.port} ${pathParam}`} />
|
||||
{:else}
|
||||
<div class="heading">Connect & Authenticate</div>
|
||||
<div class="label">
|
||||
Connect to your local node to browse projects on your local machine,
|
||||
create issues, and participate in discussions.
|
||||
</div>
|
||||
<Command fullWidth command={`rad web ${window.origin} ${pathParam}`} />
|
||||
|
||||
<div class="divider" />
|
||||
<div class="heading">New to Radicle?</div>
|
||||
<div class="label">
|
||||
Visit <ExternalLink href="https://radicle.xyz/#try" /> to download Radicle
|
||||
and get started.
|
||||
</div>
|
||||
{/if}
|
||||
{:else}
|
||||
<div class="heading">Connect & Authenticate</div>
|
||||
<div class="heading">Browse your local projects</div>
|
||||
<div class="label">
|
||||
Connect to your local node to browse projects on your local machine,
|
||||
create issues, and participate in discussions.
|
||||
To browse projects on your local node, run the following command.
|
||||
</div>
|
||||
<Command fullWidth command={`rad web ${window.origin} ${pathParam}`} />
|
||||
<Command fullWidth command="radicle-httpd" />
|
||||
|
||||
<div class="divider" />
|
||||
<div class="heading">New to Radicle?</div>
|
||||
<div class="label">
|
||||
Run the following command and follow the instructions to install Radicle
|
||||
Visit <ExternalLink href="https://radicle.xyz/#try" /> to download Radicle
|
||||
and get started.
|
||||
</div>
|
||||
<Command fullWidth command="curl -sSf https://radicle.xyz/install | sh" />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -25,16 +25,23 @@
|
||||
|
||||
<div class="reactions">
|
||||
{#each reactions as { emoji, authors }}
|
||||
<IconButton
|
||||
on:click={async () => {
|
||||
if (handleReaction) {
|
||||
await handleReaction(authors, emoji);
|
||||
}
|
||||
}}>
|
||||
<div class="reaction txt-tiny">
|
||||
{#if handleReaction}
|
||||
<IconButton
|
||||
on:click={async () => {
|
||||
if (handleReaction) {
|
||||
await handleReaction(authors, emoji);
|
||||
}
|
||||
}}>
|
||||
<div class="reaction txt-tiny">
|
||||
<span>{emoji}</span>
|
||||
<span title={authors.join("\n")}>{authors.length}</span>
|
||||
</div>
|
||||
</IconButton>
|
||||
{:else}
|
||||
<div class="reaction txt-tiny" style="padding: 2px 4px;">
|
||||
<span>{emoji}</span>
|
||||
<span title={authors.join("\n")}>{authors.length}</span>
|
||||
</div>
|
||||
</IconButton>
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user