design: make disabled buttons not look like buns

This commit is contained in:
Xylight committed 2025-09-27 10:16:42 -07:00
1 parent f54e6242b3
commit e55d8abfa7
6 files changed
+21 -19

No files matched your search

+1 -1
View File
@@ -224,7 +224,7 @@ function isObject(item: object) {
* @param ...sources
*/
function mergeDeep(target: any, ...sources: any[]) {
export function mergeDeep(target: any, ...sources: any[]) {
if (!sources.length) return target
const source = sources.shift()
+2 -2
View File
@@ -315,11 +315,11 @@
.btn-disabled {
pointer-events: none;
filter: brightness(90%);
opacity: 0.6;
cursor: normal;
@variant dark {
filter: brightness(70%);
opacity: 0.5;
}
}
}
@@ -19,9 +19,9 @@
old_password: oldPassword,
})
if (res?.jwt) {
const { instance } = profile.current
const { instance, client } = profile.current
profile.remove(profile.current.id)
await profile.add(res.jwt, instance)
await profile.add(res.jwt, instance, client)
toast({ content: $t('toast.loginRefresh'), type: 'success' })
} else {
-2
View File
@@ -1,7 +1,6 @@
<script lang="ts">
import { navigating, page } from '$app/state'
import { client } from '$lib/api/client.svelte'
import { profile } from '$lib/app/auth.svelte'
import { t } from '$lib/app/i18n'
import { searchParam } from '$lib/app/util.svelte'
import CommentItem from '$lib/feature/comment/CommentItem.svelte'
@@ -103,7 +102,6 @@
>
<ObjectAutocomplete
label={$t('nav.create.community')}
jwt={profile.current?.jwt}
listing_type="All"
showWhenEmpty={true}
onselect={(c) =>
+12 -9
View File
@@ -1,6 +1,7 @@
<script lang="ts">
import { goto } from '$app/navigation'
import { page } from '$app/state'
import type { ClientType } from '$lib/api/base.js'
import { getClient } from '$lib/api/client.svelte'
import type { GetCaptchaResponse } from '$lib/api/types'
import { profile } from '$lib/app/auth.svelte'
@@ -51,13 +52,15 @@
let username = $state(''),
password = $state(''),
passwordVerify = $state(''),
captcha: GetCaptchaResponse | null = $state(null),
verifyCaptcha: string | undefined = $state(undefined),
application: string = $state(''),
submitting: boolean = $state(false),
honeypot: string | undefined = $state(undefined),
nsfw: boolean = $state(false),
verifying: boolean = $state(false)
captcha = $state<GetCaptchaResponse>(),
verifyCaptcha = $state<string>(),
application = $state(''),
submitting = $state(false),
honeypot = $state<string>(),
nsfw = $state(false),
verifying = $state(false)
const instanceType: ClientType = $state({ name: 'lemmy', baseUrl: '/api/v3' })
const getCaptcha = async () =>
(captcha = await getClient(instance, fetch).getCaptcha())
@@ -86,7 +89,7 @@
const registrationMode = data.site_view.local_site.registration_mode
if (res?.jwt) {
await profile.add(res.jwt, page.params.instance)
await profile.add(res.jwt, page.params.instance!, instanceType)
toast({ content: $t('toast.logIn'), type: 'success' })
goto('/')
@@ -125,7 +128,7 @@
})
if (res.jwt) {
await profile.add(res.jwt, page.params.instance)
await profile.add(res.jwt, data.instance, instanceType)
goto('/')
} else if (res.verify_email_sent) {
pushError({
+4 -3
View File
@@ -1,7 +1,8 @@
import { getClient } from '$lib/api/client.svelte'
import { client } from '$lib/api/client.svelte'
import { SvelteURL } from 'svelte/reactivity'
export async function load({ params, fetch }) {
const site = await getClient(params.instance, fetch).getSite()
const site = await client({ instanceURL: params.instance, func: fetch}).getSite()
return site
return {...site, instance: new SvelteURL(site.site_view.site.actor_id).hostname}
}