Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Click on projects to view them
Alexis Sellier committed 4 years ago
commit c1ae4099286b63b28f23d18c2835412596770522
parent 9566023f8f0e17e205a7b34b884a9cab549ddf36
1 file changed +14 -1
modified src/base/projects/Widget.svelte
@@ -1,5 +1,6 @@
<script type="typescript">
  import { onMount } from 'svelte';
+
  import { navigate } from 'svelte-routing';
  import type { Config } from '@app/config';
  import * as proj from '@app/project';
  import Loading from '@app/Loading.svelte';
@@ -27,6 +28,12 @@
      state = { status: Status.Error, error: err.message };
    }
  });
+

+
  const onClick = () => {
+
    if (meta) {
+
      navigate(`/projects/${project.id}/${project.anchor.stateHash}`);
+
    }
+
  };
</script>

<style>
@@ -34,6 +41,12 @@
    padding: 1rem;
    border: 1px solid var(--color-secondary-faded);
  }
+
  article.has-meta {
+
    cursor: pointer;
+
  }
+
  article.has-meta:hover {
+
    border-color: var(--color-secondary);
+
  }
  article .id {
    font-size: 1rem;
    font-weight: 600;
@@ -73,7 +86,7 @@
  }
</style>

-
<article>
+
<article on:click={onClick} class:has-meta={meta}>
  {#if meta}
    <div class="id">
      <span class="name">{meta.name}</span><span class="urn">{project.id}</span>