diff --git a/src/components/Admin.vue b/src/components/Admin.vue index b7d29c1..f9cd068 100644 --- a/src/components/Admin.vue +++ b/src/components/Admin.vue @@ -1,70 +1,72 @@ - - + + Admin Dashboard - - - - - ID - - - Username - - - Is Admin - - - Delete User - - - - - - {{ user.id }} - {{ user.username }} - - - - - - Delete - - - - - - - {{ updateText }} + + + + + + ID + + + Username + + + Is Admin + + + Delete User + + + + + + {{ user.id }} + {{ user.username }} + + + + + + Delete + + + + + + + {{ updateText }} - - - Close - - - - + + + Close + + + + + diff --git a/src/components/Noise.vue b/src/components/Noise.vue index 1d68c1b..4e77ec7 100644 --- a/src/components/Noise.vue +++ b/src/components/Noise.vue @@ -1,19 +1,276 @@ - - + + + Noisedash + - - - Welcome to Noisedash - + + + + mdi-play + + + + mdi-stop + + + + + + + Timer + + + + + + + + + + + + + + + + + + + + + + Noise Settings + + + + + + {{ volume }} + + + + + + + + + + + Filter + + + + + + + + + + {{ filterCutoff }} + + + + + + + + + + + + + + + + + {{ lfoFilterCutoffFrequency }} + + + + + + + {{ lfoFilterCutoffRange }} + + + + + + + Tremolo + + + + + + + + + + {{ tremoloFrequency }} + + + + + + + {{ tremoloDepth }} + + @@ -27,18 +284,18 @@ :items="profileItems" return-object label="Profiles" - class="mx-3" + class="mx-3 mb-5" @change="loadProfile" /> - - - Delete Profile - + + Delete Profile + + Save Profile @@ -86,202 +344,6 @@ - - - - Playback - - - - - Start - - - - Stop - - - - - - - - - - - - - Noise Settings - - - - - - - - - - - - Filter - - - - - - - - - - - - - - - - - - - - - - - - Tremolo - - - - - - - - - - - - - - diff --git a/src/components/noise.js b/src/components/noise.js index e0919f3..0cbb8f0 100644 --- a/src/components/noise.js +++ b/src/components/noise.js @@ -4,13 +4,17 @@ export default { name: 'Noise', data: () => ({ + isTimerValid: false, selectedProfile: {}, profileItems: [], profileDialog: false, profileName: '', playDisabled: false, isTimerEnabled: false, - duration: 60, + hours: 0, + minutes: 0, + seconds: 30, + duration: 30, timeRemaining: 0, noiseColor: 'pink', noiseColorItems: ['pink', 'white', 'brown'], @@ -20,13 +24,21 @@ export default { filterType: 'lowpass', filterTypeItems: ['lowpass', 'highpass', 'bandpass', 'lowshelf', 'highshelf', 'notch', 'allpass', 'peaking'], isLFOFilterCutoffEnabled: false, - lfoFilterCutoffFrequency: 1, + lfoFilterCutoffFrequency: 0.5, lfoFilterCutoffMin: 0, lfoFilterCutoffMax: 20000, - lfoFilterCutoffRange: [100, 1000], + lfoFilterCutoffRange: [100, 5000], isTremoloEnabled: false, tremoloFrequency: 0.5, - tremoloDepth: 0.5 + tremoloDepth: 0.5, + rules: { + lt (n) { + return value => (!isNaN(parseInt(value, 10)) && value < n) || 'Must be less than ' + n + }, + gt (n) { + return value => (!isNaN(parseInt(value, 10)) && value > n) || 'Must be greater than ' + n + } + } }), created () { this.noise = new Noise() @@ -61,10 +73,15 @@ export default { } if (this.isTimerEnabled) { + console.log(this.hours) + console.log(this.minutes) + console.log(this.seconds) + this.duration = parseInt((this.hours * 3600)) + parseInt((this.minutes * 60)) + parseInt(this.seconds) + console.log(this.duration) this.noise.sync().start(0).stop(this.duration) Transport.loopEnd = this.duration this.timeRemaining = this.duration - this.transportInterval = setInterval(() => this.stopTransport(), this.duration * 1000 + 100) + this.transportInterval = setInterval(() => this.stop(), this.duration * 1000 + 100) this.timeRemainingInterval = setInterval(() => this.startTimer(), 1000) } else { this.noise.sync().start(0) @@ -79,6 +96,7 @@ export default { clearInterval(this.timeRemainingInterval) this.timeRemaining = 0 + this.duration = 0 }, startTimer () { this.timeRemaining -= 1
{{ volume }}
{{ filterCutoff }}
{{ lfoFilterCutoffFrequency }}
{{ lfoFilterCutoffRange }}
{{ tremoloFrequency }}
{{ tremoloDepth }}