Skip to content

Commit

Permalink
feat: add save and close to file editor
Browse files Browse the repository at this point in the history
  • Loading branch information
cadriel committed Nov 2, 2020
1 parent eee510b commit 24bc44b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
16 changes: 13 additions & 3 deletions src/components/dialogs/dialogFileEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,19 @@
<v-btn
v-if="!readonly && unsavedChanges"
dark
color="error"
@click="emitSave(newContents, filename, path)">
color="warning"
class="ml-2"
@click="emitSave(false, newContents, filename, path)">
Save
</v-btn>
<v-btn
v-if="!readonly && unsavedChanges"
dark
color="warning"
class="ml-2"
@click="emitSave(true, newContents, filename, path)">
Save &amp; Close
</v-btn>
</v-toolbar>
<v-card-text>
<file-editor-widget
Expand Down Expand Up @@ -94,8 +103,9 @@ export default class DialogFileEditor extends Mixins(UtilsMixin) {
this.$emit('input', false)
}
emitSave (contents?: string, filename?: string, path?: string) {
emitSave (close: boolean, contents?: string, filename?: string, path?: string) {
this.$emit('save', contents, filename, path)
if (close) this.$emit('input', false)
}
}
</script>
Expand Down
1 change: 0 additions & 1 deletion todo.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# TODO [fluidd]

## Next Up
- look into why IOS/safari fails to load some config files
- in file save window add 'save and close' option, and maybe 'save, close and restart'
- ensure tabs are also remembered in localstorage
- temperature presets
Expand Down

0 comments on commit 24bc44b

Please sign in to comment.