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

Commit 0d3d91f

Browse files
Fixes#80 - Source Field added
1 parent ebdbaf3 commit 0d3d91f

File tree

5 files changed

+24
-0
lines changed

5 files changed

+24
-0
lines changed

src/renderer/components/modals/create-note-modal/CreateNoteModal.html

+9
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ <h2 class="text-red" v-if="displayDupError">Oh sorry, you can't have duplicated
2424
</b-input>
2525
</b-field>
2626

27+
<b-field horizontal label="Source">
28+
<b-input
29+
type="url"
30+
ref="noteSource"
31+
v-model="note.source"
32+
placeholder="Source">
33+
</b-input>
34+
</b-field>
35+
2736
<b-field v-if="!gistsSelected" horizontal label="Tags">
2837
<b-taginput
2938
v-model="note.tags"

src/renderer/components/modals/create-note-modal/CreateNoteModal.vue

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default {
2424
name: '',
2525
description: '',
2626
files: {},
27+
source: '',
2728
public: false,
2829
updatedAt: null,
2930
createdAt: null,
@@ -65,6 +66,7 @@ export default {
6566
this.note.name = `${noteType}:${generateNoteName()}`;
6667
}
6768
69+
console.log(this.note)
6870
this.addNote(this.note).then(() => {
6971
this.$parent.close();
7072
});

src/renderer/components/modals/update-note-modal/UpdateNoteModal.html

+9
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ <h2 class="text-red" v-if="displayDupError">Oh sorry, you can't have duplicated
2525
</b-input>
2626
</b-field>
2727

28+
<b-field horizontal label="Source">
29+
<b-input
30+
type="url"
31+
ref="noteSource"
32+
v-model="note.source"
33+
placeholder="Source">
34+
</b-input>
35+
</b-field>
36+
2837
<b-field v-if="!gistsSelected" horizontal label="Tags">
2938
<b-taginput
3039
v-model="note.tags"

src/renderer/components/modals/update-note-modal/UpdateNoteModal.vue

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default {
1616
noteUpdated: {
1717
name: '',
1818
description: '',
19+
source: '',
1920
files: {},
2021
updatedAt: null,
2122
createdAt: null,

src/renderer/components/notes-list/note-card/NoteCard.html

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ <h3 v-else>{{ note.name }}</h3>
1414
<a id="link-note" v-if="gistsSelected" @click="open(note.url)" title="Show on Github">
1515
<b-icon icon="github"></b-icon>
1616
</a>
17+
<a id="note-source" v-if="note.source" @click="open(note.source)" title="Source">
18+
<b-icon icon="link"></b-icon>
19+
</a>
1720
<a id="update-note" @click="updateNoteModalActive = true" title="Edit note">
1821
<b-icon icon="pencil"></b-icon>
1922
</a>

0 commit comments

Comments
 (0)