Compare commits
10 Commits
13ea057544
...
10b08e0d60
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10b08e0d60 | ||
| 098efd9379 | |||
| af6dffd36e | |||
| 3b9f4a8614 | |||
| 96c64fbb1f | |||
| 1047a38562 | |||
| bad810a30b | |||
| fdca7dd6b9 | |||
| b2771a0caf | |||
| 48d42178e3 |
91
.github/COMMIT_CONVENTION.md
vendored
Normal file
91
.github/COMMIT_CONVENTION.md
vendored
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
## Git Commit Message Convention
|
||||||
|
|
||||||
|
> This is a copy paste from [Vuejs's commit convention](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md).
|
||||||
|
|
||||||
|
#### TL;DR:
|
||||||
|
|
||||||
|
Messages must be matched by the following regex:
|
||||||
|
|
||||||
|
``` js
|
||||||
|
/^(revert: )?(feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}/
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Examples
|
||||||
|
|
||||||
|
Appears under "Features" header, `compiler` subheader:
|
||||||
|
|
||||||
|
```
|
||||||
|
feat(compiler): add 'comments' option
|
||||||
|
```
|
||||||
|
|
||||||
|
Appears under "Bug Fixes" header, `v-model` subheader, with a link to issue #28:
|
||||||
|
|
||||||
|
```
|
||||||
|
fix(v-model): handle events on blur
|
||||||
|
|
||||||
|
close #28
|
||||||
|
```
|
||||||
|
|
||||||
|
Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
|
||||||
|
|
||||||
|
```
|
||||||
|
perf(core): improve vdom diffing by removing 'foo' option
|
||||||
|
|
||||||
|
BREAKING CHANGE: The 'foo' option has been removed.
|
||||||
|
```
|
||||||
|
|
||||||
|
The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header.
|
||||||
|
|
||||||
|
```
|
||||||
|
revert: feat(compiler): add 'comments' option
|
||||||
|
|
||||||
|
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
|
||||||
|
```
|
||||||
|
|
||||||
|
### Full Message Format
|
||||||
|
|
||||||
|
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
|
||||||
|
|
||||||
|
```
|
||||||
|
<type>(<scope>): <subject>
|
||||||
|
<BLANK LINE>
|
||||||
|
<body>
|
||||||
|
<BLANK LINE>
|
||||||
|
<footer>
|
||||||
|
```
|
||||||
|
|
||||||
|
The **header** is mandatory and the **scope** of the header is optional.
|
||||||
|
|
||||||
|
### Revert
|
||||||
|
|
||||||
|
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
|
||||||
|
|
||||||
|
### Type
|
||||||
|
|
||||||
|
If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However, if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog.
|
||||||
|
|
||||||
|
Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks.
|
||||||
|
|
||||||
|
### Scope
|
||||||
|
|
||||||
|
The scope could be anything specifying the place of the commit change. For example `core`, `compiler`, `ssr`, `v-model`, `transition` etc...
|
||||||
|
|
||||||
|
### Subject
|
||||||
|
|
||||||
|
The subject contains a succinct description of the change:
|
||||||
|
|
||||||
|
* use the imperative, present tense: "change" not "changed" nor "changes"
|
||||||
|
* don't capitalize the first letter
|
||||||
|
* no dot (.) at the end
|
||||||
|
|
||||||
|
### Body
|
||||||
|
|
||||||
|
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
|
||||||
|
The body should include the motivation for the change and contrast this with previous behavior.
|
||||||
|
|
||||||
|
### Footer
|
||||||
|
|
||||||
|
The footer should contain any information about **Breaking Changes** and is also the place to
|
||||||
|
reference GitHub issues that this commit **Closes**.
|
||||||
|
|
||||||
|
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
|
||||||
37
.github/CONTRIBUTING.md
vendored
Normal file
37
.github/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Vue.js Contributing Guide
|
||||||
|
|
||||||
|
Hi! I'm really excited that you are interested in contributing to Vue.js. Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
|
||||||
|
|
||||||
|
- [Pull Request Guidelines](#pull-request-guidelines)
|
||||||
|
- [Development Setup](#development-setup)
|
||||||
|
|
||||||
|
## Pull Request Guidelines
|
||||||
|
|
||||||
|
- The `master` branch is just a snapshot of the latest stable release. All development should be done in dedicated branches.
|
||||||
|
|
||||||
|
- Work in the `src` folder and **DO NOT** checkin `dist` in the commits.
|
||||||
|
|
||||||
|
- It's OK to have multiple small commits as you work on the PR - GitHub will automatically squash it before merging.
|
||||||
|
|
||||||
|
- Make sure `npm test` passes. (see [development setup](#development-setup))
|
||||||
|
|
||||||
|
- If adding a new feature:
|
||||||
|
- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
|
||||||
|
|
||||||
|
- If fixing bug:
|
||||||
|
- If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`.
|
||||||
|
- Provide a detailed description of the bug in the PR. Live demo preferred.
|
||||||
|
|
||||||
|
## Development Setup
|
||||||
|
|
||||||
|
You will need [Node.js](http://nodejs.org) **version 8+**
|
||||||
|
After cloning the repo, run:
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
$ npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Committing Changes
|
||||||
|
|
||||||
|
Commit messages should follow the [commit message convention](./COMMIT_CONVENTION.md) so that changelogs can be automatically generated. Commit messages will be automatically validated upon commit. If you are not familiar with the commit message convention, you can use `npm run commit` instead of `git commit`, which provides an interactive CLI for generating proper commit messages.
|
||||||
|
|
||||||
26
.github/workflows/master.yml
vendored
Normal file
26
.github/workflows/master.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '13.x'
|
||||||
|
- run: npm install
|
||||||
|
- run: npm test
|
||||||
|
- run: npm run build
|
||||||
|
- name: Deploy to Firebase
|
||||||
|
uses: w9jds/firebase-action@master
|
||||||
|
with:
|
||||||
|
args: deploy --only hosting
|
||||||
|
env:
|
||||||
|
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
|
||||||
|
PROJECT_ID: ${{ secrets.PROJECT_ID }}
|
||||||
23
README.md
23
README.md
@@ -1,24 +1,9 @@
|
|||||||
# open-speechless
|
# open-speechless
|
||||||
|
|
||||||
## Project setup
|
## Contribution
|
||||||
```
|
|
||||||
npm install
|
|
||||||
```
|
|
||||||
|
|
||||||
### Compiles and hot-reloads for development
|
Please make sure to read the [Contributing Guide](https://github.com/kratisto/open-speechless/blob/master/.github/CONTRIBUTING.md) before making a pull request.!
|
||||||
```
|
|
||||||
npm run serve
|
|
||||||
```
|
|
||||||
|
|
||||||
### Compiles and minifies for production
|
## License
|
||||||
```
|
|
||||||
npm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
### Lints and fixes files
|
[MIT](http://opensource.org/licenses/MIT)
|
||||||
```
|
|
||||||
npm run lint
|
|
||||||
```
|
|
||||||
|
|
||||||
### Customize configuration
|
|
||||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
|
||||||
16
firebase.json
Normal file
16
firebase.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"hosting": {
|
||||||
|
"public": "dist",
|
||||||
|
"ignore": [
|
||||||
|
"firebase.json",
|
||||||
|
"**/.*",
|
||||||
|
"**/node_modules/**"
|
||||||
|
],
|
||||||
|
"rewrites": [
|
||||||
|
{
|
||||||
|
"source": "**",
|
||||||
|
"destination": "/index.html"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
4758
package-lock.json
generated
4758
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -8,13 +8,15 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-js": "^3.4.4",
|
"core-js": "^3.4.4",
|
||||||
"vue": "^2.6.10",
|
|
||||||
"d3": "3.5.17",
|
"d3": "3.5.17",
|
||||||
|
"vue": "^2.6.10",
|
||||||
|
"vue-router": "^3.3.4",
|
||||||
"vuetify": "^2.1.0"
|
"vuetify": "^2.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "^4.1.0",
|
"@vue/cli-plugin-babel": "^4.1.0",
|
||||||
"@vue/cli-plugin-eslint": "^4.1.0",
|
"@vue/cli-plugin-eslint": "^4.1.0",
|
||||||
|
"@vue/cli-plugin-router": "^4.4.6",
|
||||||
"@vue/cli-service": "^4.1.0",
|
"@vue/cli-service": "^4.1.0",
|
||||||
"babel-eslint": "^10.0.3",
|
"babel-eslint": "^10.0.3",
|
||||||
"eslint": "^5.16.0",
|
"eslint": "^5.16.0",
|
||||||
|
|||||||
37
src/App.vue
37
src/App.vue
@@ -1,36 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-app>
|
<div id="app">
|
||||||
<v-app-bar app color="primary" dark>
|
<router-view/>
|
||||||
Open Speechless
|
</div>
|
||||||
</v-app-bar>
|
|
||||||
|
|
||||||
<v-content>
|
|
||||||
<SpeechlessSubject @inputData="updateSubjects"/>
|
|
||||||
<SpinningWheel/>
|
|
||||||
</v-content>
|
|
||||||
</v-app>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<style lang="scss">
|
||||||
|
|
||||||
import SpinningWheel from "./components/spinning_wheel/SpinningWheel";
|
</style>
|
||||||
import SpeechlessSubject from "./components/speechless_subject/SpeechLessSubject";
|
|
||||||
export default {
|
|
||||||
name: 'App',
|
|
||||||
props: {
|
|
||||||
source: String,
|
|
||||||
},
|
|
||||||
data: () => ({
|
|
||||||
subjects: [],
|
|
||||||
}),
|
|
||||||
methods: {
|
|
||||||
updateSubjects(subjects) {
|
|
||||||
this.subjects=subjects;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
components: {
|
|
||||||
SpeechlessSubject,
|
|
||||||
SpinningWheel
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|||||||
@@ -81,11 +81,6 @@ export default {
|
|||||||
{ text: 'Actions', value: 'action', sortable: false },
|
{ text: 'Actions', value: 'action', sortable: false },
|
||||||
],
|
],
|
||||||
container: null,
|
container: null,
|
||||||
subjects : [
|
|
||||||
{Nom:"Un film", Lien:""},
|
|
||||||
{Nom:"Une serie", Lien:""},
|
|
||||||
{Nom:"Un logiciel", Lien:""}
|
|
||||||
],
|
|
||||||
dialog: false,
|
dialog: false,
|
||||||
editedIndex: -1,
|
editedIndex: -1,
|
||||||
editedItem: {
|
editedItem: {
|
||||||
@@ -98,10 +93,12 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
subjects : {
|
||||||
|
type : Array
|
||||||
|
}
|
||||||
|
},
|
||||||
methods : {
|
methods : {
|
||||||
getDataSpin(){
|
|
||||||
return this.subjects;
|
|
||||||
},
|
|
||||||
editItem (item) {
|
editItem (item) {
|
||||||
this.editedIndex = this.subjects.indexOf(item)
|
this.editedIndex = this.subjects.indexOf(item)
|
||||||
this.editedItem = Object.assign({}, item)
|
this.editedItem = Object.assign({}, item)
|
||||||
@@ -123,11 +120,12 @@ export default {
|
|||||||
save () {
|
save () {
|
||||||
if (this.editedIndex > -1) {
|
if (this.editedIndex > -1) {
|
||||||
Object.assign(this.subjects[this.editedIndex], this.editedItem)
|
Object.assign(this.subjects[this.editedIndex], this.editedItem)
|
||||||
|
this.$emit("replace-subject",{index: this.editedIndex, subject: this.editedItem})
|
||||||
} else {
|
} else {
|
||||||
this.subjects.push(this.editedItem)
|
this.subjects.push(this.editedItem)
|
||||||
|
this.$emit("subjects",this.subjects)
|
||||||
}
|
}
|
||||||
this.close()
|
this.close()
|
||||||
this.$emit("subjects",this.subjects)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div id="chart_container">
|
||||||
<div id="chart"></div>
|
<div id="chart"></div>
|
||||||
<div id="question"><h1></h1></div>
|
<div id="question"><h1></h1></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -12,16 +12,22 @@
|
|||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
container: null,
|
container: null,
|
||||||
dataSpin : [
|
spinData: [],
|
||||||
{Nom:"Un film", Lien:""},
|
}
|
||||||
{Nom:"Une serie", Lien:""},
|
},
|
||||||
{Nom:"Un logiciel", Lien:""}
|
props: {
|
||||||
],
|
subjects: {
|
||||||
|
type: Array
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods : {
|
methods : {
|
||||||
getDataSpin(){
|
replaceSubject(replace){
|
||||||
return this.dataSpin;
|
Object.assign(this.subjects[replace.index], replace.subject)
|
||||||
|
this.removeGraph()
|
||||||
|
this.buildGraph()
|
||||||
|
},
|
||||||
|
getSubjects(){
|
||||||
|
return this.subjects;
|
||||||
},
|
},
|
||||||
removeGraph(){
|
removeGraph(){
|
||||||
d3.select('#chart svg').remove()
|
d3.select('#chart svg').remove()
|
||||||
@@ -36,7 +42,7 @@
|
|||||||
oldrotation = 0,
|
oldrotation = 0,
|
||||||
picked = 100000,
|
picked = 100000,
|
||||||
color = d3.scale.category20();
|
color = d3.scale.category20();
|
||||||
var data = this.getDataSpin();
|
var data = this.getSubjects();
|
||||||
var svg = d3.select('#chart')
|
var svg = d3.select('#chart')
|
||||||
.append("svg")
|
.append("svg")
|
||||||
.data([data])
|
.data([data])
|
||||||
@@ -106,9 +112,6 @@
|
|||||||
.style({"fill":"black"});
|
.style({"fill":"black"});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
},
|
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
formTitle () {
|
formTitle () {
|
||||||
return this.editedIndex === -1 ? 'New Item' : 'Edit Item'
|
return this.editedIndex === -1 ? 'New Item' : 'Edit Item'
|
||||||
@@ -118,6 +121,10 @@
|
|||||||
dialog (val) {
|
dialog (val) {
|
||||||
val || this.close()
|
val || this.close()
|
||||||
},
|
},
|
||||||
|
subjects: function() {
|
||||||
|
this.removeGraph();
|
||||||
|
this.buildGraph();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.buildGraph()
|
this.buildGraph()
|
||||||
@@ -146,4 +153,8 @@
|
|||||||
transform:translate(0,-50%);
|
transform:translate(0,-50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#chart_container{
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import App from './App.vue'
|
import App from './App.vue'
|
||||||
import vuetify from './plugins/vuetify';
|
import vuetify from './plugins/vuetify';
|
||||||
|
import router from './router'
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
vuetify,
|
vuetify,
|
||||||
|
router,
|
||||||
render: h => h(App)
|
render: h => h(App)
|
||||||
}).$mount('#app')
|
}).$mount('#app')
|
||||||
|
|||||||
26
src/router/index.js
Normal file
26
src/router/index.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import Vue from 'vue'
|
||||||
|
import VueRouter from 'vue-router'
|
||||||
|
import Home from '../views/Home.vue'
|
||||||
|
|
||||||
|
Vue.use(VueRouter)
|
||||||
|
|
||||||
|
const routes = [
|
||||||
|
{
|
||||||
|
path: '/:subjects',
|
||||||
|
name: 'Home',
|
||||||
|
component: Home
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/',
|
||||||
|
name: 'E',
|
||||||
|
component: Home
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
const router = new VueRouter({
|
||||||
|
mode: 'history',
|
||||||
|
base: process.env.BASE_URL,
|
||||||
|
routes
|
||||||
|
})
|
||||||
|
|
||||||
|
export default router
|
||||||
55
src/views/Home.vue
Normal file
55
src/views/Home.vue
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<template>
|
||||||
|
<v-app>
|
||||||
|
<v-app-bar app color="primary" dark>
|
||||||
|
Open Speechless
|
||||||
|
</v-app-bar>
|
||||||
|
<v-content>
|
||||||
|
<SpeechlessSubject @subjects="updateSubjects" @replace-subject="replaceSubject" :subjects="subjects"/>
|
||||||
|
<SpinningWheel ref="spinningWheel" :subjects="subjects"/>
|
||||||
|
</v-content>
|
||||||
|
</v-app>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import SpinningWheel from "../components/spinning_wheel/SpinningWheel";
|
||||||
|
import SpeechlessSubject from "../components/speechless_subject/SpeechLessSubject";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'App',
|
||||||
|
props: {
|
||||||
|
source: String,
|
||||||
|
},
|
||||||
|
data: () => ({
|
||||||
|
subjects: [],
|
||||||
|
}),
|
||||||
|
created: function () {
|
||||||
|
var subjectsPath = this.$route.params.subjects
|
||||||
|
if (subjectsPath !== undefined) {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
this.subjects = JSON.parse(atob(subjectsPath));
|
||||||
|
} else {
|
||||||
|
this.subjects = [
|
||||||
|
{Nom:"Un film", Lien:""},
|
||||||
|
{Nom:"Une serie", Lien:""},
|
||||||
|
{Nom:"Un logiciel", Lien:""}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
updateSubjects(subjects) {
|
||||||
|
this.subjects=subjects;
|
||||||
|
},
|
||||||
|
replaceSubject(replace){
|
||||||
|
Object.assign(this.subjects[replace.index], replace.subject)
|
||||||
|
this.$refs.spinningWheel.replaceSubject(replace)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
SpeechlessSubject,
|
||||||
|
SpinningWheel
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user