mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
Merge branch 'dark-mode' of github.com:crater-invoice/crater into dark-admin-login
This commit is contained in:
@ -28,6 +28,7 @@
|
|||||||
:attributes="attrs"
|
:attributes="attrs"
|
||||||
:model-config="config"
|
:model-config="config"
|
||||||
:masks="masks"
|
:masks="masks"
|
||||||
|
:is-dark="isDarkModeOn"
|
||||||
:locale="global.locale"
|
:locale="global.locale"
|
||||||
>
|
>
|
||||||
<template
|
<template
|
||||||
@ -72,7 +73,7 @@
|
|||||||
|
|
||||||
<template v-if="showExtraOptions" #footer>
|
<template v-if="showExtraOptions" #footer>
|
||||||
<div
|
<div
|
||||||
class="bg-gray-100 grid grid-cols-3 gap-2 p-2 border-t rounded-b-lg"
|
class="bg-gray-100 dark:bg-gray-800 grid grid-cols-3 gap-2 p-2 border-t dark:border-gray-500 rounded-b-lg"
|
||||||
>
|
>
|
||||||
<button type="button" class="extra-button" @click="moveToDate(sourceDate)">
|
<button type="button" class="extra-button" @click="moveToDate(sourceDate)">
|
||||||
{{ global.t('date_picker.same_day') }}
|
{{ global.t('date_picker.same_day') }}
|
||||||
@ -146,7 +147,7 @@ const props = defineProps({
|
|||||||
defaultInputClass: {
|
defaultInputClass: {
|
||||||
type: String,
|
type: String,
|
||||||
default:
|
default:
|
||||||
'border-2 font-base pl-8 py-2 outline-none focus:ring-primary-400 focus:outline-none focus:border-primary-400 block w-full sm:text-sm border-gray-200 rounded-md text-black',
|
'border-2 dark:bg-gray-700 dark:border-gray-600 dark:text-white font-base pl-8 py-2 outline-none focus:ring-primary-400 focus:outline-none focus:border-primary-400 block w-full sm:text-sm border-gray-200 rounded-md text-black',
|
||||||
},
|
},
|
||||||
time24hr: {
|
time24hr: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@ -163,7 +164,7 @@ const props = defineProps({
|
|||||||
sourceDate: {
|
sourceDate: {
|
||||||
type: [String, Date],
|
type: [String, Date],
|
||||||
default: () => new Date(),
|
default: () => new Date(),
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue'])
|
const emit = defineEmits(['update:modelValue'])
|
||||||
@ -175,6 +176,9 @@ const vCalendar = ref(null)
|
|||||||
const hasIconSlot = computed(() => {
|
const hasIconSlot = computed(() => {
|
||||||
return !!slots.icon
|
return !!slots.icon
|
||||||
})
|
})
|
||||||
|
const isDarkModeOn = computed(() =>
|
||||||
|
document.documentElement.classList.contains('dark')
|
||||||
|
)
|
||||||
|
|
||||||
const computedContainerClass = computed(() => {
|
const computedContainerClass = computed(() => {
|
||||||
let containerClass = `${props.containerClass} `
|
let containerClass = `${props.containerClass} `
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
:to="`/${globalStore.companySlug}${item.link}`"
|
:to="`/${globalStore.companySlug}${item.link}`"
|
||||||
:class="[
|
:class="[
|
||||||
hasActiveUrl(item.link)
|
hasActiveUrl(item.link)
|
||||||
? 'border-primary-400 text-primary-600 dark:text-primary-400'
|
? 'text-primary-600 border-primary-600 dark:border-primary-400 dark:text-primary-400'
|
||||||
: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 dark:text-gray-200',
|
: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 dark:text-gray-200',
|
||||||
'inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium',
|
'inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium',
|
||||||
]"
|
]"
|
||||||
|
|||||||
Reference in New Issue
Block a user