Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Hide anchored widget behind a feature flag
Alexis Sellier committed 3 years ago
commit 115934a38cf92f891a9a426b84697049ba94e871
parent d8a943951d72a172328c9fe7f9fb0f7153a29441
3 files changed +11 -9
modified cypress/e2e/project.spec.ts
@@ -88,7 +88,6 @@ describe("Project view", () => {
    cy.get("div.stat.seed span").should("have.text", "willow.radicle.garden");
    cy.get("div.stat.commit-count").should("have.text", "3 commit(s)");
    cy.get("div.stat.contributor-count").should("have.text", "1 contributor(s)");
-
    cy.get("div.anchor span.anchor-label").contains("not anchored 🔓");
    cy.get("div.stat.branch").should("have.class", "not-allowed").should("have.text", "main");
    cy.get("div.hash.desktop").should("have.text", "56e4e02");
    cy.get("div.clone").click();
modified src/base/projects/Header.svelte
@@ -15,6 +15,7 @@
  export let tree: Tree;
  export let commit: string;
  export let browserStore: Writable<Browser>;
+
  export let noAnchor = false;

  let { urn, peers, branches, seed, anchors } = project;

@@ -151,13 +152,15 @@
    bind:branchesDropdown={dropdownState.branch}
    on:branchChanged={(event) => updateRevision(event.detail)} />

-
  <div class="anchor widget">
-
    <AnchorBadge
-
      {commit}
-
      {anchors}
-
      head={project.head}
-
      on:click={(event) => updateRevision(event.detail)} />
-
  </div>
+
  {#if !noAnchor}
+
    <div class="anchor widget">
+
      <AnchorBadge
+
        {commit}
+
        {anchors}
+
        head={project.head}
+
        on:click={(event) => updateRevision(event.detail)} />
+
    </div>
+
  {/if}

  {#if seed.git.host}
    <span>
modified src/base/projects/Project.svelte
@@ -65,7 +65,7 @@

{#if revision}
  {#await project.getRoot(revision) then { tree, commit }}
-
    <Header {tree} {commit} {browserStore} {project} />
+
    <Header {tree} {commit} {browserStore} {project} noAnchor />

    {#if content == proj.ProjectContent.Tree}
      <Browser {project} {commit} {tree} {browserStore} />