Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(web): style tab button group and search bar #8292

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/src/lib/components/album-page/albums-controls.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
};
</script>

<div class="hidden xl:block">
<div class="hidden xl:block h-10">
<GroupTab
filters={Object.keys(AlbumFilter)}
selected={$albumViewSettings.filter}
Expand Down
4 changes: 2 additions & 2 deletions web/src/lib/components/album-page/albums-list.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@

{#if albums.length > 0}
<!-- Album Card -->
<div class=" block xl:hidden">
<div class="w-fit dark:text-immich-dark-fg py-2">
<div class="xl:hidden">
<div class="w-fit h-14 dark:text-immich-dark-fg py-2">
<GroupTab
filters={Object.keys(AlbumFilter)}
selected={$albumViewSettings.filter}
Expand Down
11 changes: 6 additions & 5 deletions web/src/lib/components/elements/group-tab.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
export let onSelect: (selected: string) => void;
</script>

<div class=" flex bg-gray-100 dark:bg-gray-700 rounded-lg">
<div class="flex bg-gray-200 dark:bg-immich-dark-gray rounded-2xl h-full">
{#each filters as filter, index}
<button
class="flex py-2 px-4 {filter === selected
? 'dark:bg-gray-900 bg-gray-300'
: 'dark:hover:bg-gray-800 hover:bg-gray-200'} {index === 0 ? 'rounded-l-lg' : ''} {index === filters.length - 1
? 'rounded-r-lg'
class="text-sm px-4 {filter === selected
? 'dark:bg-gray-700 bg-gray-300'
: 'dark:hover:bg-gray-800 hover:bg-gray-300'} {index === 0 ? 'rounded-l-2xl' : ''} {index ===
filters.length - 1
? 'rounded-r-2xl'
: ''}"
on:click={() => onSelect(filter)}
>
Expand Down
6 changes: 3 additions & 3 deletions web/src/lib/components/elements/search-bar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

<div
class="flex items-center text-sm {roundedBottom
? 'rounded-lg'
: 'rounded-t-lg'} bg-gray-100 p-2 dark:bg-gray-700 gap-2 place-items-center h-full"
? 'rounded-2xl'
: 'rounded-t-lg'} bg-gray-200 p-2 dark:bg-immich-dark-gray gap-2 place-items-center h-full"
>
<button on:click={() => dispatch('search', { force: true })}>
<div class="w-fit">
Expand All @@ -31,7 +31,7 @@
<!-- svelte-ignore a11y-autofocus -->
<input
autofocus
class="w-full gap-2 bg-gray-100 dark:bg-gray-700 dark:text-white"
class="w-full gap-2 bg-gray-200 dark:bg-immich-dark-gray dark:text-white"
type="text"
{placeholder}
bind:value={name}
Expand Down