Skip to content

Commit

Permalink
dark-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedvaziry committed Jan 10, 2022
1 parent ff86cc9 commit eb98bdf
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion public/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/js/app.js": "/js/app.js?id=3445c4cbe28da8c5bd9b",
"/css/app.css": "/css/app.css?id=a1ae12f8cbcc3696a78c"
"/js/app.js": "/js/app.js?id=3ee64901dfc7c91aa6bf",
"/css/app.css": "/css/app.css?id=72db21d04a6f1275979b"
}
18 changes: 9 additions & 9 deletions resources/js/components/App.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div class="w-full min-h-screen">
<div v-if="loaded">
<div class="bg-white shadow">
<div class="bg-white dark:bg-gray-800 shadow">
<div class="max-w-5xl flex items-center justify-between mx-auto py-7 px-5">
<h2 class="text-2xl">Monitoring Dashboard</h2>
<h2 class="text-2xl dark:text-gray-300">Monitoring Dashboard</h2>
<div class="flex items-center">
<v-select class="mr-2" v-model="duration">
<option value="hour">Hour</option>
Expand All @@ -19,36 +19,36 @@
<div class="mb-10" v-for="(instance, i) in instances" :key="`instance-${i}`">
<div class="grid grid-cols-4 gap-3">
<div class="col-span-1 mr-5">
<div class="bg-white rounded-md shadow p-3 flex items-center justify-between">
<div class="bg-white dark:bg-gray-800 rounded-md shadow p-3 flex items-center justify-between">
<svg class="fill-current text-indigo-600 w-8 h-8" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="server" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M480 160H32c-17.673 0-32-14.327-32-32V64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm112 248H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm112 248H32c-17.673 0-32-14.327-32-32v-64c0-17.673 14.327-32 32-32h448c17.673 0 32 14.327 32 32v64c0 17.673-14.327 32-32 32zm-48-88c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24zm-64 0c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24z"></path></svg>
<div class="text-lg">{{ instance }}</div>
<div class="text-lg dark:text-gray-300">{{ instance }}</div>
</div>
<div class="bg-white rounded-md shadow p-3 flex items-center justify-between mt-3">
<div class="bg-white dark:bg-gray-800 rounded-md shadow p-3 flex items-center justify-between mt-3">
<svg class="fill-current text-gray-500 w-8 h-8" aria-hidden="true" focusable="false" data-prefix="far" data-icon="bell" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M439.39 362.29c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71zM67.53 368c21.22-27.97 44.42-74.33 44.53-159.42 0-.2-.06-.38-.06-.58 0-61.86 50.14-112 112-112s112 50.14 112 112c0 .2-.06.38-.06.58.11 85.1 23.31 131.46 44.53 159.42H67.53zM224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64z"></path></svg>
<div class="text-lg">
<v-alert :alert="alerts[instance]" :instance="instance" />
</div>
</div>
<div class="bg-white rounded-md shadow p-3 flex items-center justify-between mt-3">
<div class="bg-white dark:bg-gray-800 rounded-md shadow p-3 flex items-center justify-between mt-3">
<svg class="fill-current text-gray-500 w-8 h-8" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="microchip" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M416 48v416c0 26.51-21.49 48-48 48H144c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h224c26.51 0 48 21.49 48 48zm96 58v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42V88h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zm0 96v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42v-48h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zm0 96v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42v-48h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zm0 96v12a6 6 0 0 1-6 6h-18v6a6 6 0 0 1-6 6h-42v-48h42a6 6 0 0 1 6 6v6h18a6 6 0 0 1 6 6zM30 376h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6zm0-96h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6zm0-96h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6zm0-96h42v48H30a6 6 0 0 1-6-6v-6H6a6 6 0 0 1-6-6v-12a6 6 0 0 1 6-6h18v-6a6 6 0 0 1 6-6z"></path></svg>
<div class="text-2xl font-bold">
<v-usage :value="parseFloat(records[instance].cpu)" />
</div>
</div>
<div class="bg-white rounded-md shadow p-3 flex items-center justify-between mt-3">
<div class="bg-white dark:bg-gray-800 rounded-md shadow p-3 flex items-center justify-between mt-3">
<svg class="fill-current text-gray-500 w-8 h-8" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="memory" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M640 130.94V96c0-17.67-14.33-32-32-32H32C14.33 64 0 78.33 0 96v34.94c18.6 6.61 32 24.19 32 45.06s-13.4 38.45-32 45.06V320h640v-98.94c-18.6-6.61-32-24.19-32-45.06s13.4-38.45 32-45.06zM224 256h-64V128h64v128zm128 0h-64V128h64v128zm128 0h-64V128h64v128zM0 448h64v-26.67c0-8.84 7.16-16 16-16s16 7.16 16 16V448h128v-26.67c0-8.84 7.16-16 16-16s16 7.16 16 16V448h128v-26.67c0-8.84 7.16-16 16-16s16 7.16 16 16V448h128v-26.67c0-8.84 7.16-16 16-16s16 7.16 16 16V448h64v-96H0v96z"></path></svg>
<div class="text-2xl font-bold">
<v-usage :value="parseFloat(records[instance].memory)" />
</div>
</div>
<div class="bg-white rounded-md shadow p-3 flex items-center justify-between mt-3">
<div class="bg-white dark:bg-gray-800 rounded-md shadow p-3 flex items-center justify-between mt-3">
<svg class="fill-current text-gray-500 w-8 h-8" aria-hidden="true" focusable="false" data-prefix="far" data-icon="save" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM272 80v80H144V80h128zm122 352H54a6 6 0 0 1-6-6V86a6 6 0 0 1 6-6h42v104c0 13.255 10.745 24 24 24h176c13.255 0 24-10.745 24-24V83.882l78.243 78.243a6 6 0 0 1 1.757 4.243V426a6 6 0 0 1-6 6zM224 232c-48.523 0-88 39.477-88 88s39.477 88 88 88 88-39.477 88-88-39.477-88-88-88zm0 128c-22.056 0-40-17.944-40-40s17.944-40 40-40 40 17.944 40 40-17.944 40-40 40z"></path></svg>
<div class="text-2xl font-bold">
<v-usage :value="parseFloat(records[instance].disk)" />
</div>
</div>
</div>
<div class="col-span-3 bg-white rounded-md shadow p-3" style="height: 329px">
<div class="col-span-3 bg-white dark:bg-gray-800 dark:text-gray-300 rounded-md shadow p-3" style="height: 329px">
<canvas :id="`${instance}-chart`" height="304" width="700" class="mx-auto"></canvas>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/DialogForm.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<modal :show="show" :max-width="maxWidth" :closeable="closeable" @close="close">
<div class="px-6 py-4">
<div class="text-lg">
<div class="text-lg dark:text-gray-300">
<slot name="title">
</slot>
</div>
Expand All @@ -16,7 +16,7 @@
</div>
</div>

