commit 7bdf0f2eee8a4a6642ebf8fda74fbfe2447bb04b Author: nikolaus.feith Date: Tue Feb 14 17:13:15 2023 +0100 initial Commit diff --git a/ActiveBOWeb/.eslintrc.cjs b/ActiveBOWeb/.eslintrc.cjs new file mode 100644 index 0000000..dc51c01 --- /dev/null +++ b/ActiveBOWeb/.eslintrc.cjs @@ -0,0 +1,15 @@ +/* eslint-env node */ +require("@rushstack/eslint-patch/modern-module-resolution"); + +module.exports = { + root: true, + extends: [ + "plugin:vue/vue3-essential", + "eslint:recommended", + "@vue/eslint-config-typescript", + "@vue/eslint-config-prettier", + ], + parserOptions: { + ecmaVersion: "latest", + }, +}; diff --git a/ActiveBOWeb/.gitignore b/ActiveBOWeb/.gitignore new file mode 100644 index 0000000..38adffa --- /dev/null +++ b/ActiveBOWeb/.gitignore @@ -0,0 +1,28 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +.DS_Store +dist +dist-ssr +coverage +*.local + +/cypress/videos/ +/cypress/screenshots/ + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/ActiveBOWeb/.prettierrc.json b/ActiveBOWeb/.prettierrc.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/ActiveBOWeb/.prettierrc.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/ActiveBOWeb/.vscode/extensions.json b/ActiveBOWeb/.vscode/extensions.json new file mode 100644 index 0000000..c0a6e5a --- /dev/null +++ b/ActiveBOWeb/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"] +} diff --git a/ActiveBOWeb/README.md b/ActiveBOWeb/README.md new file mode 100644 index 0000000..d46a895 --- /dev/null +++ b/ActiveBOWeb/README.md @@ -0,0 +1,46 @@ +# ActiveBOWeb + +This template should help get you started developing with Vue 3 in Vite. + +## Recommended IDE Setup + +[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin). + +## Type Support for `.vue` Imports in TS + +TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types. + +If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps: + +1. Disable the built-in TypeScript Extension + 1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette + 2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)` +2. Reload the VSCode window by running `Developer: Reload Window` from the command palette. + +## Customize configuration + +See [Vite Configuration Reference](https://vitejs.dev/config/). + +## Project Setup + +```sh +npm install +``` + +### Compile and Hot-Reload for Development + +```sh +npm run dev +``` + +### Type-Check, Compile and Minify for Production + +```sh +npm run build +``` + +### Lint with [ESLint](https://eslint.org/) + +```sh +npm run lint +``` diff --git a/ActiveBOWeb/env.d.ts b/ActiveBOWeb/env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/ActiveBOWeb/env.d.ts @@ -0,0 +1 @@ +/// diff --git a/ActiveBOWeb/index.html b/ActiveBOWeb/index.html new file mode 100644 index 0000000..1d05dca --- /dev/null +++ b/ActiveBOWeb/index.html @@ -0,0 +1,13 @@ + + + + + + + Vite App + + +
+ + + diff --git a/ActiveBOWeb/package.json b/ActiveBOWeb/package.json new file mode 100644 index 0000000..7b6c8da --- /dev/null +++ b/ActiveBOWeb/package.json @@ -0,0 +1,36 @@ +{ + "name": "activeboweb", + "version": "0.0.0", + "private": true, + "scripts": { + "dev": "vite", + "build": "run-p type-check build-only", + "preview": "vite preview", + "build-only": "vite build", + "type-check": "vue-tsc --noEmit", + "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" + }, + "dependencies": { + "pinia": "^2.0.30", + "roslib": "^1.3.0", + "vue": "^3.2.45", + "vuetify": "^3.1.4" + }, + "devDependencies": { + "@mdi/font": "^7.1.96", + "@rushstack/eslint-patch": "^1.1.4", + "@types/node": "^18.11.12", + "@vitejs/plugin-vue": "^4.0.0", + "@vitejs/plugin-vue-jsx": "^3.0.0", + "@vue/eslint-config-prettier": "^7.0.0", + "@vue/eslint-config-typescript": "^11.0.0", + "@vue/tsconfig": "^0.1.3", + "eslint": "^8.22.0", + "eslint-plugin-vue": "^9.3.0", + "npm-run-all": "^4.1.5", + "prettier": "^2.7.1", + "typescript": "~4.7.4", + "vite": "^4.0.0", + "vue-tsc": "^1.0.12" + } +} diff --git a/ActiveBOWeb/public/favicon.ico b/ActiveBOWeb/public/favicon.ico new file mode 100644 index 0000000..df36fcf Binary files /dev/null and b/ActiveBOWeb/public/favicon.ico differ diff --git a/ActiveBOWeb/src/App.vue b/ActiveBOWeb/src/App.vue new file mode 100644 index 0000000..aa5ae55 --- /dev/null +++ b/ActiveBOWeb/src/App.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/ActiveBOWeb/src/assets/CPS_Logo_Black.png b/ActiveBOWeb/src/assets/CPS_Logo_Black.png new file mode 100644 index 0000000..ed16d0f Binary files /dev/null and b/ActiveBOWeb/src/assets/CPS_Logo_Black.png differ diff --git a/ActiveBOWeb/src/assets/CPS_Logo_White.png b/ActiveBOWeb/src/assets/CPS_Logo_White.png new file mode 100644 index 0000000..b6b0db9 Binary files /dev/null and b/ActiveBOWeb/src/assets/CPS_Logo_White.png differ diff --git a/ActiveBOWeb/src/components/BaseLayout.vue b/ActiveBOWeb/src/components/BaseLayout.vue new file mode 100644 index 0000000..3427d8f --- /dev/null +++ b/ActiveBOWeb/src/components/BaseLayout.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/ActiveBOWeb/src/components/RosBar.vue b/ActiveBOWeb/src/components/RosBar.vue new file mode 100644 index 0000000..c571cc5 --- /dev/null +++ b/ActiveBOWeb/src/components/RosBar.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/ActiveBOWeb/src/components/SideBar.vue b/ActiveBOWeb/src/components/SideBar.vue new file mode 100644 index 0000000..a744951 --- /dev/null +++ b/ActiveBOWeb/src/components/SideBar.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/ActiveBOWeb/src/components/TopBar.vue b/ActiveBOWeb/src/components/TopBar.vue new file mode 100644 index 0000000..76c673a --- /dev/null +++ b/ActiveBOWeb/src/components/TopBar.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/ActiveBOWeb/src/main.ts b/ActiveBOWeb/src/main.ts new file mode 100644 index 0000000..8812c7f --- /dev/null +++ b/ActiveBOWeb/src/main.ts @@ -0,0 +1,25 @@ +import { createApp } from "vue"; + +// Pinia Store +import { createPinia } from "pinia"; + +// Vuetify +import 'vuetify/dist/vuetify.css'; +import { createVuetify } from 'vuetify'; +import '@mdi/font/css/materialdesignicons.css' + + +import App from "./App.vue"; + +const pinia = createPinia(); +const vuetify = createVuetify({ + theme: { + defaultTheme: 'dark', + }, +}); + +const app = createApp(App); + +app.use(pinia); +app.use(vuetify); +app.mount("#app"); diff --git a/ActiveBOWeb/src/store/BaseWebsiteStore.js b/ActiveBOWeb/src/store/BaseWebsiteStore.js new file mode 100644 index 0000000..9737359 --- /dev/null +++ b/ActiveBOWeb/src/store/BaseWebsiteStore.js @@ -0,0 +1,27 @@ +import { defineStore } from "pinia"; + +export const useBWStore = defineStore('BaseWebsiteStore', { + state: () => { + return { + play: false, + rosBarOpened: true, + rosConState: 'not connected', + } + }, + getters: { + getPlay: (state) => state.play, + getRosBarOpened: (state) => state.rosBarOpened, + getRosConState: (state) => state.rosConState, + }, + actions: { + setPlay() { + this.play = !this.play; + }, + toggleRosBar() { + this.rosBarOpened = !this.rosBarOpened; + }, + setRosConState(value) { + this.rosConState = value; + }, + } +}) diff --git a/ActiveBOWeb/src/store/MountainCarStore.js b/ActiveBOWeb/src/store/MountainCarStore.js new file mode 100644 index 0000000..e69de29 diff --git a/ActiveBOWeb/src/store/RewardStore.js b/ActiveBOWeb/src/store/RewardStore.js new file mode 100644 index 0000000..e69de29 diff --git a/ActiveBOWeb/tsconfig.config.json b/ActiveBOWeb/tsconfig.config.json new file mode 100644 index 0000000..424084a --- /dev/null +++ b/ActiveBOWeb/tsconfig.config.json @@ -0,0 +1,8 @@ +{ + "extends": "@vue/tsconfig/tsconfig.node.json", + "include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"], + "compilerOptions": { + "composite": true, + "types": ["node"] + } +} diff --git a/ActiveBOWeb/tsconfig.json b/ActiveBOWeb/tsconfig.json new file mode 100644 index 0000000..8d23599 --- /dev/null +++ b/ActiveBOWeb/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "@vue/tsconfig/tsconfig.web.json", + "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + } + }, + + "references": [ + { + "path": "./tsconfig.config.json" + } + ] +} diff --git a/ActiveBOWeb/vite.config.ts b/ActiveBOWeb/vite.config.ts new file mode 100644 index 0000000..b20d948 --- /dev/null +++ b/ActiveBOWeb/vite.config.ts @@ -0,0 +1,15 @@ +import { fileURLToPath, URL } from "node:url"; + +import { defineConfig } from "vite"; +import vue from "@vitejs/plugin-vue"; +import vueJsx from "@vitejs/plugin-vue-jsx"; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [vue(), vueJsx()], + resolve: { + alias: { + "@": fileURLToPath(new URL("./src", import.meta.url)), + }, + }, +});