Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jazzma/pwc menus #202

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 22 additions & 16 deletions src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import { createRouter, createWebHistory, RouteRecordRaw, RouteComponent, RouteLocationNormalized, NavigationGuardNext } from 'vue-router';
import useAuthenticationStore from '@/stores/authentication';

const Home:RouteComponent = () => import('@/views/Home/Home.vue');
const GpaCalculator:RouteComponent = () => import('@/views/GpaCalculator/GpaCalculator.vue');
const BellSchedules:RouteComponent = () => import('@/views/Bell Schedules/BellSchedules.vue');
const Calendar:RouteComponent = () => import('@/views/Calendar/Calendar.vue');
const Links:RouteComponent = () => import('@/views/Links/Links.vue');
const Colors:RouteComponent = () => import('@/views/Colors/Colors.vue');
const Settings:RouteComponent = () => import('@/views/Settings/Settings.vue');
const Tools:RouteComponent = () => import('@/views/Tools/Tools.vue');
const Documents:RouteComponent = () => import('@/views/Documents/Documents.vue');
const AddSchedule:RouteComponent = () => import('@/views/Settings/Add Schedule/AddSchedule.vue');
const Login:RouteComponent = () => import('@/views/Login/Login.vue');
const Code:RouteComponent = () => import('@/views/Code/Code.vue');
const QRCode:RouteComponent = () => import('@/views/QRCodes/QRCodes.vue');
const GetHelp:RouteComponent = () => import('@/views/GetHelp/GetHelp.vue');
const Home: RouteComponent = () => import('@/views/Home/Home.vue');
const GpaCalculator: RouteComponent = () => import('@/views/GpaCalculator/GpaCalculator.vue');
const BellSchedules: RouteComponent = () => import('@/views/Bell Schedules/BellSchedules.vue');
const Calendar: RouteComponent = () => import('@/views/Calendar/Calendar.vue');
const Links: RouteComponent = () => import('@/views/Links/Links.vue');
const Colors: RouteComponent = () => import('@/views/Colors/Colors.vue');
const Settings: RouteComponent = () => import('@/views/Settings/Settings.vue');
const Tools: RouteComponent = () => import('@/views/Tools/Tools.vue');
const Documents: RouteComponent = () => import('@/views/Documents/Documents.vue');
const AddSchedule: RouteComponent = () => import('@/views/Settings/Add Schedule/AddSchedule.vue');
const Login: RouteComponent = () => import('@/views/Login/Login.vue');
const Code: RouteComponent = () => import('@/views/Code/Code.vue');
const QRCode: RouteComponent = () => import('@/views/QRCodes/QRCodes.vue');
const GetHelp: RouteComponent = () => import('@/views/GetHelp/GetHelp.vue');
const Jukebox: RouteComponent = () => import('@/views/Jukebox/Jukebox.vue');
const JazzmanMenu: RouteComponent = () => import('@/views/JazzmanMenu/JazzmanMenu.vue');


type EditScheduleProps = {
Expand Down Expand Up @@ -103,6 +104,11 @@ const routes: Array<RouteRecordRaw> = [
path: '/jukebox',
component: Jukebox,
},
{
name: 'JazzmanMenu',
path: '/jazzmanMenu',
component: JazzmanMenu,
},
];

const router = createRouter({
Expand All @@ -117,7 +123,7 @@ const router = createRouter({
});

// ensure any page with requiresAuth set to true will redirect through the login proxy component
router.beforeEach((to:RouteLocationNormalized, from:RouteLocationNormalized, next:NavigationGuardNext) => {
router.beforeEach((to: RouteLocationNormalized, from: RouteLocationNormalized, next: NavigationGuardNext) => {
// check if to requires auth
if (to.matched.some((record) => record.meta && record.meta.requiresAuth)) {
// check if we are already authenticated, and continue ahead if we are
Expand All @@ -136,4 +142,4 @@ router.beforeEach((to:RouteLocationNormalized, from:RouteLocationNormalized, nex
}
});

export default router;
export default router;
9 changes: 7 additions & 2 deletions src/views/Home/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<holiday-card />
<schedule-card />
<weather-card />
<pwc-card/>
<pwc-card />
<lunch-card />
<upcoming-events-card />

Expand All @@ -35,6 +35,8 @@

<icon-text-card :icon="icons.faRadio" text="Jukebox" link="jukebox" />

<icon-text-card :icon="icons.faMugSaucer" text="Jazzman's Menu" link="jazzmanMenu" />

<icon-text-card :icon="icons.faCalculator"
text="GPA Calculator"
link="gpaCalculator"
Expand Down Expand Up @@ -64,6 +66,7 @@ import {
faHourglass,
faQrcode,
faRadio,
faMugSaucer,
} from "@fortawesome/free-solid-svg-icons";
import { mapActions } from "pinia";
import CardContainer from "@/components/CardContainer.vue";
Expand Down Expand Up @@ -96,6 +99,7 @@ export default {
ScheduleCard,
WeatherCard,
PwcCard,

HolidayCard,
ContributeCard,
NewThemeCard,
Expand All @@ -119,6 +123,7 @@ export default {
faHourglass,
faQrcode,
faRadio,
faMugSaucer,

},
fullScreenMode: false,
Expand Down Expand Up @@ -149,4 +154,4 @@ export default {
.card-container .card:nth-child(#{$i})
+animate-fade-up
animation-delay: $i * 0.011s
</style>
</style>
Loading