Skip to content

A self-hosted media server and file management system

fix: donut chart shrinks

aminnausin6431d250d018
diff --git a/resources/css/theme.css b/resources/css/theme.css
index 11439a9c..38e90636 100644
--- a/resources/css/theme.css
+++ b/resources/css/theme.css
@@ -243,6 +243,10 @@
@apply focus:bg-surface-3 hover:bg-surface-3;
}
+ .suspense {
+ @apply bg-foreground-2/50 animate-pulse;
+ }
+
.suspense-rounded {
@apply bg-foreground-2/50 my-auto animate-pulse rounded-full;
}
diff --git a/resources/js/components/cards/data/TaskCard.vue b/resources/js/components/cards/data/TaskCard.vue
index 1a181d18..9c58bf0b 100644
--- a/resources/js/components/cards/data/TaskCard.vue
+++ b/resources/js/components/cards/data/TaskCard.vue
@@ -140,7 +140,7 @@ watch(
<PulseDoughnutChart
v-if="isScreenSmall ?? false"
v-cloak
- class="size-6!"
+ class="size-6 shrink-0"
:chart-options="{
borderWidth: 0,
plugins: {
diff --git a/resources/js/components/cards/pulse/PulseServers.vue b/resources/js/components/cards/pulse/PulseServers.vue
index e2c13689..a5657219 100644
--- a/resources/js/components/cards/pulse/PulseServers.vue
+++ b/resources/js/components/cards/pulse/PulseServers.vue
@@ -228,36 +228,34 @@ watch(
<span class="text-lg font-bold text-gray-700 dark:text-gray-200">{{ friendlyFileSize(storage.used, 1) }}</span>
<span class="text-sm font-medium text-gray-500 dark:text-gray-400">/ {{ friendlyFileSize(storage.total, 1) }}</span>
</div>
- <div>
- <PulseDoughnutChart
- class="h-8 w-8"
- :chart-data="{
- labels: ['Used', 'Free'],
- datasets: [
- {
- data: [storage.used, storage.total - storage.used],
- backgroundColor: ['#9333ea', '#c084fc30'],
- hoverBackgroundColor: ['#9333ea', '#c084fc30'],
- },
- ],
- }"
- :chart-options="{
- borderWidth: 0,
- plugins: {
- legend: {
- display: false,
- },
- tooltip: {
- enabled: false,
- callbacks: {
- label: (context: any) => context.formattedValue + ' MB',
- },
- displayColors: false,
+ <PulseDoughnutChart
+ class="size-9"
+ :chart-data="{
+ labels: ['Used', 'Free'],
+ datasets: [
+ {
+ data: [storage.used, storage.total - storage.used],
+ backgroundColor: ['#9333ea', '#c084fc30'],
+ hoverBackgroundColor: ['#9333ea', '#c084fc30'],
+ },
+ ],
+ }"
+ :chart-options="{
+ borderWidth: 0,
+ plugins: {
+ legend: {
+ display: false,
+ },
+ tooltip: {
+ enabled: false,
+ callbacks: {
+ label: (context: any) => context.formattedValue + ' MB',
},
+ displayColors: false,
},
- }"
- />
- </div>
+ },
+ }"
+ />
</div>
</div>
</template>