frontend: add props to overlay store

This commit is contained in:
hippoz 2022-04-25 23:02:15 +03:00
parent fbc84a1659
commit 240411ddd3
Signed by: hippoz
GPG key ID: 7C52899193467641
2 changed files with 5 additions and 5 deletions

View file

@ -4,5 +4,5 @@
</script> </script>
{#if $overlayStore.createChannel} {#if $overlayStore.createChannel}
<CreateChannel /> <CreateChannel { ...$overlayStore.createChannel } />
{/if} {/if}

View file

@ -222,17 +222,17 @@ class MessagesStoreProvider {
class OverlayStore extends Store { class OverlayStore extends Store {
constructor() { constructor() {
super({ super({
createChannel: false createChannel: null
}); });
} }
open(name) { open(name, props={}) {
this.value[name] = true; this.value[name] = props;
this.updated(); this.updated();
} }
close(name) { close(name) {
this.value[name] = false; this.value[name] = null;
this.updated(); this.updated();
} }
} }