update slider && default on modal

This commit is contained in:
vincent 2020-03-27 21:04:35 +01:00
parent cf5b23e6f4
commit 50d7d7bd48
12 changed files with 1989 additions and 223 deletions

12
client/.babelrc Normal file
View File

@ -0,0 +1,12 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"]
}

9
client/.editorconfig Normal file
View File

@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

4
client/.eslintignore Normal file
View File

@ -0,0 +1,4 @@
/build/
/config/
/dist/
/*.js

50
client/.eslintrc.js Normal file
View File

@ -0,0 +1,50 @@
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
},
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
extends: ['plugin:vue/essential', 'airbnb-base'],
// required to lint *.vue files
plugins: [
'vue'
],
// check if imports actually resolve
settings: {
'import/resolver': {
webpack: {
config: 'build/webpack.base.conf.js'
}
}
},
// add your custom rules here
rules: {
// don't require .vue extension when importing
'import/extensions': ['error', 'always', {
js: 'never',
vue: 'never'
}],
// disallow reassignment of function parameters
// disallow parameter object manipulation except for specific exclusions
'no-param-reassign': ['error', {
props: true,
ignorePropertyModificationsFor: [
'state', // for vuex state
'acc', // for reduce accumulators
'e' // for e.returnvalue
]
}],
// allow optionalDependencies
'import/no-extraneous-dependencies': ['error', {
optionalDependencies: ['test/unit/index.js']
}],
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}

14
client/.gitignore vendored Normal file
View File

@ -0,0 +1,14 @@
.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln

10
client/.postcssrc.js Normal file
View File

@ -0,0 +1,10 @@
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}

2029
client/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -11,11 +11,12 @@
"build": "node build/build.js"
},
"dependencies": {
"axios": "^0.18.0",
"bulma": "^0.7.4",
"vue": "^2.5.2",
"vue-router": "^3.0.1",
"vuex": "^3.1.0"
"axios": "^0.18.1",
"bulma": "^0.7.5",
"bulma-slider": "^2.0.0",
"vue": "^2.6.11",
"vue-router": "^3.1.6",
"vuex": "^3.1.3"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
@ -36,33 +37,33 @@
"eslint-friendly-formatter": "^3.0.0",
"eslint-import-resolver-webpack": "^0.8.3",
"eslint-loader": "^1.7.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-vue": "^4.0.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"node-notifier": "^5.1.2",
"node-sass": "^4.11.0",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"node-notifier": "^5.4.3",
"node-sass": "^4.13.1",
"optimize-css-assets-webpack-plugin": "^3.2.1",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"portfinder": "^1.0.25",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-url": "^7.2.1",
"rimraf": "^2.6.0",
"sass-loader": "^7.1.0",
"semver": "^5.3.0",
"rimraf": "^2.7.1",
"sass-loader": "^7.3.1",
"semver": "^5.7.1",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.1.2",
"vue-template-compiler": "^2.5.2",
"vue-template-compiler": "^2.6.11",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
"webpack-merge": "^4.2.2"
},
"engines": {
"node": ">= 6.0.0",

View File

@ -3,29 +3,37 @@
<section class="hero has-text-centered is-success is-fullheigh">
<div class="hero-body">
<h1 class="title">Teammood</h1>
<h2 class="Subtitle">Bienvenue {{$store.getters.name}}</h2>
</div>
</section>
<div class="section has-text-centered">
<div class="container">
<div class="field">
<div class="field is-grouped-centered">
<div class="control">
<input
title="Humeur"
autofocus
class="input"
v-on:keyup.enter="checkchaine()"
name="chaine-input"
v-model="chaine"
type="text"
>
<label class="label">Humeur</label>
<input title="humeur" v-model="humeur" id="humeur" class="slider is-fullwidth is-medium is-success is-circle" step="1" min="0" max="5" type="range">
<output for="humeur">{{humeur}}</output>
</div>
<div class="control">
<label class="label">stress</label>
<input title="stress" v-model="stress" id="stress" class="slider is-fullwidth is-medium is-success is-circle" step="1" min="0" max="5" type="range">
<output for="stress">{{stress}}</output>
</div>
<div class="control">
<label class="label">fatigue</label>
<input title="fatigue" v-model="fatigue" id="fatigue" class="slider is-fullwidth is-medium is-success is-circle" step="1" min="0" max="5" type="range">
<output for="fatigue">{{fatigue}}</output>
</div>
</div>
<div class="field field is-grouped is-grouped-centered">
<div class="field is-grouped is-grouped-centered">
<div class="control">
<button class="button is-success" v-on:click="toto">valider</button>
<button class="button is-success" v-on:click="">valider</button>
</div>
<div class="control">
<button class="button is-success" v-on:click="toto">changer Nom</button>
<button class="button is-success" v-on:click="showModalname=true">modifier votre Nom</button>
</div>
</div>
</div>
@ -52,19 +60,24 @@ export default {
},
data() {
return {
chaine: '',
humeur: 3,
stress: 2,
fatigue:3,
showModalname: false,
showModal: false,
modalmessage:''
};
},
methods: {
},
mounted() {
if(!this.$store.getters.name){
this.showModalname=true
}
if(!this.$store.getters.name){
this.showModalname=true;
}
},
};
</script>

View File

@ -5,7 +5,7 @@ import App from './App';
import router from './router';
import store from './store';
import './../node_modules/bulma/css/bulma.css';
import './../node_modules/bulma-slider/dist/css/bulma-slider.min.css';
Vue.config.productionTip = false;
/* eslint-disable no-new */
new Vue({

View File

@ -1,7 +1,7 @@
import Vue from 'vue';
import Router from 'vue-router';
import ping from '@/components/ping';
import chainetv from '@/components/Teammood';
import Teammood from '@/components/Teammood';
import store from '@/store';
import { EventBus } from '../utils';

View File

@ -2,7 +2,7 @@
import Vue from 'vue';
import Vuex from 'vuex';
import { fetchchaine, fetchemission, authenticate } from '../api';
import { fetchchaine, fetchemission } from '../api';
import { isValidJwt, EventBus } from '../utils';
Vue.use(Vuex);