Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

Bug fixes #16

Merged
merged 12 commits into from
Oct 1, 2022
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ pnpm-debug.log*
*.njsproj
*.sln
*.sw?
*.mk


# Yarn
.yarn/*
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
"version": "0.1.0",
"private": true,
"scripts": {
"start": "vue-cli-service serve",
"start": "vue-cli-service serve --port 9001",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"serve:standalone": "vue-cli-service serve --mode standalone"
},
"dependencies": {
"click-outside-vue3": "4.0.1",
"core-js": "^3.6.5",
"single-spa-vue": "^2.1.0",
"vue": "^3.0.0"
"v-calendar": "^3.0.0-alpha.8",
"vue": "^3.0.0",
"vue-router": "^4.1.5"
},
"devDependencies": {
"@babel/core": "^7.12.16",
Expand Down
59 changes: 17 additions & 42 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,46 +1,30 @@
<template>
<div>
<navbar-component @route="path_change" :mobile="isMobile()" />
<appbar-component v-if="show_appbar" :mobile="isMobile()" />
<app-menu @route="capture_navigation" v-if="show_appmenu" :mobile="isMobile()"></app-menu>
<navbar-top />
<navbar-main :mobile="isMobile()" @navigate-url="
(newPath, oldPath) => {
capture_navigation(oldPath, newPath);
}" />
</div>
</template>

<script>
import NavbarComponent from "@/components/Navbar";
import AppbarComponent from "@/components/Appbar";
import AppMenu from "@/components/AppMenu";

export default {
components: {
NavbarComponent,
AppbarComponent,
AppMenu,
},
data() {
return {
show_appbar: false,
};
},
import NavbarMain from "./components/NavbarMain.vue";
import NavbarTop from "./components/NavbarTop.vue"; export
default {
components: { NavbarTop, NavbarMain },
data() { return { show_appbar: false, }; },
methods: {
isMobile() {
if (
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
navigator.userAgent
)
) {
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
return true;
} else {
return false;
}
} else { return false; }
},
capture_navigation(from, to) {
async capture_navigation(from, to) {
if (from === to) return;
try {
fetch(`${process.env.VUE_APP_API_MARKETING}/action`, {
method: "POST",
cache: "no-cache",
redirect: "follow",
method: "POST", cache: "no-cache", redirect: "follow",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
user_id: localStorage.getItem("marketing-id"),
Expand All @@ -50,17 +34,8 @@ export default {
}),
});
} catch {
// Failed, skips
//Failed, skips
}
},
path_change(to) {
this.capture_navigation(window.location.pathname, to);
this.show_appbar = to.includes("/timetable") ? false : true;
this.show_appmenu = to.includes("/apps") ? true : false;
},
},
beforeMount() {
this.path_change(window.location.pathname);
},
};
</script>
}, beforeMount() { },
}; </script>
79 changes: 0 additions & 79 deletions src/components/AppMenu.vue

This file was deleted.

34 changes: 0 additions & 34 deletions src/components/Appbar.vue

This file was deleted.

39 changes: 0 additions & 39 deletions src/components/Menu/Grid.vue

This file was deleted.

45 changes: 0 additions & 45 deletions src/components/Menu/GridItem.vue

This file was deleted.

39 changes: 0 additions & 39 deletions src/components/Menu/List.vue

This file was deleted.

35 changes: 0 additions & 35 deletions src/components/Menu/ListItem.vue

This file was deleted.

Loading