mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(web): pause and resume jobs (#2125)
* feat(web): pause and resume jobs * add bg color to status instead of using badge * styling --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
23e4449f27
commit
aaaf1a6cf8
7 changed files with 219 additions and 174 deletions
28
web/src/lib/components/elements/badge.svelte
Normal file
28
web/src/lib/components/elements/badge.svelte
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<script lang="ts" context="module">
|
||||
export type BadgeColor = 'primary' | 'dark' | 'warning' | 'success' | 'danger';
|
||||
export type BadgeRounded = false | true | 'full';
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export let color: BadgeColor = 'primary';
|
||||
export let rounded: BadgeRounded = true;
|
||||
|
||||
const colorClasses: { [Key in BadgeColor]: string } = {
|
||||
primary:
|
||||
'text-gray-100 dark:text-immich-dark-gray bg-immich-primary dark:bg-immich-dark-primary',
|
||||
dark: 'text-neutral-50 dark:text-neutral-50 bg-neutral-900 dark:bg-neutral-900',
|
||||
warning: 'text-yellow-900 bg-yellow-200',
|
||||
success: 'text-green-900 bg-green-200',
|
||||
danger: 'text-red-900 bg-red-200'
|
||||
};
|
||||
</script>
|
||||
|
||||
<span
|
||||
class="inline-block h-min whitespace-nowrap px-[0.65em] pt-[0.35em] pb-[0.25em] text-center align-baseline text-[0.65em] font-bold leading-none {colorClasses[
|
||||
color
|
||||
]}"
|
||||
class:rounded={rounded === true}
|
||||
class:rounded-full={rounded === 'full'}
|
||||
>
|
||||
<slot />
|
||||
</span>
|
||||
Loading…
Add table
Add a link
Reference in a new issue