Skip to content

A self-hosted media server and file management system

fix: change some pulse gray colours to theme neutral colours

aminnausina4527146a10b
diff --git a/resources/js/components/cards/layout/DashboardCard.vue b/resources/js/components/cards/layout/DashboardCard.vue
index 05852d3c..2f383602 100644
--- a/resources/js/components/cards/layout/DashboardCard.vue
+++ b/resources/js/components/cards/layout/DashboardCard.vue
@@ -19,21 +19,21 @@ const props = withDefaults(
<template>
<div
:class="[
- `flex col-span-full row-span-${rows} flex-col gap-2 p-3 rounded-xl shadow-lg dark:bg-primary-dark-800/70 bg-white ring-1 ring-gray-900/5 w-full`,
+ `col-span-full flex row-span-${rows} dark:bg-primary-dark-800/70 w-full flex-col gap-2 rounded-xl bg-white p-3 shadow-lg ring-1 ring-gray-900/5`,
`${parseInt(`${cols}`) < 3 ? `sm:col-span-2 lg:col-span-${cols}` : `lg:col-span-${cols}`}`,
]"
>
- <header class="flex flex-wrap justify-between items-center gap-4 mb-3">
- <div class="flex-1 basis-0 grow-10000 max-w-full">
- <div class="flex overflow-hidden gap-2 items-start">
- <div class="[&>svg]:shrink-0 [&>svg]:w-6 [&>svg]:h-6 [&>svg]:stroke-gray-600/80 dark:[&>svg]:stroke-neutral-400/80 text-gray-400 dark:text-neutral-400/80">
+ <header class="mb-3 flex flex-wrap items-center justify-between gap-4">
+ <div class="max-w-full flex-1 grow-10000 basis-0">
+ <div class="flex items-start gap-2 overflow-hidden">
+ <div class="[&>svg]:stroke-foreground-2 text-foreground-3 dark:text-neutral-400/80 [&>svg]:h-6 [&>svg]:w-6 [&>svg]:shrink-0 dark:[&>svg]:stroke-neutral-400/80">
<slot name="icon"></slot>
</div>
<hgroup class="flex flex-wrap items-baseline gap-x-2 overflow-hidden">
- <h2 class="text-base font-bold text-gray-600 dark:text-neutral-300 truncate" :title="title">
+ <h2 class="text-foreground-1 truncate text-base font-medium dark:text-neutral-300" :title="title">
{{ name }}
</h2>
- <p v-if="props.details" class="text-gray-600/80 dark:text-neutral-400/80 font-medium truncate">
+ <p v-if="props.details" class="text-foreground-2 truncate font-medium dark:text-neutral-400/80">
<small class="text-xs">{{ props.details }}</small>
</p>
</hgroup>
diff --git a/resources/js/components/cards/pulse/PulseQueues.vue b/resources/js/components/cards/pulse/PulseQueues.vue
index 4a9f969e..53544aa4 100644
--- a/resources/js/components/cards/pulse/PulseQueues.vue
+++ b/resources/js/components/cards/pulse/PulseQueues.vue
@@ -44,7 +44,7 @@ function scale(data: { [key: string]: any }) {
<IconQueueList />
</template>
<template #actions>
- <div class="flex flex-wrap gap-4 text-xs font-medium text-gray-600 dark:text-gray-400">
+ <div class="text-foreground-1 flex flex-wrap gap-4 text-xs font-medium">
<div class="flex items-center gap-2">
<div class="h-0.5 w-3 rounded-full bg-[rgba(107,114,128,0.5)]"></div>
Queued
diff --git a/resources/js/components/cards/pulse/PulseRequests.vue b/resources/js/components/cards/pulse/PulseRequests.vue
index 2472524a..0f9a2f27 100644
--- a/resources/js/components/cards/pulse/PulseRequests.vue
+++ b/resources/js/components/cards/pulse/PulseRequests.vue
@@ -50,23 +50,23 @@ function scale(data: { [key: string]: any }) {
</template>
<template #actions>
<div class="flex flex-wrap gap-4">
- <div v-if="config.record_informational" class="flex items-center gap-2 text-xs font-medium text-gray-600 dark:text-gray-400">
+ <div v-if="config.record_informational" class="text-foreground-1 flex items-center gap-2 text-xs font-medium">
<div class="h-0.5 w-3 rounded-full" style="background-color: rgba(29, 153, 172, 0.5)"></div>
Informational
</div>
- <div v-if="config.record_successful" class="flex items-center gap-2 text-xs font-medium text-gray-600 dark:text-gray-400">
+ <div v-if="config.record_successful" class="text-foreground-1 flex items-center gap-2 text-xs font-medium">
<div class="h-0.5 w-3 rounded-full bg-[#9333ea]"></div>
Successful
</div>
- <div v-if="config.record_redirection" class="flex items-center gap-2 text-xs font-medium text-gray-600 dark:text-gray-400">
+ <div v-if="config.record_redirection" class="text-foreground-1 flex items-center gap-2 text-xs font-medium">
<div class="h-0.5 w-3 rounded-full bg-[rgba(107,114,128,0.5)]"></div>
Redirection
</div>
- <div v-if="config.record_client_error" class="flex items-center gap-2 text-xs font-medium text-gray-600 dark:text-gray-400">
+ <div v-if="config.record_client_error" class="text-foreground-1 flex items-center gap-2 text-xs font-medium">
<div class="h-0.5 w-3 rounded-full bg-[#eab308]"></div>
Client Error
</div>
- <div v-if="config.record_server_error" class="flex items-center gap-2 text-xs font-medium text-gray-600 dark:text-gray-400">
+ <div v-if="config.record_server_error" class="text-foreground-1 flex items-center gap-2 text-xs font-medium">
<div class="h-0.5 w-3 rounded-full bg-[#e11d48]"></div>
Server Error
</div>
diff --git a/resources/js/components/cards/pulse/PulseServers.vue b/resources/js/components/cards/pulse/PulseServers.vue
index 632081b5..e2c13689 100644
--- a/resources/js/components/cards/pulse/PulseServers.vue
+++ b/resources/js/components/cards/pulse/PulseServers.vue
@@ -39,7 +39,7 @@ watch(
<template>
<section
:class="[
- `scrollbar-minimal scrollbar-thumb:bg-gray-300 dark:scrollbar-thumb:bg-gray-500/50 scrollbar-track:rounded scrollbar-track:bg-gray-100 dark:scrollbar-track:bg-gray-500/10 supports-scrollbars max-w-full overflow-x-auto overflow-y-hidden pb-2`,
+ `scrollbar-minimal scrollbar-track:rounded supports-scrollbars max-w-full overflow-x-auto overflow-y-hidden pb-2`,
`default:col-span-full default:lg:col-span-${props.cols} default:row-span-${props.rows}`,
]"
>
@@ -49,11 +49,11 @@ watch(
>
<div></div>
<div></div>
- <div class="text-left text-xs font-bold text-gray-500 uppercase dark:text-gray-400">CPU</div>
+ <div class="text-foreground-2 text-left text-xs font-bold uppercase">CPU</div>
<div></div>
- <div class="text-left text-xs font-bold text-gray-500 uppercase dark:text-gray-400">Memory</div>
+ <div class="text-foreground-2 text-left text-xs font-bold uppercase">Memory</div>
<div></div>
- <div class="text-left text-xs font-bold text-gray-500 uppercase dark:text-gray-400">Storage</div>
+ <div class="text-foreground-2 text-left text-xs font-bold uppercase">Storage</div>
<template v-for="server in Object.keys(servers)" :key="`${server}-indicator`" class="flex">
<div :class="`flex items-center ${(Object.keys(servers).length ?? 0) > 1 ? 'py-2' : ''}`" :title="`${toTimeSpan(servers[server].updated_at)}`">
<div v-if="servers[server]?.recently_reported" class="mr-1 flex w-5 justify-center">
@@ -65,9 +65,9 @@ watch(
:id="`${server}-name`"
:class="`flex items-center pr-8 xl:pr-12 ${(Object.keys(servers).length ?? 0) > 1 ? 'py-2' : ''} ${!servers[server].recently_reported ? 'animate-pulse opacity-25' : ''}`"
>
- <IconServer class="mr-2 h-6 w-6 stroke-gray-500 dark:stroke-gray-400" />
+ <IconServer class="stroke-foreground-2 mr-2 h-6 w-6" />
<span
- class="text-base font-bold text-gray-600 dark:text-gray-300"
+ class="text-foreground-1 dark:text-foreground-4 text-base font-bold"
:title="`Time: ${format_number(pulseData?.servers?.time ?? 0)}ms; Run at: ${pulseData?.servers?.runAt ? new Date(pulseData?.servers?.runAt).toLocaleDateString() : ''};`"
>
{{ servers[server]?.name }}
diff --git a/resources/js/components/cards/pulse/PulseSlowQueries.vue b/resources/js/components/cards/pulse/PulseSlowQueries.vue
index 8c3bc0cc..c57d43a7 100644
--- a/resources/js/components/cards/pulse/PulseSlowQueries.vue
+++ b/resources/js/components/cards/pulse/PulseSlowQueries.vue
@@ -106,19 +106,15 @@ const config = computed(() => {
<PulseTd class="max-w-px truncate p-0!">
<div class="relative">
<div
- class="block overflow-x-auto rounded-md bg-gray-700 py-4 text-xs whitespace-nowrap text-gray-100 [scrollbar-color:var(--color-gray-500)_transparent] [scrollbar-width:thin] dark:bg-gray-800"
+ class="dark:bg-surface-1 text-foreground-i dark:text-foreground-0 block overflow-x-auto rounded-l-md bg-neutral-800 py-4 text-xs whitespace-nowrap [scrollbar-color:var(--color-neutral-500)_transparent] [scrollbar-width:thin]"
>
<code class="px-3 whitespace-nowrap" v-html="query.sql"></code>
- <p v-if="query.location" class="mt-3 px-3 leading-none text-gray-400 dark:text-gray-500">
+ <p v-if="query.location" class="mt-3 px-3 leading-none text-neutral-400">
{{ query.location }}
</p>
- <p v-if="Array.isArray(config?.threshold)" class="mt-3 px-3 leading-none text-gray-400 dark:text-gray-500">
- {{ query.threshold }}ms threshold
- </p>
+ <p v-if="Array.isArray(config?.threshold)" class="mt-3 px-3 leading-none text-neutral-400">{{ query.threshold }}ms threshold</p>
</div>
- <div
- class="pointer-events-none absolute top-0 right-0 bottom-0 w-3 rounded-r-md bg-linear-to-r from-transparent to-gray-700 dark:to-gray-800"
- ></div>
+ <div class="dark:to-surface-2 pointer-events-none absolute top-0 right-0 bottom-0 w-1 bg-linear-to-r from-transparent to-neutral-800"></div>
</div>
</PulseTd>
<PulseTd :numeric="true" class="text-foreground-6 font-bold">
diff --git a/resources/js/components/dashboard/DashboardAnalytics.vue b/resources/js/components/dashboard/DashboardAnalytics.vue
index 7fe81d50..b0e7593b 100644
--- a/resources/js/components/dashboard/DashboardAnalytics.vue
+++ b/resources/js/components/dashboard/DashboardAnalytics.vue
@@ -81,7 +81,7 @@ watch(
:title="`Set analytics period to ${validPeriod.key}`"
:class="[
'p-0 font-semibold tabular-nums hover:text-gray-400 dark:hover:text-gray-500',
- period === validPeriod.value ? 'text-gray-700 dark:text-gray-300' : 'text-gray-300 dark:text-gray-600',
+ period === validPeriod.value ? 'text-foreground-1 dark:text-foreground-4' : 'dark:text-foreground-3 text-gray-300',
]"
>
{{ validPeriod.key }}
diff --git a/resources/js/components/pulse/PulseScroll.vue b/resources/js/components/pulse/PulseScroll.vue
index dcfb8b2d..a2ffdc5e 100644
--- a/resources/js/components/pulse/PulseScroll.vue
+++ b/resources/js/components/pulse/PulseScroll.vue
@@ -24,14 +24,14 @@ onMounted(async () => {
});
</script>
<template>
- <div :class="`grow flex w-full overflow-hidden ${props.expand ? '' : ' basis-56'} ${loading && 'opacity-25 animate-pulse'}`">
+ <div :class="`flex w-full grow overflow-hidden ${props.expand ? '' : 'basis-56'} ${loading && 'animate-pulse opacity-25'}`">
<div
ref="content"
@scroll.passive="scroll"
- class="grow basis-full overflow-y-auto scrollbar:w-1.5 scrollbar:h-1.5 scrollbar:bg-transparent scrollbar-track:bg-gray-100 scrollbar-thumb:rounded scrollbar-thumb:bg-gray-300 scrollbar-track:rounded dark:scrollbar-track:bg-gray-500/10 dark:scrollbar-thumb:bg-gray-500/50 supports-scrollbars"
+ class="scrollbar:w-1.5 scrollbar:h-1.5 scrollbar:bg-transparent scrollbar-thumb:rounded scrollbar-track:rounded supports-scrollbars scrollbar-minimal grow basis-full overflow-y-auto"
>
<slot></slot>
- <div ref="fade" class="h-6 origin-bottom fixed bottom-0 left-0 right-0 bg-linear-to-t from-white dark:from-gray-900 pointer-events-none" wire:ignore></div>
+ <div ref="fade" class="pointer-events-none fixed right-0 bottom-0 left-0 h-6 origin-bottom bg-linear-to-t from-white dark:from-gray-900" wire:ignore></div>
</div>
</div>
</template>