-
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.
* Updating project structure to use a different layout for the CMS * Getting verticalnav layout laid out * Updating vnav * Add a login page that grabs the token and sets it in memory to use on the CMS pages * Finished routing for CMS * Created basic table with clickable and routable capabilities to get to the Drop Edit view * Finish up the first draft of the Edit Drop UI * Renaming CMS path from 'drips' to 'drip' to match the backend. Update the backend to ease deployment to staging environment. Improve CMS login experience * Adding network calls to read and write drops * Drip CMS fully works for adding and updating drops! * Working on getting drop delete while editing (not creating) * hide delete button on new drip * Work on getting drip plugged into the site * DripView on the site is done * Added a delete confirmation modal * fix drip CMS flex sizing
- Loading branch information
1 parent
20af04a
commit 13537ac
Showing
33 changed files
with
762 additions
and
131 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
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,46 @@ | ||
<script> | ||
export let text = null; | ||
export let handleClick; | ||
export let primary = true; | ||
</script> | ||
|
||
|
||
<button | ||
class="{primary ? 'buttonPrimary' : 'buttonSecondary'}" | ||
on:click={handleClick} | ||
> | ||
{text} | ||
</button> | ||
|
||
|
||
<style> | ||
button { | ||
margin-left: auto; | ||
padding: 0.5em 1.5em 0.5em 1.5em; | ||
color: #fffefb; | ||
text-align: center; | ||
border-radius: 5px; | ||
border: none; | ||
} | ||
button:hover { | ||
cursor: pointer; | ||
background-color: #777; | ||
} | ||
.buttonPrimary { | ||
background-color: #5c5955; | ||
} | ||
.buttonSecondary { | ||
background-color: #9b9894 | ||
} | ||
.buttonPrimary:hover { | ||
background-color: #777; | ||
} | ||
.buttonSecondary:hover { | ||
background-color: #DAD9D7 | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<script> | ||
export let data; | ||
import { goto } from "$app/navigation"; | ||
import { base } from '$app/paths'; | ||
import Card from '$lib/components/Card.svelte'; | ||
import { dropEdit } from '$lib/store.js'; | ||
const handleDripClick = (id) => { | ||
console.log(`clicked row ${id}`) | ||
dropEdit.set(data.data.filter(datum => datum.id === id)[0]) | ||
goto(`${base}/cms/drip/${id}`) | ||
} | ||
const drip = data.data.sort((dropA, dropB) => new Date(dropA.timestamp) > new Date(dropB.timestamp) ? -1 : 1) | ||
</script> | ||
|
||
|
||
<Card> | ||
<table> | ||
<tr> | ||
<th style="width: 200px">timestamp</th> | ||
<th>drop</th> | ||
</tr> | ||
{#each data.data as datum} | ||
<tr class="row" on:click={() => handleDripClick(datum.id)}> | ||
<td>{datum.created_at}</td> | ||
<td>{datum.message}</td> | ||
</tr> | ||
{/each} | ||
</table> | ||
</Card> | ||
|
||
|
||
<style> | ||
table { | ||
padding: 1.5em; | ||
border-spacing: 0px; | ||
} | ||
td, th { | ||
padding: 1em; | ||
border: 0px; | ||
} | ||
.row { | ||
} | ||
.row:hover { | ||
background-color: #eee; | ||
cursor: pointer; | ||
} | ||
th { | ||
text-align: left; | ||
} | ||
td { | ||
vertical-align: top; | ||
} | ||
</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
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,62 @@ | ||
<script> | ||
export let showModal; // boolean | ||
let dialog; // HTMLDialogElement | ||
let dialogIsOpen = false; | ||
$: if (dialog && !dialogIsOpen && showModal) { | ||
dialog.showModal(); | ||
dialogIsOpen = true; | ||
} | ||
$: if (dialog && dialogIsOpen && !showModal) { | ||
dialog.close(); | ||
dialogIsOpen = false; | ||
} | ||
</script> | ||
|
||
<!-- svelte-ignore a11y-click-events-have-key-events a11y-no-noninteractive-element-interactions --> | ||
<dialog | ||
bind:this={dialog} | ||
on:close={() => (showModal = false)} | ||
on:click|self={() => dialog.close()} | ||
> | ||
<slot /> | ||
</dialog> | ||
|
||
<style> | ||
dialog { | ||
max-width: 32em; | ||
border-radius: 0.2em; | ||
border: none; | ||
padding: 0; | ||
} | ||
dialog::backdrop { | ||
background: rgba(0, 0, 0, 0.3); | ||
} | ||
dialog[open] { | ||
animation: zoom 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); | ||
} | ||
@keyframes zoom { | ||
from { | ||
transform: scale(0.95); | ||
} | ||
to { | ||
transform: scale(1); | ||
} | ||
} | ||
dialog[open]::backdrop { | ||
animation: fade 0.2s ease-out; | ||
} | ||
@keyframes fade { | ||
from { | ||
opacity: 0; | ||
} | ||
to { | ||
opacity: 1; | ||
} | ||
} | ||
button { | ||
display: block; | ||
} | ||
</style> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.