forked from external-repos/noisedash
Refactor entire app structure
This commit is contained in:
3
.browserslistrc
Normal file
3
.browserslistrc
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
> 1%
|
||||||
|
last 2 versions
|
||||||
|
not dead
|
||||||
35
.eslintrc.js
35
.eslintrc.js
@@ -1,22 +1,17 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
extends: [
|
root: true,
|
||||||
// add more generic rulesets here, such as:
|
env: {
|
||||||
"eslint:recommended",
|
node: true
|
||||||
// 'plugin:vue/vue3-recommended',
|
},
|
||||||
"plugin:vue/recommended" // Use this if you are using Vue.js 2.x.
|
extends: [
|
||||||
],
|
'plugin:vue/essential',
|
||||||
rules: {
|
'@vue/standard'
|
||||||
// override/add rules settings here, such as:
|
],
|
||||||
// 'vue/no-unused-vars': 'error'
|
parserOptions: {
|
||||||
"eol-last": 1
|
parser: 'babel-eslint'
|
||||||
},
|
},
|
||||||
"env": {
|
rules: {
|
||||||
"node": true
|
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||||
},
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
|
||||||
"parser": "vue-eslint-parser",
|
}
|
||||||
"parserOptions": {
|
|
||||||
"parser": "babel-eslint",
|
|
||||||
"ecmaVersion": 8,
|
|
||||||
"sourceType": "module"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
4864
package-lock.json
generated
4864
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@@ -24,7 +24,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "~4.5.0",
|
"@vue/cli-plugin-babel": "~4.5.0",
|
||||||
"@vue/cli-plugin-eslint": "^4.5.13",
|
"@vue/cli-plugin-eslint": "~4.5.0",
|
||||||
"@vue/cli-plugin-router": "~4.5.0",
|
"@vue/cli-plugin-router": "~4.5.0",
|
||||||
"@vue/cli-service": "~4.5.0",
|
"@vue/cli-service": "~4.5.0",
|
||||||
"@vue/eslint-config-standard": "^5.1.2",
|
"@vue/eslint-config-standard": "^5.1.2",
|
||||||
@@ -40,25 +40,5 @@
|
|||||||
"vue-cli-plugin-vuetify": "~2.4.1",
|
"vue-cli-plugin-vuetify": "~2.4.1",
|
||||||
"vue-template-compiler": "^2.6.11",
|
"vue-template-compiler": "^2.6.11",
|
||||||
"vuetify-loader": "^1.7.0"
|
"vuetify-loader": "^1.7.0"
|
||||||
},
|
}
|
||||||
"eslintConfig": {
|
|
||||||
"root": true,
|
|
||||||
"env": {
|
|
||||||
"node": true
|
|
||||||
},
|
|
||||||
"extends": [
|
|
||||||
"plugin:vue/essential",
|
|
||||||
"eslint:recommended",
|
|
||||||
"@vue/standard"
|
|
||||||
],
|
|
||||||
"parserOptions": {
|
|
||||||
"parser": "babel-eslint"
|
|
||||||
},
|
|
||||||
"rules": {}
|
|
||||||
},
|
|
||||||
"browserslist": [
|
|
||||||
"> 1%",
|
|
||||||
"last 2 versions",
|
|
||||||
"not dead"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,4 +38,3 @@ app.use('/myaccount', myaccountRouter);
|
|||||||
app.use('/users', usersRouter);
|
app.use('/users', usersRouter);
|
||||||
|
|
||||||
module.exports = app;
|
module.exports = app;
|
||||||
|
|
||||||
|
|||||||
16
src/App.vue
16
src/App.vue
@@ -1,16 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-app>
|
<v-app>
|
||||||
<AppBar />
|
<AppBar />
|
||||||
<v-main>
|
<v-main>
|
||||||
<v-container fluid>
|
<router-view/>
|
||||||
<router-link to="/">
|
|
||||||
Home
|
|
||||||
</router-link> |
|
|
||||||
<router-link to="/login">
|
|
||||||
Login
|
|
||||||
</router-link>
|
|
||||||
<router-view />
|
|
||||||
</v-container>
|
|
||||||
</v-main>
|
</v-main>
|
||||||
</v-app>
|
</v-app>
|
||||||
</template>
|
</template>
|
||||||
@@ -22,11 +14,11 @@ export default {
|
|||||||
name: 'App',
|
name: 'App',
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
AppBar,
|
AppBar
|
||||||
},
|
},
|
||||||
|
|
||||||
data: () => ({
|
data: () => ({
|
||||||
//
|
//
|
||||||
}),
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
<template>
|
|
||||||
<v-app>
|
|
||||||
<v-main>
|
|
||||||
<AppBar />
|
|
||||||
<Noise />
|
|
||||||
</v-main>
|
|
||||||
</v-app>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import Noise from './components/Noise'
|
|
||||||
import AppBar from './components/AppBar'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'App',
|
|
||||||
|
|
||||||
components: {
|
|
||||||
AppBar,
|
|
||||||
Noise,
|
|
||||||
},
|
|
||||||
|
|
||||||
data: () => ({
|
|
||||||
//
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
151
src/components/HelloWorld.vue
Normal file
151
src/components/HelloWorld.vue
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
<template>
|
||||||
|
<v-container>
|
||||||
|
<v-row class="text-center">
|
||||||
|
<v-col cols="12">
|
||||||
|
<v-img
|
||||||
|
:src="require('../assets/logo.svg')"
|
||||||
|
class="my-3"
|
||||||
|
contain
|
||||||
|
height="200"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col class="mb-4">
|
||||||
|
<h1 class="display-2 font-weight-bold mb-3">
|
||||||
|
Welcome to Vuetify
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p class="subheading font-weight-regular">
|
||||||
|
For help and collaboration with other Vuetify developers,
|
||||||
|
<br>please join our online
|
||||||
|
<a
|
||||||
|
href="https://community.vuetifyjs.com"
|
||||||
|
target="_blank"
|
||||||
|
>Discord Community</a>
|
||||||
|
</p>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col
|
||||||
|
class="mb-5"
|
||||||
|
cols="12"
|
||||||
|
>
|
||||||
|
<h2 class="headline font-weight-bold mb-3">
|
||||||
|
What's next?
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<v-row justify="center">
|
||||||
|
<a
|
||||||
|
v-for="(next, i) in whatsNext"
|
||||||
|
:key="i"
|
||||||
|
:href="next.href"
|
||||||
|
class="subheading mx-3"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{{ next.text }}
|
||||||
|
</a>
|
||||||
|
</v-row>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col
|
||||||
|
class="mb-5"
|
||||||
|
cols="12"
|
||||||
|
>
|
||||||
|
<h2 class="headline font-weight-bold mb-3">
|
||||||
|
Important Links
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<v-row justify="center">
|
||||||
|
<a
|
||||||
|
v-for="(link, i) in importantLinks"
|
||||||
|
:key="i"
|
||||||
|
:href="link.href"
|
||||||
|
class="subheading mx-3"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{{ link.text }}
|
||||||
|
</a>
|
||||||
|
</v-row>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col
|
||||||
|
class="mb-5"
|
||||||
|
cols="12"
|
||||||
|
>
|
||||||
|
<h2 class="headline font-weight-bold mb-3">
|
||||||
|
Ecosystem
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<v-row justify="center">
|
||||||
|
<a
|
||||||
|
v-for="(eco, i) in ecosystem"
|
||||||
|
:key="i"
|
||||||
|
:href="eco.href"
|
||||||
|
class="subheading mx-3"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{{ eco.text }}
|
||||||
|
</a>
|
||||||
|
</v-row>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'HelloWorld',
|
||||||
|
|
||||||
|
data: () => ({
|
||||||
|
ecosystem: [
|
||||||
|
{
|
||||||
|
text: 'vuetify-loader',
|
||||||
|
href: 'https://github.com/vuetifyjs/vuetify-loader'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'github',
|
||||||
|
href: 'https://github.com/vuetifyjs/vuetify'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'awesome-vuetify',
|
||||||
|
href: 'https://github.com/vuetifyjs/awesome-vuetify'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
importantLinks: [
|
||||||
|
{
|
||||||
|
text: 'Documentation',
|
||||||
|
href: 'https://vuetifyjs.com'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Chat',
|
||||||
|
href: 'https://community.vuetifyjs.com'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Made with Vuetify',
|
||||||
|
href: 'https://madewithvuejs.com/vuetify'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Twitter',
|
||||||
|
href: 'https://twitter.com/vuetifyjs'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Articles',
|
||||||
|
href: 'https://medium.com/vuetify'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
whatsNext: [
|
||||||
|
{
|
||||||
|
text: 'Explore components',
|
||||||
|
href: 'https://vuetifyjs.com/components/api-explorer'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Select a layout',
|
||||||
|
href: 'https://vuetifyjs.com/getting-started/pre-made-layouts'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'Frequently Asked Questions',
|
||||||
|
href: 'https://vuetifyjs.com/getting-started/frequently-asked-questions'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<template>
|
|
||||||
<v-container>
|
|
||||||
<v-form v-model="valid">
|
|
||||||
<v-text-field
|
|
||||||
v-model="username"
|
|
||||||
label="Username"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
|
|
||||||
<v-text-field
|
|
||||||
v-model="password"
|
|
||||||
label="Password"
|
|
||||||
type="password"
|
|
||||||
required
|
|
||||||
/>
|
|
||||||
|
|
||||||
<v-btn
|
|
||||||
class="mr-4"
|
|
||||||
type="submit"
|
|
||||||
>
|
|
||||||
Submit
|
|
||||||
</v-btn>
|
|
||||||
</v-form>
|
|
||||||
</v-container>
|
|
||||||
</template>
|
|
||||||
@@ -1,39 +1,39 @@
|
|||||||
import { Filter, Noise, Transport } from "tone";
|
import { Filter, Noise, Transport } from 'tone'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Noise",
|
name: 'Noise',
|
||||||
|
|
||||||
data: () => ({
|
data: () => ({
|
||||||
startDisabled: false,
|
startDisabled: false,
|
||||||
isTimerEnabled: false,
|
isTimerEnabled: false,
|
||||||
noiseDuration: 60,
|
noiseDuration: 60,
|
||||||
timeRemaining: 0,
|
timeRemaining: 0,
|
||||||
noiseColorOptions: ["pink", "white", "brown"],
|
noiseColorOptions: ['pink', 'white', 'brown'],
|
||||||
noiseColor: "pink",
|
noiseColor: 'pink',
|
||||||
noiseVolume: -10,
|
noiseVolume: -10,
|
||||||
isFilterEnabled: false,
|
isFilterEnabled: false,
|
||||||
frequencyCutoff: 20000,
|
frequencyCutoff: 20000,
|
||||||
filterTypeOptions: ["lowpass", "highpass", "bandpass", "lowshelf", "highshelf", "notch", "allpass", "peaking"],
|
filterTypeOptions: ['lowpass', 'highpass', 'bandpass', 'lowshelf', 'highshelf', 'notch', 'allpass', 'peaking'],
|
||||||
filterType: "lowpass",
|
filterType: 'lowpass',
|
||||||
rules: {
|
rules: {
|
||||||
number: value => !isNaN(parseInt(value, 10)) || 'Invalid number',
|
number: value => !isNaN(parseInt(value, 10)) || 'Invalid number',
|
||||||
negative: value => (!isNaN(parseInt(value, 10)) && value <= 0) || "Can't be greater than 0"
|
negative: value => (!isNaN(parseInt(value, 10)) && value <= 0) || "Can't be greater than 0"
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
created() {
|
created () {
|
||||||
this.noise = new Noise()
|
this.noise = new Noise()
|
||||||
this.filter = new Filter()
|
this.filter = new Filter()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
playNoise() {
|
playNoise () {
|
||||||
this.startDisabled = true
|
this.startDisabled = true
|
||||||
Transport.cancel()
|
Transport.cancel()
|
||||||
|
|
||||||
if (this.isFilterEnabled) {
|
if (this.isFilterEnabled) {
|
||||||
this.filter = new Filter(this.frequencyCutoff, this.filterType).toDestination()
|
this.filter = new Filter(this.frequencyCutoff, this.filterType).toDestination()
|
||||||
this.noise = new Noise({volume: this.noiseVolume, type: this.noiseColor}).connect(this.filter)
|
this.noise = new Noise({ volume: this.noiseVolume, type: this.noiseColor }).connect(this.filter)
|
||||||
} else {
|
} else {
|
||||||
this.noise = new Noise({volume: this.noiseVolume, type: this.noiseColor}).toDestination()
|
this.noise = new Noise({ volume: this.noiseVolume, type: this.noiseColor }).toDestination()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isTimerEnabled) {
|
if (this.isTimerEnabled) {
|
||||||
@@ -48,7 +48,7 @@ export default {
|
|||||||
|
|
||||||
Transport.start()
|
Transport.start()
|
||||||
},
|
},
|
||||||
stopTransport() {
|
stopTransport () {
|
||||||
clearInterval(this.transportInterval)
|
clearInterval(this.transportInterval)
|
||||||
Transport.stop()
|
Transport.stop()
|
||||||
this.startDisabled = false
|
this.startDisabled = false
|
||||||
@@ -56,14 +56,14 @@ export default {
|
|||||||
clearInterval(this.timeRemainingInterval)
|
clearInterval(this.timeRemainingInterval)
|
||||||
this.timeRemaining = 0
|
this.timeRemaining = 0
|
||||||
},
|
},
|
||||||
startTimer() {
|
startTimer () {
|
||||||
this.timeRemaining -= 1
|
this.timeRemaining -= 1
|
||||||
},
|
},
|
||||||
updateVolume() {
|
updateVolume () {
|
||||||
this.noise.volume.value = this.noiseVolume
|
this.noise.volume.value = this.noiseVolume
|
||||||
},
|
},
|
||||||
updateNoiseColor() {
|
updateNoiseColor () {
|
||||||
this.noise.type = this.noiseColor
|
this.noise.type = this.noiseColor
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +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 router from './router'
|
import router from './router'
|
||||||
|
import vuetify from './plugins/vuetify'
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
vuetify,
|
|
||||||
router,
|
router,
|
||||||
|
vuetify,
|
||||||
render: h => h(App)
|
render: h => h(App)
|
||||||
}).$mount('#app')
|
}).$mount('#app')
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue'
|
||||||
import Vuetify from 'vuetify/lib/framework';
|
import Vuetify from 'vuetify/lib/framework'
|
||||||
|
|
||||||
Vue.use(Vuetify);
|
Vue.use(Vuetify)
|
||||||
|
|
||||||
export default new Vuetify({
|
export default new Vuetify({
|
||||||
theme: { dark: false },
|
})
|
||||||
});
|
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ const routes = [
|
|||||||
component: Home
|
component: Home
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/about',
|
||||||
name: 'LoginView',
|
name: 'About',
|
||||||
// route level code-splitting
|
// route level code-splitting
|
||||||
// this generates a separate chunk (about.[hash].js) for this route
|
// this generates a separate chunk (about.[hash].js) for this route
|
||||||
// which is lazy-loaded when the route is visited.
|
// which is lazy-loaded when the route is visited.
|
||||||
component: () => import(/* webpackChunkName: "about" */ '../views/Login.vue')
|
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
5
src/views/About.vue
Normal file
5
src/views/About.vue
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<template>
|
||||||
|
<div class="about">
|
||||||
|
<h1>This is an about page</h1>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -3,11 +3,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// @ is an alias to /src
|
import Noise from '../components/Noise'
|
||||||
import Noise from '@/components/Noise'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Home',
|
name: 'Home',
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Noise
|
Noise
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
<template>
|
|
||||||
<Login />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// @ is an alias to /src
|
|
||||||
import Login from '@/components/Login'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'LoginView',
|
|
||||||
components: {
|
|
||||||
Login
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
Reference in New Issue
Block a user