mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 18:20:30 +08:00
Allow track and untrack of a project through the TrackButton
- Add support for checking the tracking table from `radicle-httpd` to get a more precise information if the project is being tracked by the local node. - If a user isn't authenticated with their local httpd instance, we still show the Popover to explain how to do it on the CLI
This commit is contained in:
@@ -5,11 +5,11 @@
|
||||
import IconSmall from "@app/components/IconSmall.svelte";
|
||||
import Popover from "@app/components/Popover.svelte";
|
||||
|
||||
export let disabled: boolean;
|
||||
export let projectId: string;
|
||||
export let seedCount: number;
|
||||
export let seeding: boolean;
|
||||
|
||||
$: buttonTitle = seeding ? "Seeding" : "Seed";
|
||||
export let editSeeding: (() => Promise<void>) | undefined;
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@@ -30,14 +30,21 @@
|
||||
|
||||
<Popover popoverPositionTop="3rem" popoverPositionRight="0">
|
||||
<Button
|
||||
{disabled}
|
||||
slot="toggle"
|
||||
let:toggle
|
||||
on:click={toggle}
|
||||
on:click={async () => {
|
||||
if (editSeeding) {
|
||||
await editSeeding();
|
||||
} else {
|
||||
toggle();
|
||||
}
|
||||
}}
|
||||
size="large"
|
||||
variant={seeding ? "secondary-toggle-on" : "secondary-toggle-off"}>
|
||||
<IconSmall name="network" />
|
||||
<span>
|
||||
{buttonTitle}
|
||||
{seeding ? "Seeding" : "Seed"}
|
||||
<span style:font-weight="var(--font-weight-regular)">
|
||||
{seedCount}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user