<div class="px-6 py-4 bg-gray-100 text-right">
<div class="px-6 py-4 bg-gray-100 dark:bg-gray-700 text-right">
<slot name="actions"></slot>
</div>
</modal>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/DialogModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</div>
</div>

<div class="px-6 py-4 bg-gray-100 text-right">
<div class="px-6 py-4 bg-gray-100 dark:bg-gray-700 text-right">
<slot name="footer">
</slot>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/Input.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<input class="py-2 px-3 focus:outline-none border border-gray-300 focus:ring focus:ring-indigo-300 focus:border-gray-400 focus:ring-opacity-50 rounded-md shadow-sm disabled:bg-gray-100 mt-1 block w-full" :value="modelValue" @input="$emit('update:modelValue', $event.target.value)" ref="input">
<input class="py-2 px-3 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-700 focus:outline-none border border-gray-300 focus:ring focus:ring-indigo-300 focus:border-gray-400 focus:ring-opacity-50 rounded-md shadow-sm disabled:bg-gray-100 dark:disabled:bg-gray-700 mt-1 block w-full" :value="modelValue" @input="$emit('update:modelValue', $event.target.value)" ref="input">
</template>

<script>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/Label.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<label class="block font-medium text-sm text-gray-700">
<label class="block font-medium text-sm text-gray-700 dark:text-gray-300">
<span v-if="value">{{ value }}</span>
<span v-else>
<slot></slot>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
leave-active-class="ease-in duration-200"
leave-from-class="opacity-100 translate-y-0 sm:scale-100"
leave-to-class="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95">
<div v-show="show" class="mb-6 bg-white rounded-md overflow-hidden shadow-xl transform transition-all sm:w-full sm:mx-auto" :class="maxWidthClass">
<div v-show="show" class="mb-6 bg-white dark:bg-gray-800 rounded-md overflow-hidden shadow-xl transform transition-all sm:w-full sm:mx-auto" :class="maxWidthClass">
<slot v-if="show"></slot>
</div>
</transition>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/SecondaryButton.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<button :type="type" class="w-max inline-flex items-center px-4 py-1 bg-white border border-gray-300 rounded-md font-semibold text-gray-700 shadow-sm hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:ring focus:ring-blue-200 active:text-gray-800 active:bg-gray-50 disabled:opacity-25 transition">
<button :type="type" class="w-max inline-flex items-center px-4 py-1 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-800 rounded-md font-semibold text-gray-700 dark:text-gray-300 shadow-sm hover:text-gray-500 focus:outline-none focus:border-indigo-300 focus:ring focus:ring-indigo-200 disabled:opacity-25 transition">
<slot></slot>
</button>
</template>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/Select.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<select class="py-1 px-3 focus:outline-none border border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 rounded-md shadow-sm" :value="modelValue" @input="$emit('update:modelValue', $event.target.value)" ref="select">
<select class="dark:bg-gray-900 dark:border-transparent dark:text-gray-300 py-1 px-3 focus:outline-none border border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 rounded-md shadow-sm" :value="modelValue" @input="$emit('update:modelValue', $event.target.value)" ref="select">
<slot></slot>
</select>
</template>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}
</script>
</head>
<body class="bg-gray-100 min-h-screen text-gray-700 min-w-max">
<body class="bg-gray-100 dark:bg-gray-900 min-h-screen text-gray-700 min-w-max">
<div id="app" class="min-h-screen">
<app></app>
</div>
Expand Down

0 comments on commit eb98bdf

Please sign in to comment.