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

Commit 331a3d7

Browse files
authored
feat(gists): integration (#28)
Closes #19
1 parent b497293 commit 331a3d7

28 files changed

+930
-249
lines changed

package-lock.json

Lines changed: 66 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
}
6161
},
6262
"dependencies": {
63+
"@octokit/rest": "^14.0.8",
6364
"axios": "^0.16.1",
6465
"brace": "^0.11.0",
6566
"buefy": "^0.6.2",

src/renderer/Navbar.vue

Lines changed: 63 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22
<nav>
33
<img class="logo" src="~@/assets/img/code-notes-logo-white-full.png" alt="Code Notes logo">
44
<div class="is-pulled-right">
5-
<a id="about-code-notes" @click="aboutBlocCodesModal = true" title="About Code Notes...">
5+
<a id="help" @click="helpTokenModalActive = true" title="Help">
6+
<b-icon icon="question-circle"></b-icon>
7+
</a>
8+
9+
<a id="about-code-notes" @click="aboutCodeNotesModalActive = true" title="About Code Notes...">
610
<b-icon icon="info-circle"></b-icon>
711
</a>
812
<a id="github" @click="open('https://github.com/lauthieb/code-notes')" title="Show on Github...">
913
<b-icon icon="github"></b-icon>
1014
</a>
1115
</div>
1216

13-
<b-modal :active.sync="aboutBlocCodesModal" :width="580" scroll="keep">
17+
<b-modal :active.sync="aboutCodeNotesModalActive" :width="580" scroll="keep">
1418
<div class="card">
1519
<div class="card-content">
1620
<div class="media">
@@ -24,72 +28,81 @@
2428
<p>A simple code snippet manager for developers built with Electron & Vue.js 🚀</p>
2529

2630
<p>Feel free to contribute on <a @click="open('https://github.com/lauthieb/code-notes')">Github</a> 🍻</p>
27-
28-
<img class="badge" src="http://forthebadge.com/images/badges/built-with-love.svg" alt="Built with love">
2931
</div>
3032
</div>
3133
</div>
3234
</b-modal>
35+
36+
37+
<b-modal :active.sync="helpTokenModalActive" has-modal-card>
38+
<cn-help-token-modal></cn-help-token-modal>
39+
</b-modal>
3340
</nav>
3441
</template>
3542

3643
<script>
37-
// eslint-disable-next-line
38-
import { remote } from 'electron';
44+
// eslint-disable-next-line
45+
import {remote} from 'electron';
46+
import HelpTokenModal from './components/modals/help-token-modal/HelpTokenModal';
3947
40-
export default {
41-
name: 'cn-navbar',
42-
data() {
43-
return {
44-
appVersion: remote.app.getVersion(),
45-
aboutBlocCodesModal: false,
46-
};
47-
},
48-
methods: {
49-
open(link) {
50-
this.$electron.shell.openExternal(link);
48+
export default {
49+
name: 'cn-navbar',
50+
components: {
51+
'cn-help-token-modal': HelpTokenModal,
52+
},
53+
data() {
54+
return {
55+
appVersion: remote.app.getVersion(),
56+
aboutCodeNotesModalActive: false,
57+
helpTokenModalActive: false,
58+
};
5159
},
52-
},
53-
};
60+
methods: {
61+
open(link) {
62+
this.$electron.shell.openExternal(link);
63+
},
64+
},
65+
};
5466
</script>
5567

5668
<style lang="scss" scoped>
57-
nav {
58-
-webkit-app-region: drag;
59-
background-color: $primary;
60-
text-align: center;
61-
position: fixed;
62-
top: 0;
63-
width: 100%;
64-
z-index: 1000;
65-
66-
.logo {
67-
padding: 10px 10px 4px 10px;
68-
width: 110px;
69-
position: relative;
70-
left: 4%;
71-
}
69+
nav {
70+
-webkit-app-region: drag;
71+
background-color: $primary;
72+
text-align: center;
73+
position: fixed;
74+
top: 0;
75+
width: 100%;
76+
z-index: 1000;
7277
73-
#about-code-notes,
74-
#github {
75-
color: $light;
76-
position: relative;
77-
top: 20px;
78-
right: 20px;
79-
}
80-
81-
.modal {
82-
.media-content {
83-
text-align: center;
78+
.logo {
79+
padding: 10px 10px 4px 10px;
80+
width: 110px;
81+
position: relative;
82+
left: 4%;
8483
}
8584
86-
img {
87-
width: 250px;
85+
#about-code-notes,
86+
#github,
87+
#help {
88+
color: $light;
89+
position: relative;
90+
top: 20px;
91+
right: 20px;
8892
}
8993
90-
.badge {
91-
width: 160px;
94+
.modal {
95+
.media-content {
96+
text-align: center;
97+
}
98+
99+
img {
100+
width: 250px;
101+
}
102+
103+
.badge {
104+
width: 160px;
105+
}
92106
}
93107
}
94-
}
95108
</style>

0 commit comments

Comments
 (0)