frontend: add props to overlay store
This commit is contained in:
parent
fbc84a1659
commit
240411ddd3
2 changed files with 5 additions and 5 deletions
|
@ -4,5 +4,5 @@
|
|||
</script>
|
||||
|
||||
{#if $overlayStore.createChannel}
|
||||
<CreateChannel />
|
||||
<CreateChannel { ...$overlayStore.createChannel } />
|
||||
{/if}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue