mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-04 19:44:47 +00:00
fix: make logo and oidc client images sizes consistent
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
{:else}
|
||||
<img
|
||||
{...props}
|
||||
class={cn('object-contain', props.class)}
|
||||
class={cn('object-contain aspect-square', props.class)}
|
||||
onerror={() => (error = true)}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { m } from '$lib/paraglide/messages';
|
||||
import { cachedApplicationLogo } from '$lib/utils/cached-image-util';
|
||||
import { cn } from '$lib/utils/style';
|
||||
import { mode } from 'mode-watcher';
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
|
||||
@@ -9,4 +10,9 @@
|
||||
const isLightMode = $derived(mode.current === 'light');
|
||||
</script>
|
||||
|
||||
<img {...props} src={cachedApplicationLogo.getUrl(isLightMode)} alt={m.logo()} />
|
||||
<img
|
||||
{...props}
|
||||
class={cn('aspect-square object-contain', props.class)}
|
||||
src={cachedApplicationLogo.getUrl(isLightMode)}
|
||||
alt={m.logo()}
|
||||
/>
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
</div>
|
||||
{:else if client.hasLogo}
|
||||
<img
|
||||
class="size-10"
|
||||
class="size-10 aspect-square object-contain"
|
||||
src={cachedOidcClientLogo.getUrl(client.id)}
|
||||
draggable={false}
|
||||
alt={m.client_logo()}
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<Table.Cell class="w-8 font-medium">
|
||||
{#if item.hasLogo}
|
||||
<ImageBox
|
||||
class="min-h-8 min-w-8 object-contain"
|
||||
class="min-h-8 min-w-8"
|
||||
src={cachedOidcClientLogo.getUrl(item.id)}
|
||||
alt={m.name_logo({ name: item.name })}
|
||||
/>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<div class="flex gap-3">
|
||||
<div class="aspect-square h-[56px]">
|
||||
<ImageBox
|
||||
class="h-8 w-8 grow rounded-lg object-contain"
|
||||
class="size-8"
|
||||
src={client.hasLogo
|
||||
? cachedOidcClientLogo.getUrl(client.id)
|
||||
: cachedApplicationLogo.getUrl(isLightMode)}
|
||||
@@ -124,6 +124,3 @@
|
||||
</div>
|
||||
</Card.Content>
|
||||
</Card.Root>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user