From 049ea6f26fb2d2f6ada839fb012d17826573f578 Mon Sep 17 00:00:00 2001 From: Joabesv Date: Wed, 11 Dec 2024 18:15:25 -0300 Subject: [PATCH] this code was written in extreme stress, ill debug it later --- src/entrypoints/popup/App.vue | 24 ++++++++++++++++++------ src/entrypoints/sig.content/index.ts | 5 +++-- src/scripts/sig/homepage.ts | 2 +- src/services/next.ts | 1 + 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/entrypoints/popup/App.vue b/src/entrypoints/popup/App.vue index c390db8..046745c 100644 --- a/src/entrypoints/popup/App.vue +++ b/src/entrypoints/popup/App.vue @@ -3,10 +3,22 @@ import { Loader2 } from 'lucide-vue-next' import { useStorage } from '@/composables/useStorage' import { useDateFormat } from '@vueuse/core' import type { Student } from '@/scripts/sig/homepage' +import { getStudent, type MatriculaStudent } from '@/services/next'; const { state: student, isLoading: loading, error } = useStorage('local:student'); +const studentCoefficients = ref() + const formattedDate = useDateFormat(student.value?.lastUpdate, 'DD/MM/YYYY HH:mm', { locales: 'pt-BR' }) + +onMounted(async () => { + if (!student.value) { + return; + } + const matriculaStudent = await getStudent(student.value.login, student.value.ra) + studentCoefficients.value = matriculaStudent; +}) +