fix actionable + lightmode

This commit is contained in:
Emily
2025-01-20 14:47:57 +01:00
parent 6b5d23566c
commit 3923a06e9b
4 changed files with 9 additions and 7 deletions

View File

@@ -251,7 +251,7 @@ const { data: maxProjects } = useFetch("/api/user/max_projects", {
</div>
<div class="w-full flex mt-4">
<LyxUiButton type="outline" class="w-full text-center text-[.8rem]">
<LyxUiButton @click="generatePDF()" type="outline" class="w-full text-center text-[.8rem]">
Export report
</LyxUiButton>
</div>

View File

@@ -1,9 +1,10 @@
<script lang="ts" setup>
import type { ButtonType } from '../LyxUi/Button.vue';
const emit = defineEmits(['success', 'cancel'])
const props = defineProps<{
buttonType: string,
buttonType: ButtonType,
message: string,
deleteData: { isAll: boolean, visits: boolean, sessions: boolean, events: boolean, domain: string }
}>();
@@ -47,7 +48,7 @@ async function deleteData() {
overlay: {
background: 'bg-lyx-background/85'
},
background: 'bg-lyx-widget',
background: 'bg-lyx-lightmode-widget dark:bg-lyx-widget',
ring: 'border-solid border-[1px] border-[#262626]'
}">
<div class="h-full flex flex-col gap-2 p-4">
@@ -71,7 +72,8 @@ async function deleteData() {
<div v-if="!isDone" class="flex justify-end gap-2">
<LyxUiButton type="secondary" @click="emit('cancel')"> Cancel </LyxUiButton>
<LyxUiButton :disabled="!canDelete" @click="canDelete ? deleteData() : () => { }" :type="buttonType"> Confirm </LyxUiButton>
<LyxUiButton :disabled="!canDelete" @click="canDelete ? deleteData() : () => { }" :type="buttonType">
Confirm </LyxUiButton>
</div>
<div v-if="isDone" class="flex justify-end w-full">

View File

@@ -76,7 +76,7 @@ export function getDefaultSnapshots(project_id: TProjectSnapshot['project_id'],
project_id,
_id: '___allTime' as any,
name: 'All Time',
from: new Date(project_created_at.toString()),
from: fns.addMinutes(fns.startOfMonth(new Date(project_created_at.toString())), -new Date().getTimezoneOffset()),
to: new Date(Date.now()),
color: '#9362FF',
default: true

View File

@@ -37,7 +37,7 @@ class DateService {
if (slice === 'hour') return fns.format(date, 'HH:mm');
if (slice === 'day') return fns.format(date, 'dd/MM');
if (slice === 'week') return fns.format(date, 'dd/MM');
if (slice === 'month') return fns.format(date, 'MM MMMM');
if (slice === 'month') return fns.format(date, 'MMMM');
if (slice === 'year') return fns.format(date, 'YYYY');
return iso;
}