aboutsummaryrefslogtreecommitdiff
path: root/src/components/export_import
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2019-04-07 20:33:11 +0300
committerHenry Jameson <me@hjkos.com>2019-04-07 20:33:11 +0300
commit9108737d55300d8a4f822ba94335d8b53f04854d (patch)
tree76c51864a8f84edf260f2cf2fcf7625799f2533f /src/components/export_import
parent8c7f765dff8b66ff27aeeab5bc09cd715ab328a9 (diff)
Webpack 4, ESLint with Vue, Node-sass, updated dependencies overall. New linting.
Diffstat (limited to 'src/components/export_import')
-rw-r--r--src/components/export_import/export_import.vue33
1 files changed, 24 insertions, 9 deletions
diff --git a/src/components/export_import/export_import.vue b/src/components/export_import/export_import.vue
index 451a2668..20c6f569 100644
--- a/src/components/export_import/export_import.vue
+++ b/src/components/export_import/export_import.vue
@@ -1,12 +1,27 @@
<template>
-<div class="import-export-container">
- <slot name="before"/>
- <button class="btn" @click="exportData">{{ exportLabel }}</button>
- <button class="btn" @click="importData">{{ importLabel }}</button>
- <slot name="afterButtons"/>
- <p v-if="importFailed" class="alert error">{{ importFailedText }}</p>
- <slot name="afterError"/>
-</div>
+ <div class="import-export-container">
+ <slot name="before" />
+ <button
+ class="btn"
+ @click="exportData"
+ >
+ {{ exportLabel }}
+ </button>
+ <button
+ class="btn"
+ @click="importData"
+ >
+ {{ importLabel }}
+ </button>
+ <slot name="afterButtons" />
+ <p
+ v-if="importFailed"
+ class="alert error"
+ >
+ {{ importFailedText }}
+ </p>
+ <slot name="afterError" />
+ </div>
</template>
<script>
@@ -49,7 +64,7 @@ export default {
if (event.target.files[0]) {
// eslint-disable-next-line no-undef
const reader = new FileReader()
- reader.onload = ({target}) => {
+ reader.onload = ({ target }) => {
try {
const parsed = JSON.parse(target.result)
const valid = this.validator(parsed)