mirror of
https://github.com/kaythomas0/noisedash.git
synced 2025-11-11 10:56:20 +00:00
Fix bug that causes editing a sample to discard unsaved work
This commit is contained in:
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "noisedash",
|
"name": "noisedash",
|
||||||
"version": "0.6.3",
|
"version": "0.6.4",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "noisedash",
|
"name": "noisedash",
|
||||||
"version": "0.6.3",
|
"version": "0.6.4",
|
||||||
"private": true,
|
"private": true,
|
||||||
"author": "Kay Thomas <kaythomas@pm.me> (https://kaythomas.dev)",
|
"author": "Kay Thomas <kaythomas@pm.me> (https://kaythomas.dev)",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -297,7 +297,7 @@
|
|||||||
<v-card-text>
|
<v-card-text>
|
||||||
<v-container>
|
<v-container>
|
||||||
<v-row>
|
<v-row>
|
||||||
<p>Select profile to record audio for. This is only supported on Chrome and Firefox.</p>
|
<p>Select profile to record audio for. This is only supported on Chrome and Firefox. Current profile will be saved before recording.</p>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-select
|
<v-select
|
||||||
@@ -1026,7 +1026,7 @@
|
|||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="previewSampleFadeIn"
|
v-model="previewSampleFadeIn"
|
||||||
type="number"
|
type="number"
|
||||||
label="Fade In Time"
|
label="Fade In Time (In continuous mode, this only effects first playback)"
|
||||||
:disabled="previewSamplePlaying"
|
:disabled="previewSamplePlaying"
|
||||||
:rules="[rules.gt(-1)]"
|
:rules="[rules.gt(-1)]"
|
||||||
@change="updatePreviewSamplePlayerFadeIn"
|
@change="updatePreviewSamplePlayerFadeIn"
|
||||||
|
|||||||
@@ -736,7 +736,16 @@ export default {
|
|||||||
}).then(response => {
|
}).then(response => {
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
this.getSamples()
|
this.getSamples()
|
||||||
this.loadProfile(false)
|
|
||||||
|
// Update sample if it's already loaded in current profile
|
||||||
|
const sample = this.loadedSamples.find(s => s.id === this.selectedPreviewSample.id)
|
||||||
|
if (sample) {
|
||||||
|
sample.fadeIn = this.previewSampleFadeIn
|
||||||
|
sample.loopPointsEnabled = this.previewSampleLoopPointsEnabled
|
||||||
|
sample.loopStart = this.previewSampleLoopStart
|
||||||
|
sample.loopEnd = this.previewSampleLoopEnd
|
||||||
|
}
|
||||||
|
|
||||||
this.closeEditSampleForm()
|
this.closeEditSampleForm()
|
||||||
this.infoSnackbarText = 'Sample Saved'
|
this.infoSnackbarText = 'Sample Saved'
|
||||||
this.infoSnackbar = true
|
this.infoSnackbar = true
|
||||||
@@ -760,6 +769,9 @@ export default {
|
|||||||
this.profileMoreDialog = false
|
this.profileMoreDialog = false
|
||||||
},
|
},
|
||||||
startRecording () {
|
startRecording () {
|
||||||
|
// Save current profile before recording
|
||||||
|
this.updateProfile()
|
||||||
|
|
||||||
this.$http.get('/profiles/'.concat(this.recordedProfile.id))
|
this.$http.get('/profiles/'.concat(this.recordedProfile.id))
|
||||||
.then(async response => {
|
.then(async response => {
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
|
|||||||
Reference in New Issue
Block a user