Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Withdraw vested button
Alexis Sellier committed 5 years ago
commit 503c8be59caee744ea8d9e3976b6b03f740e0fbf
parent eb63a73e1ff55cffe9f97802766f9ca354e5c4c8
2 files changed +19 -1
modified public/index.css
@@ -187,6 +187,12 @@ input.wide {
	margin-top: 2rem;
	text-align: center;
}
+
.modal-actions > button {
+
	margin-right: 1rem;
+
}
+
.modal-actions > button:last-child {
+
	margin-right: 0;
+
}

table {
	table-layout: fixed;
modified src/base/vesting/Vesting.svelte
@@ -1,6 +1,7 @@
<script lang="javascript">
  import { ethers } from 'ethers';
-
  import { get } from 'svelte/store';
+
  import { get, derived } from 'svelte/store';
+
  import { session } from '@app/session.js';
  import { STATE, state } from './state.js';
  import { getInfo } from './vesting.js';

@@ -14,6 +15,12 @@
    info = await getInfo(contractAddress, config);
    state.set(STATE.IDLE);
  }
+

+
  function withdrawVested() {}
+

+
  let isBeneficiary = derived(session, (s) => {
+
    return info && (info.beneficiary === s.address);
+
  });
</script>

<style>
@@ -49,6 +56,11 @@
        </table>
      </div>
      <div class="modal-actions">
+
        {#if $isBeneficiary}
+
          <button on:click={withdrawVested} class="primary small">
+
            Withdraw
+
          </button>
+
        {/if}
        <button on:click={() => info = null} class="small">
          Back
        </button>