Created
May 24, 2019 07:50
-
-
Save RoySegall/c08025a9d77a1404c65ebec858e56a06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="wrapper"> | |
<main> | |
<b>Welcome!</b> | |
<ul> | |
<li v-for="file in files">{{file}}</li> | |
</ul> | |
</main> | |
</div> | |
</template> | |
<script> | |
import fs from 'fs' | |
export default { | |
name: 'landing-page', | |
data () { | |
return { | |
'files': [] | |
} | |
}, | |
created () { | |
fs.readFile('/tmp/open-with', 'utf8', (err, data) => { | |
if (err) { | |
throw err | |
} | |
const files = JSON.parse(data) | |
if (files.length === 0) { | |
return | |
} | |
this.files = files | |
}) | |
}, | |
methods: {} | |
} | |
</script> | |
<style lang="scss"> | |
#wrapper { | |
text-align: center; | |
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment