-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: main-frontend: Create initial structure
Setup is: - Vue 2 - Typescript - Vuetify - Vuex - Router (with history mode) - PWA support - SASS (with dart-sass) - Eslint (with Airbnb pattern) and: - Max line length of 120 - No camelcase check - No lines between class members - Font as dependency (for offline usage) - Port 8080
- Loading branch information
1 parent
fe47c67
commit 2b6cfe1
Showing
24 changed files
with
9,875 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
> 1% | ||
last 2 versions | ||
not dead |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
|
||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# CompanionOS | ||
|
||
Main frontend for managing Companion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
presets: [ | ||
'@vue/cli-plugin-babel/preset', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "companion-os", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"serve": "vue-cli-service serve", | ||
"build": "vue-cli-service build", | ||
"lint": "vue-cli-service lint" | ||
}, | ||
"dependencies": { | ||
"@mdi/font": "^5.9.55", | ||
"core-js": "^3.6.5", | ||
"register-service-worker": "^1.7.1", | ||
"roboto-fontface": "*", | ||
"vue": "^2.6.11", | ||
"vue-router": "^3.2.0", | ||
"vuetify": "^2.4.0", | ||
"vuex": "^3.4.0" | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^4.18.0", | ||
"@typescript-eslint/parser": "^4.18.0", | ||
"@vue/cli-plugin-babel": "~4.5.0", | ||
"@vue/cli-plugin-eslint": "~4.5.0", | ||
"@vue/cli-plugin-pwa": "~4.5.0", | ||
"@vue/cli-plugin-router": "~4.5.0", | ||
"@vue/cli-plugin-typescript": "~4.5.0", | ||
"@vue/cli-plugin-vuex": "~4.5.0", | ||
"@vue/cli-service": "~4.5.0", | ||
"@vue/eslint-config-airbnb": "^5.0.2", | ||
"@vue/eslint-config-typescript": "^7.0.0", | ||
"eslint": "^6.7.2", | ||
"eslint-plugin-import": "^2.20.2", | ||
"eslint-plugin-vue": "^6.2.2", | ||
"sass": "~1.32.0", | ||
"sass-loader": "^10.0.0", | ||
"typescript": "~4.1.5", | ||
"vue-cli-plugin-vuetify": "~2.4.1", | ||
"vue-template-compiler": "^2.6.11", | ||
"vuetify-loader": "^1.7.0" | ||
} | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> | ||
<title><%= htmlWebpackPlugin.options.title %></title> | ||
</head> | ||
<body> | ||
<noscript> | ||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> | ||
</noscript> | ||
<div id="app"></div> | ||
<!-- built files will be auto injected --> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<template> | ||
<v-app> | ||
<v-card | ||
flat | ||
> | ||
<v-app-bar | ||
color="#08c" | ||
rounded="0" | ||
> | ||
<v-app-bar-nav-icon | ||
color="white" | ||
@click="drawer = true" | ||
></v-app-bar-nav-icon> | ||
|
||
<v-spacer></v-spacer> | ||
|
||
</v-app-bar> | ||
</v-card> | ||
|
||
<v-navigation-drawer | ||
v-model="drawer" | ||
absolute | ||
temporary | ||
> | ||
<v-list | ||
nav | ||
dense | ||
> | ||
<v-list-item-group | ||
active-class="deep-blue--text text--accent-4" | ||
> | ||
<v-card elevation="0" class="d-flex justify-center"> | ||
<v-img | ||
alt="Blue Robotics Logo" | ||
class="shrink mr-2" | ||
contain | ||
src="./assets/logo.svg" | ||
width="60" | ||
/> | ||
</v-card> | ||
|
||
<v-card elevation="0" height="30" class="pa-4"> | ||
<v-divider></v-divider> | ||
</v-card> | ||
|
||
<v-list-item to="/"> | ||
<v-list-item-icon> | ||
<v-icon>mdi-home</v-icon> | ||
</v-list-item-icon> | ||
<v-list-item-title>Main</v-list-item-title> | ||
</v-list-item> | ||
|
||
</v-list-item-group> | ||
</v-list> | ||
</v-navigation-drawer> | ||
|
||
<v-main> | ||
<router-view/> | ||
</v-main> | ||
</v-app> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue'; | ||
export default Vue.extend({ | ||
name: 'App', | ||
data: () => ({ | ||
drawer: false, | ||
}), | ||
}); | ||
</script> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import Vue from 'vue'; | ||
import App from './App.vue'; | ||
import router from './router'; | ||
import store from './store'; | ||
import vuetify from './plugins/vuetify'; | ||
|
||
Vue.config.productionTip = false; | ||
|
||
new Vue({ | ||
router, | ||
store, | ||
vuetify, | ||
render: (h) => h(App), | ||
}).$mount('#app'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import '@mdi/font/css/materialdesignicons.css'; | ||
import Vue from 'vue'; | ||
import Vuetify from 'vuetify/lib/framework'; | ||
|
||
Vue.use(Vuetify); | ||
|
||
export default new Vuetify({ | ||
icons: { | ||
iconfont: 'mdi', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Vue from 'vue'; | ||
import VueRouter, { RouteConfig } from 'vue-router'; | ||
import Main from '../views/MainView.vue'; | ||
|
||
Vue.use(VueRouter); | ||
|
||
const routes: Array<RouteConfig> = [ | ||
{ | ||
path: '/', | ||
name: 'Main', | ||
component: Main, | ||
}, | ||
]; | ||
|
||
const router = new VueRouter({ | ||
mode: 'history', | ||
base: process.env.BASE_URL, | ||
routes, | ||
}); | ||
|
||
export default router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import Vue from 'vue'; | ||
import Vuex from 'vuex'; | ||
|
||
Vue.use(Vuex); | ||
|
||
export default new Vuex.Store({ | ||
state: { | ||
}, | ||
mutations: { | ||
}, | ||
actions: { | ||
}, | ||
modules: { | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare module '*.svg' { | ||
const value: string; | ||
export default value; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Vue, { VNode } from 'vue'; | ||
|
||
declare global { | ||
namespace JSX { | ||
// tslint:disable no-empty-interface | ||
interface Element extends VNode {} | ||
// tslint:disable no-empty-interface | ||
interface ElementClass extends Vue {} | ||
interface IntrinsicElements { | ||
[elem: string]: any | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
declare module '*.vue' { | ||
import Vue from 'vue'; | ||
|
||
export default Vue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
declare module 'vuetify/lib/framework' { | ||
import Vuetify from 'vuetify'; | ||
|
||
export default Vuetify; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<template> | ||
<v-container>Main</v-container> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import Vue from 'vue'; | ||
export default Vue.extend({ | ||
name: 'Main', | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "esnext", | ||
"module": "esnext", | ||
"strict": false, | ||
"jsx": "preserve", | ||
"importHelpers": true, | ||
"moduleResolution": "node", | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"sourceMap": true, | ||
"baseUrl": ".", | ||
"types": [ | ||
"webpack-env" | ||
], | ||
"paths": { | ||
"@/*": [ | ||
"src/*" | ||
] | ||
}, | ||
"lib": [ | ||
"esnext", | ||
"dom", | ||
"dom.iterable", | ||
"scripthost" | ||
] | ||
}, | ||
"include": [ | ||
"src/**/*.ts", | ||
"src/**/*.tsx", | ||
"src/**/*.vue", | ||
"tests/**/*.ts", | ||
"tests/**/*.tsx" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
transpileDependencies: [ | ||
'vuetify', | ||
], | ||
pwa: { | ||
name: 'CompanionOS', | ||
themeColor: '#08c', | ||
appleMobileWebAppCapable: 'yes', | ||
appleMobileWebAppStatusBarStyle: 'white', | ||
manifestOptions: { | ||
background_color: '#FFFFFF', | ||
}, | ||
iconPaths: { | ||
favicon32: 'img/icons/favicon-32x32.png', | ||
favicon16: 'img/icons/favicon-16x16.png', | ||
appleTouchIcon: 'img/icons/apple-touch-icon.png', | ||
}, | ||
}, | ||
}; |
Oops, something went wrong.