Add several UX improvements

This commit is contained in:
Kevin Thomas
2021-11-14 00:14:15 -08:00
parent adb20209c5
commit 28914fb8a4
6 changed files with 19 additions and 15 deletions

View File

@@ -4,9 +4,9 @@
"sessionFileStorePath": "sessions", "sessionFileStorePath": "sessions",
"sampleUploadPath": "samples", "sampleUploadPath": "samples",
"maxSampleSize": 10737418240, // In bytes, 10GB by default "maxSampleSize": 10737418240, // In bytes, 10GB by default
"sessionSecret": "cats", "sessionSecret": "CHANGE_THIS",
"logFile": "log/noisedash.log", "logFile": "log/noisedash.log",
"tls": false, "tls": false, // Keep this as false if using an external web server like nginx
"tlsKey": "certs/key.pem", "tlsKey": "certs/key.pem",
"tlsCert": "certs/cert.pem" "tlsCert": "certs/cert.pem"
} }

View File

@@ -186,7 +186,7 @@ router.post('/profiles/default', (req, res) => {
tremolo_frequency, tremolo_frequency,
tremolo_depth) tremolo_depth)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, [ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, [
'Default', req.user.id, 0, 30, -10, 'pink', 0, 'lowpass', 20000, 'Default', req.user.id, 0, 30, -10, 'pink', 0, 'lowpass', 1000,
0, 0.5, 100, 5000, 0, 0.5, 0.5 0, 0.5, 100, 5000, 0, 0.5, 0.5
], ],
function (err) { function (err) {

View File

@@ -16,12 +16,13 @@
<v-btn <v-btn
v-bind="attrs" v-bind="attrs"
v-on="on" v-on="on"
@click="registerUserDialog = true" @click="$refs.registerUserForm.reset()"
> >
Register User Register User
</v-btn> </v-btn>
</template> </template>
<v-form <v-form
ref="registerUserForm"
v-model="isUserValid" v-model="isUserValid"
> >
<v-card> <v-card>

View File

@@ -78,12 +78,13 @@
class="mx-3 my-3" class="mx-3 my-3"
:disabled="playDisabled" :disabled="playDisabled"
v-on="on" v-on="on"
@click="profileName = ''" @click="$refs.profileForm.reset()"
> >
Save Profile As... Save Profile As...
</v-btn> </v-btn>
</template> </template>
<v-form <v-form
ref="profileForm"
v-model="isProfileValid" v-model="isProfileValid"
> >
<v-card> <v-card>
@@ -195,7 +196,7 @@
max="0" max="0"
min="-30" min="-30"
class="mx-3" class="mx-3"
@change="updateVolume" @input="updateVolume"
/> />
<div <div
class="mx-3" class="mx-3"
@@ -238,7 +239,7 @@
max="20000" max="20000"
min="0" min="0"
class="mx-3" class="mx-3"
@change="updateFilterCutoff" @input="updateFilterCutoff"
/> />
<div <div
class="mx-3" class="mx-3"
@@ -280,7 +281,7 @@
min="0.01" min="0.01"
step="0.01" step="0.01"
class="mx-3" class="mx-3"
@change="updateLFOFilterCutoffFrequency" @input="updateLFOFilterCutoffFrequency"
/> />
<div <div
class="mx-3" class="mx-3"
@@ -298,7 +299,7 @@
:min="lfoFilterCutoffMin" :min="lfoFilterCutoffMin"
:max="lfoFilterCutoffMax" :max="lfoFilterCutoffMax"
class="mx-3" class="mx-3"
@change="updateLFOFilterCutoffRange" @input="updateLFOFilterCutoffRange"
/> />
<div <div
class="mx-3" class="mx-3"
@@ -334,7 +335,7 @@
ticks ticks
tick-size="4" tick-size="4"
class="mx-3" class="mx-3"
@change="updateTremoloFrequency" @input="updateTremoloFrequency"
/> />
<div <div
class="mx-3" class="mx-3"
@@ -355,7 +356,7 @@
ticks ticks
tick-size="4" tick-size="4"
class="mx-3" class="mx-3"
@change="updateTremoloDepth" @input="updateTremoloDepth"
/> />
<div <div
class="mx-3" class="mx-3"
@@ -400,7 +401,7 @@
max="0" max="0"
min="-30" min="-30"
class="mx-3" class="mx-3"
@change="updateSampleVolume(sample.id, index)" @input="updateSampleVolume(sample.id, index)"
/> />
<div <div
class="mx-3" class="mx-3"
@@ -480,11 +481,13 @@
v-bind="attrs" v-bind="attrs"
class="mx-3 my-3 mb-5" class="mx-3 my-3 mb-5"
v-on="on" v-on="on"
@click="$refs.uploadSampleForm.reset()"
> >
Upload Sample Upload Sample
</v-btn> </v-btn>
</template> </template>
<v-form <v-form
ref="uploadSampleForm"
v-model="isSampleUploadValid" v-model="isSampleUploadValid"
> >
<v-card> <v-card>

View File

@@ -23,13 +23,13 @@ export default {
noiseColorItems: ['pink', 'white', 'brown'], noiseColorItems: ['pink', 'white', 'brown'],
volume: -10, volume: -10,
isFilterEnabled: false, isFilterEnabled: false,
filterCutoff: 20000, filterCutoff: 1000,
filterType: 'lowpass', filterType: 'lowpass',
filterTypeItems: ['lowpass', 'highpass', 'bandpass', 'lowshelf', 'highshelf', 'notch', 'allpass', 'peaking'], filterTypeItems: ['lowpass', 'highpass', 'bandpass', 'lowshelf', 'highshelf', 'notch', 'allpass', 'peaking'],
isLFOFilterCutoffEnabled: false, isLFOFilterCutoffEnabled: false,
lfoFilterCutoffFrequency: 0.5, lfoFilterCutoffFrequency: 0.5,
lfoFilterCutoffMin: 0, lfoFilterCutoffMin: 0,
lfoFilterCutoffMax: 20000, lfoFilterCutoffMax: 5000,
lfoFilterCutoffRange: [100, 5000], lfoFilterCutoffRange: [100, 5000],
isTremoloEnabled: false, isTremoloEnabled: false,
tremoloFrequency: 0.5, tremoloFrequency: 0.5,

View File

@@ -70,7 +70,7 @@ router.beforeEach((to, from, next) => {
} else if (to.name === 'Register') { } else if (to.name === 'Register') {
instance.get('/setup') instance.get('/setup')
.then(response => { .then(response => {
if (!response.data.setup) { if (response.status !== 200 || !response.data.setup) {
next('/login') next('/login')
} else { } else {
next() next()