Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Load org page with SetName modal
Alexis Sellier committed 4 years ago
commit 49f9116b1083847edb35f302bc5aa95f0b06240a
parent b10a1f3cb13dc24818b83fdcdd1fa962612af4e6
2 files changed +6 -3
modified src/base/orgs/Routes.svelte
@@ -3,6 +3,7 @@
  import Index from '@app/base/orgs/Index.svelte';
  import View from '@app/base/orgs/View.svelte';
  import type { Config } from '@app/config';
+
  import { getSearchParam } from '@app/utils';

  export let config: Config;
</script>
@@ -11,6 +12,6 @@
  <Index {config} />
</Route>

-
<Route path="/orgs/:address" let:params>
-
  <View {config} address={params.address} />
+
<Route path="/orgs/:address" let:params let:location>
+
  <View {config} address={params.address} action={getSearchParam("action", location)} />
</Route>
modified src/base/orgs/View.svelte
@@ -21,10 +21,12 @@

  export let address: string;
  export let config: Config;
+
  export let action: string | null = null;

  const back = () => window.history.back();

-
  let setNameForm: typeof SvelteComponent | null = null;
+
  let setNameForm: typeof SvelteComponent | null =
+
    action === "setName" ? SetName : null;
  const setName = () => {
    setNameForm = SetName;
  };