mirror of
https://github.com/immich-app/immich.git
synced 2026-05-24 00:22:29 -04:00
fix: memory viewer bar
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
import { ControlBar, ControlBarContent, ControlBarHeader, ControlBarOverflow, ControlBarTitle } from '@immich/ui';
|
||||
import { mdiClose } from '@mdi/js';
|
||||
import type { Snippet } from 'svelte';
|
||||
import type { ClassValue } from 'svelte/elements';
|
||||
|
||||
interface Props {
|
||||
backIcon?: string;
|
||||
class?: string;
|
||||
forceDark?: boolean;
|
||||
class?: ClassValue;
|
||||
onClose?: () => void;
|
||||
title?: Snippet | string;
|
||||
leading?: Snippet;
|
||||
@@ -14,19 +14,10 @@
|
||||
trailing?: Snippet;
|
||||
}
|
||||
|
||||
let {
|
||||
backIcon = mdiClose,
|
||||
class: className = '',
|
||||
forceDark = false,
|
||||
onClose,
|
||||
title,
|
||||
leading,
|
||||
children,
|
||||
trailing,
|
||||
}: Props = $props();
|
||||
let { backIcon = mdiClose, class: className = '', onClose, title, leading, children, trailing }: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class={['absolute top-0 w-full bg-transparent p-2', forceDark && 'dark']}>
|
||||
<div class={['absolute top-0 w-full bg-transparent p-2']}>
|
||||
<ControlBar closeIcon={backIcon} {onClose} shape="round" class={className}>
|
||||
{#if title || leading}
|
||||
<ControlBarHeader>
|
||||
|
||||
@@ -7,19 +7,18 @@
|
||||
|
||||
type Props = {
|
||||
children?: Snippet;
|
||||
forceDark?: boolean;
|
||||
};
|
||||
|
||||
let { children, forceDark }: Props = $props();
|
||||
let { children }: Props = $props();
|
||||
|
||||
const onClose = () => assetMultiSelectManager.clear();
|
||||
|
||||
const assets = $derived(assetMultiSelectManager.assets);
|
||||
</script>
|
||||
|
||||
<ControlAppBar {onClose} {forceDark} backIcon={mdiClose} class="bg-white shadow-md">
|
||||
<ControlAppBar {onClose} backIcon={mdiClose}>
|
||||
{#snippet leading()}
|
||||
<div class="font-medium {forceDark ? 'text-immich-dark-primary' : 'text-primary'}">
|
||||
<div class="font-medium text-primary">
|
||||
<p class="block sm:hidden">{assets.length}</p>
|
||||
<p class="hidden sm:block">{$t('selected_count', { values: { count: assets.length } })}</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user