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>
|
</script>
|
||||||
|
|
||||||
{#if $overlayStore.createChannel}
|
{#if $overlayStore.createChannel}
|
||||||
<CreateChannel />
|
<CreateChannel { ...$overlayStore.createChannel } />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue