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>
{#if $overlayStore.createChannel}
<CreateChannel />
<CreateChannel { ...$overlayStore.createChannel } />
{/if}

View file

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