misc: Change the way buttons are handled
This commit is contained in:
1 parent
d8ac0d807a
commit
e243848e17
30 files changed
+215
-152
No files matched your search
@@ -8,7 +8,7 @@
|
||||
|
||||
<div class="flex flex-col mx-auto gap-4 justify-center items-center">
|
||||
<h1 class="font-black text-5xl">{$page.status}</h1>
|
||||
<Link href={$page.url.toString()}>Retry</Link>
|
||||
<Button href={$page.url.toString()}>Retry</Button>
|
||||
<Button
|
||||
on:click={() => {
|
||||
corsSupported.set(false)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<div class="flex flex-col sm:flex-row gap-4">
|
||||
<MultiSelect
|
||||
options={['Subscribed', 'Local', 'All']}
|
||||
selected={$page.url.searchParams.get('type') ?? 'Local'}
|
||||
selected={$page.url.searchParams.get('type') ?? 'All'}
|
||||
on:select={(e) => {
|
||||
const url = $page.url
|
||||
url.searchParams.set('type', e.detail)
|
||||
@@ -36,8 +36,8 @@
|
||||
})
|
||||
}}
|
||||
/>
|
||||
<div class="flex flex-col sm:flex-row gap-2 sm:ml-auto">
|
||||
<TextInput class="rounded-md" bind:value={search} />
|
||||
<div class="flex flex-col sm:flex-row gap-2 sm:ml-auto items-center">
|
||||
<TextInput bind:value={search} />
|
||||
<Button
|
||||
on:click={() => {
|
||||
$page.url.searchParams.set('q', search)
|
||||
@@ -45,7 +45,8 @@
|
||||
invalidateAll: true,
|
||||
})
|
||||
}}
|
||||
color={Color.ghost}
|
||||
color="ghost"
|
||||
class="h-max"
|
||||
>
|
||||
Search
|
||||
</Button>
|
||||
@@ -56,20 +57,19 @@
|
||||
<li>
|
||||
<div
|
||||
class="py-4 border-b border-black/20 dark:border-white/20
|
||||
flex flex-col gap-1 text-sm"
|
||||
flex flex-col gap-1 text-sm max-w-full"
|
||||
>
|
||||
<div class="flex flex-row justify-between items-center">
|
||||
<div class="flex flex-row items-center">
|
||||
<span
|
||||
class="break-words max-w-full w-max text-base font-bold text-sky-400 hover:underline"
|
||||
>
|
||||
<CommunityLink avatar community={community.community} />
|
||||
</span>
|
||||
<div class="w-24">
|
||||
<div class="ml-auto">
|
||||
<Subscribe {community} let:subscribe let:subscribing>
|
||||
<Button
|
||||
disabled={subscribing}
|
||||
loading={subscribing}
|
||||
large
|
||||
on:click={async () => {
|
||||
const res = await subscribe()
|
||||
|
||||
@@ -81,8 +81,8 @@
|
||||
}
|
||||
}}
|
||||
color={community.subscribed == 'Subscribed'
|
||||
? Color.accent
|
||||
: Color.ghost}
|
||||
? 'primary'
|
||||
: 'ghost'}
|
||||
>
|
||||
{community.subscribed == 'Subscribed'
|
||||
? 'Subscribed'
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||
import TextInput from '$lib/components/input/TextInput.svelte'
|
||||
import Card from '$lib/components/ui/Card.svelte'
|
||||
import Loading from '$lib/components/ui/loader/Loading.svelte'
|
||||
import Loading from '$lib/components/ui/loader/Dots.svelte'
|
||||
import { ToastType, addToast } from '$lib/components/ui/toasts/toasts.js'
|
||||
import { authData, buildBaseUrl, getClient, getInstance } from '$lib/lemmy.js'
|
||||
import { Color } from '$lib/ui/colors.js'
|
||||
@@ -152,13 +152,7 @@
|
||||
bind:files={data.image}
|
||||
/>
|
||||
</div>
|
||||
<Button
|
||||
submit
|
||||
color={Color.accent}
|
||||
large
|
||||
loading={data.loading}
|
||||
disabled={data.loading}
|
||||
>
|
||||
<Button submit color="primary" loading={data.loading} size="lg">
|
||||
Submit
|
||||
</Button>
|
||||
</form>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
</div>
|
||||
|
||||
<div class="w-max ml-auto">
|
||||
<Link href="/post/{item.post.id}#{item.comment.id}">Jump</Link>
|
||||
<Button href="/post/{item.post.id}#{item.comment.id}">Jump</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -124,7 +124,7 @@
|
||||
</p>
|
||||
{#if item.recipient.id == $user?.person.id}
|
||||
<div class="flex flex-row gap-2">
|
||||
<Button color={Color.ghost} on:click={() => (replying = !replying)}>
|
||||
<Button color="ghost" on:click={() => (replying = !replying)}>
|
||||
<Icon mini src={ChatBubbleOvalLeft} width={16} />
|
||||
Reply
|
||||
</Button>
|
||||
@@ -139,7 +139,7 @@
|
||||
{loading}
|
||||
large
|
||||
on:click={() => replyToMessage(item)}
|
||||
color={Color.accent}
|
||||
color="primary"
|
||||
>
|
||||
Submit
|
||||
</Button>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
pattern={'(?!-)[A-Za-z0-9-]+([-.]{1}[a-z0-9]+)*.[A-Za-z]{2,6}'}
|
||||
/>
|
||||
</div>
|
||||
<div class="flex flex-row gap-2 w-full">
|
||||
<div class="flex flex-row gap-2">
|
||||
<TextInput
|
||||
id="password"
|
||||
bind:value={data.password}
|
||||
@@ -121,8 +121,8 @@
|
||||
<Button
|
||||
loading={data.loading}
|
||||
disabled={data.loading}
|
||||
large
|
||||
color={Color.accent}
|
||||
color="primary"
|
||||
size="lg"
|
||||
submit
|
||||
>
|
||||
Log in
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
import Link from '$lib/components/input/Link.svelte'
|
||||
import Comment from '$lib/components/lemmy/comment/Comment.svelte'
|
||||
import { fly } from 'svelte/transition'
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -38,7 +39,9 @@
|
||||
{item.post.name}
|
||||
</span>
|
||||
</div>
|
||||
<Link href="/post/{item.post.id}#{item.comment.id}">Jump</Link>
|
||||
<Button href="/post/{item.post.id}#{item.comment.id}">
|
||||
Jump
|
||||
</Button>
|
||||
</div>
|
||||
<div class="list-none">
|
||||
<Comment
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
/>
|
||||
<div class="w-24">
|
||||
<Button
|
||||
color={Color.accent}
|
||||
color="primary"
|
||||
large
|
||||
loading={data.loading}
|
||||
disabled={data.loading}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
Icon,
|
||||
PencilSquare,
|
||||
} from 'svelte-hero-icons'
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
|
||||
export let data: {
|
||||
user: GetPersonDetailsResponse
|
||||
@@ -60,7 +61,14 @@
|
||||
{item.post.name}
|
||||
</span>
|
||||
</div>
|
||||
<Link href="/post/{item.post.id}#{item.comment.id}">Jump</Link>
|
||||
<Button
|
||||
color="secondary"
|
||||
href="/post/{item.post.id}#{item.comment.id}"
|
||||
size="sm"
|
||||
class="self-start"
|
||||
>
|
||||
Jump
|
||||
</Button>
|
||||
</div>
|
||||
<div class="list-none">
|
||||
<Comment
|
||||
|
||||
Reference in new issue
Block a user