-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e05cb3e
commit d4eba37
Showing
16 changed files
with
151 additions
and
71 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,2 @@ | ||
# Copies all files tracked by git (/gen-static) to the generated resources (/gen) | ||
cp -v ./android/app/build.gradle.kts ../gen/android/app/build.gradle.kts |
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
41 changes: 41 additions & 0 deletions
41
unime/src/lib/components/molecules/toast/ErrorToast.svelte
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 lang="ts"> | ||
import { createEventDispatcher, onMount } from 'svelte'; | ||
import { fade, fly } from 'svelte/transition'; | ||
import Warning from '~icons/ph/warning'; | ||
import X from '~icons/ph/x'; | ||
const dispatch = createEventDispatcher(); | ||
export let autoDismissAfterMs = 0; // A value of 0 means the toast will never auto-dismiss | ||
export let title; | ||
export let detail: string | undefined = undefined; | ||
onMount(() => { | ||
if (autoDismissAfterMs > 0) { | ||
setTimeout(() => { | ||
dispatch('dismissed'); | ||
}, autoDismissAfterMs); | ||
} | ||
}); | ||
</script> | ||
|
||
<div | ||
class="relative flex items-center overflow-hidden rounded-xl border border-rose-400 bg-rose-100 p-4" | ||
in:fly={{ x: 200 }} | ||
out:fade={{ duration: 200 }} | ||
> | ||
<Warning class="h-6 w-6 min-w-6 text-rose-400" /> | ||
<div class="ml-4 mr-2 flex w-full flex-col overflow-hidden text-ellipsis break-words"> | ||
<p class="truncate text-[12px]/[20px] font-bold text-slate-800"> | ||
{title} | ||
</p> | ||
{#if detail} | ||
<p class="line-clamp-2 text-[12px]/[16px] text-slate-800">{detail}</p> | ||
{/if} | ||
</div> | ||
<button class="-mr-2 rounded-full p-3" on:click={() => dispatch('dismissed')}> | ||
<X class="h-4 w-4 text-slate-800" /> | ||
</button> | ||
</div> |
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
Oops, something went wrong.