Fix a modal
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
import BellOff from "@assets/icons/bell-off.svg?dataurl"
|
import BellOff from "@assets/icons/bell-off.svg?dataurl"
|
||||||
import Icon from "@lib/components/Icon.svelte"
|
import Icon from "@lib/components/Icon.svelte"
|
||||||
import Button from "@lib/components/Button.svelte"
|
import Button from "@lib/components/Button.svelte"
|
||||||
|
import Modal from "@lib/components/Modal.svelte"
|
||||||
|
import ModalBody from "@lib/components/ModalBody.svelte"
|
||||||
import ChatStart from "@app/components/ChatStart.svelte"
|
import ChatStart from "@app/components/ChatStart.svelte"
|
||||||
import {setChecked} from "@app/util/notifications"
|
import {setChecked} from "@app/util/notifications"
|
||||||
import {pushModal} from "@app/util/modal"
|
import {pushModal} from "@app/util/modal"
|
||||||
@@ -23,24 +25,26 @@
|
|||||||
const disableAlerts = () => notificationSettings.update(assoc("messages", false))
|
const disableAlerts = () => notificationSettings.update(assoc("messages", false))
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="col-2">
|
<Modal>
|
||||||
<Button class="btn btn-primary" onclick={startChat}>
|
<ModalBody>
|
||||||
<Icon size={5} icon={ChatSquare} />
|
<Button class="btn btn-primary" onclick={startChat}>
|
||||||
Start chat
|
<Icon size={5} icon={ChatSquare} />
|
||||||
</Button>
|
Start chat
|
||||||
<Button class="btn btn-neutral" onclick={markAsRead}>
|
|
||||||
<Icon size={5} icon={Check} />
|
|
||||||
Mark all read
|
|
||||||
</Button>
|
|
||||||
{#if $notificationSettings.messages}
|
|
||||||
<Button class="btn btn-neutral" onclick={disableAlerts}>
|
|
||||||
<Icon size={4} icon={BellOff} />
|
|
||||||
Disable alerts
|
|
||||||
</Button>
|
</Button>
|
||||||
{:else}
|
<Button class="btn btn-neutral" onclick={markAsRead}>
|
||||||
<Button class="btn btn-neutral" onclick={enableAlerts}>
|
<Icon size={5} icon={Check} />
|
||||||
<Icon size={4} icon={Bell} />
|
Mark all read
|
||||||
Enable alerts
|
|
||||||
</Button>
|
</Button>
|
||||||
{/if}
|
{#if $notificationSettings.messages}
|
||||||
</div>
|
<Button class="btn btn-neutral" onclick={disableAlerts}>
|
||||||
|
<Icon size={4} icon={BellOff} />
|
||||||
|
Disable alerts
|
||||||
|
</Button>
|
||||||
|
{:else}
|
||||||
|
<Button class="btn btn-neutral" onclick={enableAlerts}>
|
||||||
|
<Icon size={4} icon={Bell} />
|
||||||
|
Enable alerts
|
||||||
|
</Button>
|
||||||
|
{/if}
|
||||||
|
</ModalBody>
|
||||||
|
</Modal>
|
||||||
|
|||||||
Reference in New Issue
Block a user