diff --git a/.eslintrc.js b/.eslintrc.js index f438449..2744ff7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -15,12 +15,15 @@ module.exports = { sourceType: 'module', }, rules: { - 'prettier/prettier': ['error', { endOfLine: 'auto', semi: false }], // We added this 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'import/extensions': 'off', camelcase: ['error', { properties: 'never', ignoreDestructuring: true }], 'no-param-reassign': ['error', { props: false }], 'no-underscore-dangle': ['error', { allow: ['_id'] }], + /* we added this */ + 'no-var': 'error', + 'no-plusplus': 'off', + 'prettier/prettier': ['error', { endOfLine: 'auto', semi: false }], }, } diff --git a/app/package.json b/app/package.json index 1f168c2..4381231 100644 --- a/app/package.json +++ b/app/package.json @@ -20,6 +20,7 @@ "axios": "^1.4.0", "socket.io-client": "^4.7.1", "vue": "^3.3.4", + "vue-router": "^4.2.4", "xterm": "^5.2.1", "xterm-addon-attach": "^0.8.0", "xterm-addon-fit": "^0.7.0" diff --git a/app/src/App.vue b/app/src/App.vue index 7494e8d..767991b 100644 --- a/app/src/App.vue +++ b/app/src/App.vue @@ -1,73 +1,15 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + + diff --git a/app/src/components/AuthenticationPart.vue b/app/src/components/AuthenticationPart.vue new file mode 100644 index 0000000..3d2da99 --- /dev/null +++ b/app/src/components/AuthenticationPart.vue @@ -0,0 +1,38 @@ + + + + + Linux Odyssey + + + Email + + + Password + + + Log in / Sign up + + + + + diff --git a/app/src/components/DynamicBackground.vue b/app/src/components/DynamicBackground.vue new file mode 100644 index 0000000..ea17276 --- /dev/null +++ b/app/src/components/DynamicBackground.vue @@ -0,0 +1,94 @@ + + + + + + + + + diff --git a/app/src/components/HeaderPart.vue b/app/src/components/HeaderPart.vue index 6333239..60e000b 100644 --- a/app/src/components/HeaderPart.vue +++ b/app/src/components/HeaderPart.vue @@ -12,7 +12,7 @@ diff --git a/app/src/components/QuestPart.vue b/app/src/components/QuestPart.vue index 0733afc..8e6a46f 100644 --- a/app/src/components/QuestPart.vue +++ b/app/src/components/QuestPart.vue @@ -24,7 +24,7 @@ onMounted(async () => { {{ questData.title }} - + {{ questData.instruction }} diff --git a/app/src/components/VisualizationPart.vue b/app/src/components/VisualizationPart.vue index f1c9a77..ac9a061 100644 --- a/app/src/components/VisualizationPart.vue +++ b/app/src/components/VisualizationPart.vue @@ -42,7 +42,7 @@ onMounted(() => { }) onUnmounted(() => { - treeRef.value.removeEventListener('mousedown', mouseDownHandler) + treeRef?.value?.removeEventListener('mousedown', mouseDownHandler) }) diff --git a/app/src/main.js b/app/src/main.js index 84f3945..55e4c22 100644 --- a/app/src/main.js +++ b/app/src/main.js @@ -1,4 +1,5 @@ import { createApp } from 'vue' +import { createRouter, createWebHistory } from 'vue-router' import './style.css' /* import the fontawesome core */ @@ -24,7 +25,10 @@ import { faCircleQuestion, faCircleRight, } from '@fortawesome/free-regular-svg-icons' + import App from './App.vue' +import GamePage from './views/GamePage.vue' +import AuthPage from './views/AuthPage.vue' /* add icons to the library */ library.add( @@ -41,4 +45,20 @@ library.add( faTerminal ) -createApp(App).component('font-awesome-icon', FontAwesomeIcon).mount('#app') +const routes = [ + { path: '/', name: 'Home', component: AuthPage }, + { path: '/game', name: 'Game', component: GamePage }, +] + +const router = createRouter({ + history: createWebHistory(), + routes, +}) + +const app = createApp(App) + +app.component('font-awesome-icon', FontAwesomeIcon) + +app.use(router) + +app.mount('#app') diff --git a/app/src/views/AuthPage.vue b/app/src/views/AuthPage.vue new file mode 100644 index 0000000..749522b --- /dev/null +++ b/app/src/views/AuthPage.vue @@ -0,0 +1,16 @@ + + + + + + + + + + + diff --git a/app/src/views/GamePage.vue b/app/src/views/GamePage.vue new file mode 100644 index 0000000..27f152d --- /dev/null +++ b/app/src/views/GamePage.vue @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/tailwind.config.js b/app/tailwind.config.js index ea81704..403273c 100644 --- a/app/tailwind.config.js +++ b/app/tailwind.config.js @@ -7,12 +7,12 @@ export default { background: { primary: '#282A33', secondary: '#131313', - DEFAULT: '#010103', + DEFAULT: '#000000', }, text: { - primary: '#39FF14', + primary: '#00FF00', secondary: '#ADADB5', - line: '#4A4B63', + tertiary: '#4A4B63', DEFAULT: '#FFFFFF', }, disabled: { diff --git a/yarn.lock b/yarn.lock index 9f189e4..c3c6bed 100644 --- a/yarn.lock +++ b/yarn.lock @@ -975,6 +975,11 @@ "@vue/compiler-dom" "3.3.4" "@vue/shared" "3.3.4" +"@vue/devtools-api@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.5.0.tgz#98b99425edee70b4c992692628fa1ea2c1e57d07" + integrity sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q== + "@vue/eslint-config-prettier@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@vue/eslint-config-prettier/-/eslint-config-prettier-7.1.0.tgz#97936379c7fb1d982b9d2c6b122306e3c2e464c8" @@ -4829,6 +4834,13 @@ vue-eslint-parser@^9.3.0: lodash "^4.17.21" semver "^7.3.6" +vue-router@^4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.2.4.tgz#382467a7e2923e6a85f015d081e1508052c191b9" + integrity sha512-9PISkmaCO02OzPVOMq2w82ilty6+xJmQrarYZDkjZBfl4RvYAlt4PKnEX21oW4KTtWfa9OuO/b3qk1Od3AEdCQ== + dependencies: + "@vue/devtools-api" "^6.5.0" + vue@^3.3.4: version "3.3.4" resolved "https://registry.yarnpkg.com/vue/-/vue-3.3.4.tgz#8ed945d3873667df1d0fcf3b2463ada028f88bd6"
{{ questData.instruction }}