Skip to content

Commit

Permalink
chore: update version for release
Browse files Browse the repository at this point in the history
  • Loading branch information
cschweda committed Jan 24, 2019
1 parent 2587f85 commit 2887fed
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"name": "icjia-markdown-next",
"version": "0.1.0",
"version": "0.2.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit"
},
"license": "MIT",
"repository": "https://github.com/ICJIA/icjia-markdown-next",
"dependencies": {
"@babel/polyfill": "^7.0.0-rc.1",
"codemirror": "^5.43.0",
Expand Down
12 changes: 11 additions & 1 deletion src/components/NavMarkdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@
</template>

<script>
function clearFileInput(ctrl) {
try {
ctrl.value = null;
} catch (ex) {}
if (ctrl.value) {
ctrl.parentNode.replaceChild(ctrl.cloneNode(true), ctrl);
}
}
import { EventBus } from "@/event-bus.js";
import config from "@/config";
export default {
Expand Down Expand Up @@ -118,15 +126,17 @@ export default {
let file = fileInput.files[0];
let fileTitle = file.name;
fileTitle = fileTitle.replace(/\.[^/.]+$/, "");
console.log(fileTitle);
let reader = new FileReader();
//Filereader: https://developer.mozilla.org/en-US/docs/Web/API/FileReader
reader.onload = function(e) {
EventBus.$emit("loadMarkdown", reader.result);
console.log("File loaded:", reader.result);
EventBus.$emit("displayStatus", "File loaded.");
};
reader.readAsText(file);
this.dialog = false;
clearFileInput(document.getElementById("fileInput"));
}
},
data() {
Expand Down
22 changes: 20 additions & 2 deletions src/components/NavPrimary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,23 @@
<!-- <v-toolbar-side-icon></v-toolbar-side-icon> -->
<v-toolbar-title>ICJIA Markdown Editor</v-toolbar-title>
<v-spacer></v-spacer>
<div class="wordCount">Word count: {{wordCount}}</div>
<div class="wordCount">Word count: {{wordCount}}&nbsp;&nbsp;&nbsp;&nbsp;</div>
<v-tooltip bottom open-delay="400">
<v-btn
slot="activator"
color="grey darken-1"
style="font-size: 10px"
dark
small
href="https://github.com/ICJIA/icjia-calendar/blob/master/CHANGELOG.md"
target="_blank"
>
<v-icon size="10px">fab fa-github</v-icon>
&nbsp;
Version: {{info.version}}
</v-btn>
<span>Find me on Github</span>
</v-tooltip>
</v-toolbar>
<v-snackbar v-model="snackbar" top>
{{ msg }}
Expand All @@ -14,6 +30,7 @@
</template>

<script>
const info = require("../../package.json");
import { EventBus } from "@/event-bus.js";
export default {
mounted() {
Expand All @@ -30,7 +47,8 @@ export default {
return {
snackbar: false,
msg: "",
wordCount: 0
wordCount: 0,
info
};
}
};
Expand Down

0 comments on commit 2887fed

Please sign in to comment.