feat: use new spinner component
This commit is contained in:
1 parent
e946d0de48
commit
43b0e87ebf
10 files changed
+10
-163
No files matched your search
@@ -9,7 +9,6 @@
|
|||||||
import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte'
|
import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte'
|
||||||
import { toast } from 'mono-svelte'
|
import { toast } from 'mono-svelte'
|
||||||
import Markdown from '$lib/components/markdown/Markdown.svelte'
|
import Markdown from '$lib/components/markdown/Markdown.svelte'
|
||||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
|
||||||
|
|
||||||
export let post: PostView
|
export let post: PostView
|
||||||
export let actions: boolean = true
|
export let actions: boolean = true
|
||||||
|
|||||||
@@ -30,12 +30,11 @@
|
|||||||
} from '$lib/components/lemmy/moderation/moderation.js'
|
} from '$lib/components/lemmy/moderation/moderation.js'
|
||||||
import ModerationMenu from '$lib/components/lemmy/moderation/ModerationMenu.svelte'
|
import ModerationMenu from '$lib/components/lemmy/moderation/ModerationMenu.svelte'
|
||||||
import { profile } from '$lib/auth.js'
|
import { profile } from '$lib/auth.js'
|
||||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
|
||||||
import { deleteItem, markAsRead, save } from '$lib/lemmy/contentview.js'
|
import { deleteItem, markAsRead, save } from '$lib/lemmy/contentview.js'
|
||||||
import { setSessionStorage } from '$lib/session.js'
|
import { setSessionStorage } from '$lib/session.js'
|
||||||
import { goto } from '$app/navigation'
|
import { goto } from '$app/navigation'
|
||||||
import { userSettings } from '$lib/settings.js'
|
import { userSettings } from '$lib/settings.js'
|
||||||
import { Button, Modal } from 'mono-svelte'
|
import { Button, Modal, Spinner } from 'mono-svelte'
|
||||||
|
|
||||||
export let post: PostView
|
export let post: PostView
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { profile, profileData, setUserID } from '$lib/auth.js'
|
import { profile, profileData } from '$lib/auth.js'
|
||||||
import Link from '$lib/components/input/Link.svelte'
|
import Link from '$lib/components/input/Link.svelte'
|
||||||
import ShieldIcon from '$lib/components/lemmy/moderation/ShieldIcon.svelte'
|
import ShieldIcon from '$lib/components/lemmy/moderation/ShieldIcon.svelte'
|
||||||
import {
|
import {
|
||||||
@@ -8,13 +8,12 @@
|
|||||||
} from '$lib/components/lemmy/moderation/moderation.js'
|
} from '$lib/components/lemmy/moderation/moderation.js'
|
||||||
import Avatar from '$lib/components/ui/Avatar.svelte'
|
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||||
import Logo from '$lib/components/ui/Logo.svelte'
|
import Logo from '$lib/components/ui/Logo.svelte'
|
||||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
|
||||||
import Menu from '$lib/components/ui/menu/Menu.svelte'
|
import Menu from '$lib/components/ui/menu/Menu.svelte'
|
||||||
import MenuButton from '$lib/components/ui/menu/MenuButton.svelte'
|
import MenuButton from '$lib/components/ui/menu/MenuButton.svelte'
|
||||||
import { LINKED_INSTANCE_URL, instance } from '$lib/instance.js'
|
import { LINKED_INSTANCE_URL, instance } from '$lib/instance.js'
|
||||||
import { site } from '$lib/lemmy.js'
|
import { site } from '$lib/lemmy.js'
|
||||||
import { theme } from '$lib/ui/colors.js'
|
import { theme } from '$lib/ui/colors.js'
|
||||||
import { Button, Select } from 'mono-svelte'
|
import { Button, Select, Spinner } from 'mono-svelte'
|
||||||
import {
|
import {
|
||||||
ArrowLeftOnRectangle,
|
ArrowLeftOnRectangle,
|
||||||
Bars3,
|
Bars3,
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
<div class="loading">
|
|
||||||
<div class="dot dot1" />
|
|
||||||
<div class="dot dot2" />
|
|
||||||
<div class="dot dot3" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.loading {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot {
|
|
||||||
width: 5px;
|
|
||||||
height: 5px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background-color: #555;
|
|
||||||
opacity: 0.3;
|
|
||||||
margin: 0px 1px;
|
|
||||||
animation: blink 750ms infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot1 {
|
|
||||||
animation-delay: 0s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot2 {
|
|
||||||
animation-delay: 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dot3 {
|
|
||||||
animation-delay: 0.4s;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes blink {
|
|
||||||
0% {
|
|
||||||
opacity: 0.3;
|
|
||||||
}
|
|
||||||
20% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
100% {
|
|
||||||
opacity: 0.3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
<script lang="ts">
|
|
||||||
export let width: number = 18
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div class="spinner" style="width: {width}px; height: {width}px;">
|
|
||||||
<div class="bar1" />
|
|
||||||
<div class="bar2" />
|
|
||||||
<div class="bar3" />
|
|
||||||
<div class="bar4" />
|
|
||||||
<div class="bar5" />
|
|
||||||
<div class="bar6" />
|
|
||||||
<div class="bar7" />
|
|
||||||
<div class="bar8" />
|
|
||||||
<div class="bar9" />
|
|
||||||
<div class="bar10" />
|
|
||||||
<div class="bar11" />
|
|
||||||
<div class="bar12" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style lang="postcss">
|
|
||||||
div.spinner {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.spinner div {
|
|
||||||
width: 7.5%;
|
|
||||||
height: 22%;
|
|
||||||
position: absolute;
|
|
||||||
left: 49%;
|
|
||||||
top: 43%;
|
|
||||||
opacity: 0;
|
|
||||||
border-radius: 50px;
|
|
||||||
animation: fade 1s linear infinite;
|
|
||||||
@apply bg-black dark:bg-white;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes fade {
|
|
||||||
from {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 0.25;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
div.spinner div.bar1 {
|
|
||||||
transform: rotate(0deg) translate(0, -130%);
|
|
||||||
animation-delay: 0s;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.spinner div.bar2 {
|
|
||||||
transform: rotate(30deg) translate(0, -130%);
|
|
||||||
animation-delay: -0.9167s;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.spinner div.bar3 {
|
|
||||||
transform: rotate(60deg) translate(0, -130%);
|
|
||||||
animation-delay: -0.833s;
|
|
||||||
}
|
|
||||||
div.spinner div.bar4 {
|
|
||||||
transform: rotate(90deg) translate(0, -130%);
|
|
||||||
animation-delay: -0.7497s;
|
|
||||||
}
|
|
||||||
div.spinner div.bar5 {
|
|
||||||
transform: rotate(120deg) translate(0, -130%);
|
|
||||||
animation-delay: -0.667s;
|
|
||||||
}
|
|
||||||
div.spinner div.bar6 {
|
|
||||||
transform: rotate(150deg) translate(0, -130%);
|
|
||||||
animation-delay: -0.5837s;
|
|
||||||
}
|
|
||||||
div.spinner div.bar7 {
|
|
||||||
transform: rotate(180deg) translate(0, -130%);
|
|
||||||
animation-delay: -0.5s;
|
|
||||||
}
|
|
||||||
div.spinner div.bar8 {
|
|
||||||
transform: rotate(210deg) translate(0, -130%);
|
|
||||||
animation-delay: -0.4167s;
|
|
||||||
}
|
|
||||||
div.spinner div.bar9 {
|
|
||||||
transform: rotate(240deg) translate(0, -130%);
|
|
||||||
animation-delay: -0.333s;
|
|
||||||
}
|
|
||||||
div.spinner div.bar10 {
|
|
||||||
transform: rotate(270deg) translate(0, -130%);
|
|
||||||
animation-delay: -0.2497s;
|
|
||||||
}
|
|
||||||
div.spinner div.bar11 {
|
|
||||||
transform: rotate(300deg) translate(0, -130%);
|
|
||||||
animation-delay: -0.167s;
|
|
||||||
}
|
|
||||||
div.spinner div.bar12 {
|
|
||||||
transform: rotate(330deg) translate(0, -130%);
|
|
||||||
animation-delay: -0.0833s;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
|
||||||
import { Color } from '$lib/ui/colors'
|
import { Color } from '$lib/ui/colors'
|
||||||
|
import { Spinner } from 'mono-svelte'
|
||||||
import { createEventDispatcher } from 'svelte'
|
import { createEventDispatcher } from 'svelte'
|
||||||
|
|
||||||
type ButtonColor = keyof typeof buttonColors
|
type ButtonColor = keyof typeof buttonColors
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
import StickyCard from '$lib/components/ui/StickyCard.svelte'
|
import StickyCard from '$lib/components/ui/StickyCard.svelte'
|
||||||
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
|
||||||
import SiteCard from '$lib/components/lemmy/SiteCard.svelte'
|
import SiteCard from '$lib/components/lemmy/SiteCard.svelte'
|
||||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
|
||||||
import Pageination from '$lib/components/ui/Pageination.svelte'
|
import Pageination from '$lib/components/ui/Pageination.svelte'
|
||||||
import { profile } from '$lib/auth.js'
|
|
||||||
import Sort from '$lib/components/lemmy/Sort.svelte'
|
import Sort from '$lib/components/lemmy/Sort.svelte'
|
||||||
import { searchParam } from '$lib/util.js'
|
import { searchParam } from '$lib/util.js'
|
||||||
import PostFeed from '$lib/components/lemmy/post/PostFeed.svelte'
|
import PostFeed from '$lib/components/lemmy/post/PostFeed.svelte'
|
||||||
import { Button, Modal, Select } from 'mono-svelte'
|
import { Button, Modal, Select, Spinner } from 'mono-svelte'
|
||||||
import { GlobeAmericas, Icon } from 'svelte-hero-icons'
|
import { GlobeAmericas, Icon } from 'svelte-hero-icons'
|
||||||
|
import { profile } from '$lib/auth.js'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
|
|
||||||
@@ -53,7 +51,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<option value="All">All</option>
|
<option value="All">All</option>
|
||||||
<option value="Local">Local</option>
|
<option value="Local">Local</option>
|
||||||
<option value="Subscribed">Subscribed</option>
|
<option value="Subscribed" disabled={!$profile?.jwt}>Subscribed</option>
|
||||||
</Select>
|
</Select>
|
||||||
<Sort selected={data.sort} />
|
<Sort selected={data.sort} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,11 +9,10 @@
|
|||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
import PostActions from '$lib/components/lemmy/post/PostActions.svelte'
|
import PostActions from '$lib/components/lemmy/post/PostActions.svelte'
|
||||||
import { ExclamationTriangle, Icon } from 'svelte-hero-icons'
|
import { ExclamationTriangle, Icon } from 'svelte-hero-icons'
|
||||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
|
||||||
import Card from '$lib/components/ui/Card.svelte'
|
import Card from '$lib/components/ui/Card.svelte'
|
||||||
import PostLink from '$lib/components/lemmy/post/PostLink.svelte'
|
import PostLink from '$lib/components/lemmy/post/PostLink.svelte'
|
||||||
import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte'
|
import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte'
|
||||||
import { removeToast, toast } from 'mono-svelte'
|
import { Spinner, removeToast, toast } from 'mono-svelte'
|
||||||
import type { CommentSortType } from 'lemmy-js-client'
|
import type { CommentSortType } from 'lemmy-js-client'
|
||||||
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
|
||||||
import { profile } from '$lib/auth.js'
|
import { profile } from '$lib/auth.js'
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
import UserItem from '$lib/components/lemmy/user/UserItem.svelte'
|
import UserItem from '$lib/components/lemmy/user/UserItem.svelte'
|
||||||
import Pageination from '$lib/components/ui/Pageination.svelte'
|
import Pageination from '$lib/components/ui/Pageination.svelte'
|
||||||
import Placeholder from '$lib/components/ui/Placeholder.svelte'
|
import Placeholder from '$lib/components/ui/Placeholder.svelte'
|
||||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
|
||||||
import {
|
import {
|
||||||
isCommentView,
|
isCommentView,
|
||||||
isCommunityView,
|
isCommunityView,
|
||||||
@@ -22,7 +21,7 @@
|
|||||||
PersonView,
|
PersonView,
|
||||||
PostView,
|
PostView,
|
||||||
} from 'lemmy-js-client'
|
} from 'lemmy-js-client'
|
||||||
import { Button, Select, TextInput } from 'mono-svelte'
|
import { Button, Select, Spinner, TextInput } from 'mono-svelte'
|
||||||
import { Bars3BottomRight, Icon, MagnifyingGlass } from 'svelte-hero-icons'
|
import { Bars3BottomRight, Icon, MagnifyingGlass } from 'svelte-hero-icons'
|
||||||
import { expoOut } from 'svelte/easing'
|
import { expoOut } from 'svelte/easing'
|
||||||
import { slide } from 'svelte/transition'
|
import { slide } from 'svelte/transition'
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
import Avatar from '$lib/components/ui/Avatar.svelte'
|
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||||
import Card from '$lib/components/ui/Card.svelte'
|
import Card from '$lib/components/ui/Card.svelte'
|
||||||
import Placeholder from '$lib/components/ui/Placeholder.svelte'
|
import Placeholder from '$lib/components/ui/Placeholder.svelte'
|
||||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
import { Spinner, toast } from 'mono-svelte'
|
||||||
import { toast } from 'mono-svelte'
|
|
||||||
import { getClient } from '$lib/lemmy.js'
|
import { getClient } from '$lib/lemmy.js'
|
||||||
import type { GetCaptchaResponse } from 'lemmy-js-client'
|
import type { GetCaptchaResponse } from 'lemmy-js-client'
|
||||||
import { Button, TextArea, TextInput } from 'mono-svelte'
|
import { Button, TextArea, TextInput } from 'mono-svelte'
|
||||||
|
|||||||
Reference in new issue
Block a user