Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into SSGDHA-199-Finaliza-o-do-m…
Browse files Browse the repository at this point in the history
…odal-de-Turmas-Di-rios
  • Loading branch information
Sr-Iury committed Oct 26, 2024
2 parents 7892cf9 + 68997b4 commit a23033d
Show file tree
Hide file tree
Showing 14 changed files with 14,031 additions and 13,972 deletions.
5 changes: 2 additions & 3 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<script lang="ts" setup>
import { ref } from 'vue';
const { isDark } = useCustomTheme();
setupApiClient();
setupApiClient();
const dayjs = useDayJs();
const selectedDay = ref(dayjs());
Expand Down Expand Up @@ -34,4 +32,5 @@ provide('selectedDay', selectedDay);

<style>
@import '~/styles/app.css';
/* @import '~/assets/styles/themes/theme.css'; */
</style>
4 changes: 4 additions & 0 deletions assets/styles/themes/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
--sisgha-theme-primary-half: 156, 207, 163;

--sisgha-theme-divider: 0, 0, 0;

--ladesa-card: 87, 239, 87; /*57ed57*/
}

.app-color-mode-dark {
Expand All @@ -25,6 +27,8 @@
--sisgha-theme-primary-half: 37, 90, 45;

--sisgha-theme-divider: 255, 255, 255;

--ladesa-card: 35, 180, 93; /*23b45d*/
}

.app {
Expand Down
18 changes: 10 additions & 8 deletions components/UI/Layouts/Dashboard/Sisgha/Dape/Sidebar/Items/Items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,50 @@ import iconPerfil from '~/assets/icons/Usuario.svg';
import iconUsuarios from '~/assets/icons/Usuarios.svg';
import type { ISidebarItem } from '../../../../../../../Sidebar/ISidebarItem';

const CAMINHO_DAPE: string = '/sisgha/dape';

export const useLayoutsDashboardSisghaDapeSidebarItems = () => {
const items: ISidebarItem[] = [
{
type: 'link',
title: 'Início',
icon: iconHome,
to: '/sisgha/dape',
to: `${CAMINHO_DAPE}/`,
exact: true,
},
{
type: 'link',
title: 'Turmas',
icon: iconTurmas,
to: '/sisgha/dape/turmas',
to: `${CAMINHO_DAPE}/turmas`,
exact: false,
},
{
type: 'link',
title: 'Disciplinas',
icon: iconDisciplina,
to: '/sisgha/dape/disciplinas',
to: `${CAMINHO_DAPE}/disciplinas`,
exact: false,
},
{
type: 'link',
title: 'Perfil',
icon: iconPerfil,
to: '/perfil',
to: `${CAMINHO_DAPE}/perfil`,
exact: false,
},
{
type: 'link',
title: 'Diários',
icon: iconDiario,
to: '/sisgha/dape/diarios',
to: '/dashboard/diarios', //alterar depois que terminar a configuração da tela
exact: false,
},
{
type: 'link',
title: 'Calendário',
icon: iconCalendario,
to: '/sisgha/dape/calendario',
to: `${CAMINHO_DAPE}/calendario`,
exact: false,
},
{
Expand All @@ -63,14 +65,14 @@ export const useLayoutsDashboardSisghaDapeSidebarItems = () => {
type: 'link',
title: 'Usuários',
icon: iconUsuarios,
to: '/sisgha/dape/usuarios',
to: `${CAMINHO_DAPE}/usuarios`,
exact: false,
},
{
type: 'link',
title: 'Cursos',
icon: iconCursos,
to: '/sisgha/dape/cursos',
to: `${CAMINHO_DAPE}/cursos`,
exact: false,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,31 @@ import iconLogout from '~/assets/icons/Logout.svg';
import iconPerfil from '~/assets/icons/Usuario.svg';
import type { ISidebarItem } from '../../../../../../../Sidebar/ISidebarItem';

const CAMINHO_PROFESSOR: string = '/sisgha/professor';

export const useLayoutsDashboardSisghaProfessorSidebarItems = () => {
const items: ISidebarItem[] = [
{
type: 'link',
title: 'Início',
icon: iconHome,
to: '/sisgha/professor',
to: `${CAMINHO_PROFESSOR}/`,
exact: true,
},

{
type: 'link',
title: 'Perfil',
icon: iconPerfil,
to: '/perfil',
to: `${CAMINHO_PROFESSOR}/perfil`,
exact: false,
},

{
type: 'link',
title: 'Calendário',
icon: iconCalendario,
to: '/calendario',
to: `${CAMINHO_PROFESSOR}/calendario`,
exact: false,
},

Expand Down
31 changes: 17 additions & 14 deletions composables/useCustomTheme.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
import { useDark, useToggle } from '@vueuse/core';

// composables/useCustomTheme.ts
export function useCustomTheme() {
const { $vuetify } = useNuxtApp();

const isDark = useDark({
valueDark: 'dark',
valueLight: 'light',
initialValue: 'light',
onChanged: (dark: boolean) => {
$vuetify.theme.global.name.value = dark ? 'dark' : 'light';
},
});
const colorMode = useColorMode();

const changeTheme = () => {
colorMode.preference = (colorMode.preference === 'dark' ? 'light' : 'dark');
}

const toggle = useToggle(isDark);
const isDark = computed(() =>{
return colorMode.value === 'dark';
})

watch(isDark, () => {
if (isDark.value)
$vuetify.theme.global.name.value = 'dark';
else
$vuetify.theme.global.name.value = 'light';
}, { immediate: true });

return { isDark, toggle };
}
return { changeTheme, isDark };
}
13 changes: 13 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,23 @@ export default defineNuxtConfig({
modules: [
'@sidebase/nuxt-auth',
'@nuxtjs/tailwindcss',
'@nuxtjs/color-mode',
'vue3-carousel-nuxt',
'vuetify-nuxt-module',
],

tailwindcss: {
configPath: './tailwind.config.mts',
},

// ==============================================

colorMode: {
preference: 'system',
classPrefix: '',
classSuffix: '',
},

// ==============================================

auth: {
Expand Down
Loading

0 comments on commit a23033d

Please sign in to comment.