forked from colinlienard/gitlight
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(front): add done state for notifications (colinlienard#121)
- Loading branch information
1 parent
8c0605c
commit 32bc5e7
Showing
15 changed files
with
200 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<script> | ||
import { Button, Modal, ScrollbarContainer } from '~/lib/components'; | ||
import { DoubleCheckIcon } from '~/lib/icons'; | ||
import { githubNotifications } from '~/lib/stores'; | ||
import Notification from './Notification.svelte'; | ||
$: dones = $githubNotifications.filter(({ done }) => done); | ||
</script> | ||
|
||
{#if dones.length} | ||
<div class="wrapper"> | ||
<Modal title="Done" small> | ||
<Button slot="trigger" type="secondary" small> | ||
<DoubleCheckIcon /> | ||
Done | ||
</Button> | ||
<ScrollbarContainer slot="content" margin="2rem 1rem"> | ||
<ul class="list"> | ||
{#each dones as notification (notification.id)} | ||
<li class="list-item"> | ||
<Notification data={notification} /> | ||
</li> | ||
{/each} | ||
</ul> | ||
</ScrollbarContainer> | ||
</Modal> | ||
</div> | ||
{/if} | ||
|
||
<style lang="scss"> | ||
.wrapper { | ||
margin-left: auto; | ||
} | ||
.list { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
padding: 2rem; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.