add Python server backend
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2024-05-11 14:06:39 +02:00
parent 14d63294a3
commit cd3afa4d61
22 changed files with 1896 additions and 119 deletions

View File

@@ -15,11 +15,13 @@ import NavBar from '@/components/NavBar.vue'
import TimeWindows from '@/components/TimeWindows.vue'
import Chart from '@/components/Chart.vue'
import { windows } from '@/utils/helpers'
import type { Window, NavType } from '@/utils/types'
import type { Window, NavTypes } from '@/utils/types'
import { navTypes } from '@/utils/types'
const defaultWindow = windows[1]
const defaultType = navTypes[0]
const activeType = ref<NavType>()
const activeType = ref<NavTypes>()
const activeWindow = ref<Window>(defaultWindow)
const router = useRouter()
@@ -27,9 +29,10 @@ const route = useRoute()
const urlEncodeWindow = (label: string) => label.replace(' ', '-')
if (route.params.type) activeType.value = route.params.type as NavType
if (route.params.type)
// activeType.value = (navTypes.includes(route.params.type.toString()) ? route.params.type : navTypes[0]) as NavTypes
activeType.value = (navTypes.find((t) => t === route.params.type) || defaultType) as NavTypes
if (route.params.window) {
console.log(route.params.window, windows)
activeWindow.value = windows.find((w) => urlEncodeWindow(w.label) === route.params.window) || defaultWindow
}