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:
Michel Heusschen 2023-04-01 06:53:20 +02:00 committed by GitHub
parent 23e4449f27
commit aaaf1a6cf8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 219 additions and 174 deletions

View 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>