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

Commit 64da6cc

Browse files
committed
feat(navbar): Add dialog with presentation of the app
1 parent dcffbe2 commit 64da6cc

File tree

5 files changed

+63
-3
lines changed

5 files changed

+63
-3
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"postinstall": "npm run eslint:fix && npm run prettier"
2424
},
2525
"build": {
26-
"productName": "bloc-codes",
27-
"appId": "org.simulatedgreg.electron-vue",
26+
"productName": "Bloc Codes",
27+
"appId": "fr.lauthieb.bloc-codes",
2828
"directories": {
2929
"output": "build"
3030
},

src/renderer/Navbar.vue

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,49 @@
11
<template>
22
<nav>
33
<img src="~@/assets/bloc-codes-logo-white-full.png" alt="Bloc-codes logo">
4+
<div class="is-pulled-right">
5+
<a id="about-bloc-codes" @click="aboutBlocCodesModal = true" title="About Bloc Codes...">
6+
<b-icon icon="info-circle"></b-icon>
7+
</a>
8+
<a id="github" @click="open('https://github.com/lauthieb/bloc-codes')" title="Show on Github...">
9+
<b-icon icon="github"></b-icon>
10+
</a>
11+
</div>
12+
13+
<b-modal :active.sync="aboutBlocCodesModal" :width="580" scroll="keep">
14+
<div class="card">
15+
<div class="card-content">
16+
<div class="media">
17+
<div class="media-content">
18+
<img src="~@/assets/bloc-codes-logo-black-full.png" alt="Image">
19+
</div>
20+
</div>
21+
<div class="content">
22+
<h4>v{{appVersion}}</h4>
23+
24+
<p>A simple code snippet manager for developers built with Electron & Vue.js 🚀</p>
25+
26+
<p>Feel free to contribute on <a @click="open('https://github.com/lauthieb/bloc-codes')">Github</a> 🍻</p>
27+
28+
<img class="badge" src="http://forthebadge.com/images/badges/built-with-love.svg" alt="Built with love">
29+
</div>
30+
</div>
31+
</div>
32+
</b-modal>
433
</nav>
534
</template>
635

736
<script>
37+
// eslint-disable-next-line
38+
import { remote } from 'electron';
39+
840
export default {
941
name: 'cb-navbar',
1042
data() {
11-
return {}
43+
return {
44+
appVersion: remote.app.getVersion(),
45+
aboutBlocCodesModal: false
46+
}
1247
},
1348
methods: {
1449
open(link) {
@@ -32,5 +67,27 @@
3267
padding: 10px 10px 4px 10px;
3368
width: 110px;
3469
}
70+
71+
#about-bloc-codes, #github {
72+
color: $light;
73+
position: relative;
74+
top: 20px;
75+
right: 20px;
76+
}
77+
78+
.modal {
79+
80+
.media-content {
81+
text-align: center;
82+
}
83+
84+
img {
85+
width: 250px;
86+
}
87+
88+
.badge {
89+
width: 160px;
90+
}
91+
}
3592
}
3693
</style>

src/renderer/components/SnippetsList/CreateSnippetModal.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
'python',
100100
'ruby',
101101
'scss',
102+
'sh',
102103
'swift',
103104
'typescript',
104105
'xml'

src/renderer/components/SnippetsList/UpdateSnippetModal.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
'python',
104104
'ruby',
105105
'scss',
106+
'sh',
106107
'swift',
107108
'typescript',
108109
'xml'

src/renderer/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ require('brace/mode/php');
3232
require('brace/mode/python');
3333
require('brace/mode/ruby');
3434
require('brace/mode/scss');
35+
require('brace/mode/sh');
3536
require('brace/mode/swift');
3637
require('brace/mode/typescript');
3738
require('brace/mode/xml');

0 commit comments

Comments
 (0)