This repository has been archived by the owner on Dec 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): ability to set all client attributes
feat(ui): ability to send mails
- Loading branch information
Showing
11 changed files
with
344 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { request } from './api' | ||
|
||
async function sendMail(mail) { | ||
return await request('/mail', mail, { method: 'POST' }) | ||
} | ||
|
||
export { sendMail } |
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,32 @@ | ||
import { writable } from 'svelte/store' | ||
|
||
function createErrors() { | ||
const { subscribe, update } = writable([]) | ||
const spawn = (message) => { | ||
update(alerts => alerts = [...alerts, message]) | ||
setTimeout(() => update(alerts => alerts = alerts.filter(a => a !== message)), 3000) | ||
} | ||
return { subscribe, spawn } | ||
} | ||
|
||
function createInfos() { | ||
const { subscribe, update } = writable([]) | ||
const spawn = (message) => { | ||
update(alerts => alerts = [...alerts, message]) | ||
setTimeout(() => update(alerts => alerts = alerts.filter(a => a !== message)), 3000) | ||
} | ||
return { subscribe, spawn } | ||
} | ||
|
||
function createSuccesses() { | ||
const { subscribe, update } = writable([]) | ||
const spawn = (message) => { | ||
update(alerts => alerts = [...alerts, message]) | ||
setTimeout(() => update(alerts => alerts = alerts.filter(a => a !== message)), 3000) | ||
} | ||
return { subscribe, spawn } | ||
} | ||
|
||
export const errors = createErrors() | ||
export const infos = createInfos() | ||
export const successes = createSuccesses() |
Oops, something went wrong.