Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
Fixes#80 - Source Field added
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-budhiraja committed Nov 15, 2019
1 parent ebdbaf3 commit 0d3d91f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ <h2 class="text-red" v-if="displayDupError">Oh sorry, you can't have duplicated
</b-input>
</b-field>

<b-field horizontal label="Source">
<b-input
type="url"
ref="noteSource"
v-model="note.source"
placeholder="Source">
</b-input>
</b-field>

<b-field v-if="!gistsSelected" horizontal label="Tags">
<b-taginput
v-model="note.tags"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export default {
name: '',
description: '',
files: {},
source: '',
public: false,
updatedAt: null,
createdAt: null,
Expand Down Expand Up @@ -65,6 +66,7 @@ export default {
this.note.name = `${noteType}:${generateNoteName()}`;
}
console.log(this.note)
this.addNote(this.note).then(() => {
this.$parent.close();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ <h2 class="text-red" v-if="displayDupError">Oh sorry, you can't have duplicated
</b-input>
</b-field>

<b-field horizontal label="Source">
<b-input
type="url"
ref="noteSource"
v-model="note.source"
placeholder="Source">
</b-input>
</b-field>

<b-field v-if="!gistsSelected" horizontal label="Tags">
<b-taginput
v-model="note.tags"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default {
noteUpdated: {
name: '',
description: '',
source: '',
files: {},
updatedAt: null,
createdAt: null,
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/components/notes-list/note-card/NoteCard.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ <h3 v-else>{{ note.name }}</h3>
<a id="link-note" v-if="gistsSelected" @click="open(note.url)" title="Show on Github">
<b-icon icon="github"></b-icon>
</a>
<a id="note-source" v-if="note.source" @click="open(note.source)" title="Source">
<b-icon icon="link"></b-icon>
</a>
<a id="update-note" @click="updateNoteModalActive = true" title="Edit note">
<b-icon icon="pencil"></b-icon>
</a>
Expand Down

0 comments on commit 0d3d91f

Please sign in to comment.