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
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
## Contribution
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
Please make sure to read the [Contributing Guide](https://github.com/kratisto/open-speechless/blob/master/.github/CONTRIBUTING.md) before making a pull request.!
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
## License
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
npm run lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||
[MIT](http://opensource.org/licenses/MIT)
|
||||
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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
4740
package-lock.json
generated
4740
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -8,13 +8,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": "^3.4.4",
|
||||
"vue": "^2.6.10",
|
||||
"d3": "3.5.17",
|
||||
"vue": "^2.6.10",
|
||||
"vue-router": "^3.3.4",
|
||||
"vuetify": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^4.1.0",
|
||||
"@vue/cli-plugin-eslint": "^4.1.0",
|
||||
"@vue/cli-plugin-router": "^4.4.6",
|
||||
"@vue/cli-service": "^4.1.0",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"eslint": "^5.16.0",
|
||||
|
||||
37
src/App.vue
37
src/App.vue
@@ -1,36 +1,9 @@
|
||||
<template>
|
||||
<v-app>
|
||||
<v-app-bar app color="primary" dark>
|
||||
Open Speechless
|
||||
</v-app-bar>
|
||||
|
||||
<v-content>
|
||||
<SpeechlessSubject @inputData="updateSubjects"/>
|
||||
<SpinningWheel/>
|
||||
</v-content>
|
||||
</v-app>
|
||||
<div id="app">
|
||||
<router-view/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<style lang="scss">
|
||||
|
||||
import SpinningWheel from "./components/spinning_wheel/SpinningWheel";
|
||||
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>
|
||||
</style>
|
||||
|
||||
@@ -81,11 +81,6 @@ export default {
|
||||
{ text: 'Actions', value: 'action', sortable: false },
|
||||
],
|
||||
container: null,
|
||||
subjects : [
|
||||
{Nom:"Un film", Lien:""},
|
||||
{Nom:"Une serie", Lien:""},
|
||||
{Nom:"Un logiciel", Lien:""}
|
||||
],
|
||||
dialog: false,
|
||||
editedIndex: -1,
|
||||
editedItem: {
|
||||
@@ -98,10 +93,12 @@ export default {
|
||||
},
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
getDataSpin(){
|
||||
return this.subjects;
|
||||
props: {
|
||||
subjects : {
|
||||
type : Array
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
editItem (item) {
|
||||
this.editedIndex = this.subjects.indexOf(item)
|
||||
this.editedItem = Object.assign({}, item)
|
||||
@@ -123,11 +120,12 @@ export default {
|
||||
save () {
|
||||
if (this.editedIndex > -1) {
|
||||
Object.assign(this.subjects[this.editedIndex], this.editedItem)
|
||||
this.$emit("replace-subject",{index: this.editedIndex, subject: this.editedItem})
|
||||
} else {
|
||||
this.subjects.push(this.editedItem)
|
||||
this.$emit("subjects",this.subjects)
|
||||
}
|
||||
this.close()
|
||||
this.$emit("subjects",this.subjects)
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div id="chart_container">
|
||||
<div id="chart"></div>
|
||||
<div id="question"><h1></h1></div>
|
||||
</div>
|
||||
@@ -12,16 +12,22 @@
|
||||
data: function () {
|
||||
return {
|
||||
container: null,
|
||||
dataSpin : [
|
||||
{Nom:"Un film", Lien:""},
|
||||
{Nom:"Une serie", Lien:""},
|
||||
{Nom:"Un logiciel", Lien:""}
|
||||
],
|
||||
spinData: [],
|
||||
}
|
||||
},
|
||||
props: {
|
||||
subjects: {
|
||||
type: Array
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
getDataSpin(){
|
||||
return this.dataSpin;
|
||||
replaceSubject(replace){
|
||||
Object.assign(this.subjects[replace.index], replace.subject)
|
||||
this.removeGraph()
|
||||
this.buildGraph()
|
||||
},
|
||||
getSubjects(){
|
||||
return this.subjects;
|
||||
},
|
||||
removeGraph(){
|
||||
d3.select('#chart svg').remove()
|
||||
@@ -36,7 +42,7 @@
|
||||
oldrotation = 0,
|
||||
picked = 100000,
|
||||
color = d3.scale.category20();
|
||||
var data = this.getDataSpin();
|
||||
var data = this.getSubjects();
|
||||
var svg = d3.select('#chart')
|
||||
.append("svg")
|
||||
.data([data])
|
||||
@@ -106,9 +112,6 @@
|
||||
.style({"fill":"black"});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
|
||||
computed: {
|
||||
formTitle () {
|
||||
return this.editedIndex === -1 ? 'New Item' : 'Edit Item'
|
||||
@@ -118,6 +121,10 @@
|
||||
dialog (val) {
|
||||
val || this.close()
|
||||
},
|
||||
subjects: function() {
|
||||
this.removeGraph();
|
||||
this.buildGraph();
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.buildGraph()
|
||||
@@ -146,4 +153,8 @@
|
||||
transform:translate(0,-50%);
|
||||
}
|
||||
|
||||
#chart_container{
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import vuetify from './plugins/vuetify';
|
||||
import router from './router'
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
new Vue({
|
||||
vuetify,
|
||||
router,
|
||||
render: h => h(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