Skip to content

Commit

Permalink
adding save as button, removing menu, basic tempo support
Browse files Browse the repository at this point in the history
  • Loading branch information
almibe committed Mar 16, 2019
1 parent 4ed3d54 commit e24b9c1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
23 changes: 19 additions & 4 deletions src/c-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@
</div>
</div>
</div>
<div class="field is-horizontal">
<div class="field-label is-normal">
<label class="label">Tempo:</label>
</div>
<div class="field-body">
<div class="control">
<input v-model="tempo" @change="changeTempo" type="text">
</div>
</div>
</div>
<div id="midi"></div>
</div>
<div class="column">
Expand Down Expand Up @@ -50,20 +60,25 @@ export default {
changeTranspose: function() {
if (this.transpose === 'Piano') {
this.abcEditor.paramChanged({midiTranspose: 0})
//this.abcEditor.abcjsParams = {midiTranspose: 0}
} else if (this.transpose === 'Guitar') {
this.abcEditor.paramChanged({midiTranspose: -12})
//this.abcEditor.abcjsParams = {midiTranspose: -12}
} else {
this.abcEditor.paramChanged({midiTranspose: 0})
//this.abcEditor.abcjsParams = {midiTranspose: 0}
}
},
changeTempo: function() {
if (isNan(this.tempo)) {
//TODO handle error
} else {
this.abcEditor.paramChanged({qpm: this.tempo})
}
}
},
data() {
return {
transpose: 'Piano',
abcEditor: null
abcEditor: null,
tempo: 180
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/c-menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<div>
<a class="button">New</a>
<a class="button">Save</a>
<a class="button">Save As</a>
<a class="button">Load</a>
<a class="button">Training</a>
</div>
Expand Down
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ const createWindow = async () => {
// Create the browser window.
mainWindow = new BrowserWindow({
width: 800,
height: 600,
height: 800,
});

mainWindow.setMenu(null);
mainWindow.setMenuBarVisibility(false);

// and load the index.html of the app.
mainWindow.loadURL(`file://${__dirname}/index.html`);

Expand Down

0 comments on commit e24b9c1

Please sign in to comment.