Skip to content

Commit b34feeb

Browse files
committed
Merge pull request #41 from gitpie/HOT-FIX-CONFIG
Hot fix config
2 parents 90f0f32 + a51b68d commit b34feeb

File tree

7 files changed

+52
-5
lines changed

7 files changed

+52
-5
lines changed

app/core/git.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ Git.prototype.alterGitConfig = function (path, opts) {
741741
concatConfig('merge.tool', opts.mergeTool);
742742

743743
if (wos.isWindows()) {
744-
concatConfig(`mergetool.${opts.mergeTool}.cmd`, `'${opts.mergeTool}.exe $PWD/$LOCAL $PDW/$MERGED $PWD/$REMOTE'`);
744+
concatConfig(`mergetool.${opts.mergeTool}.cmd`, `\"${opts.mergeTool}.exe $PWD/$LOCAL $PDW/$MERGED $PWD/$REMOTE\"`);
745745
concatConfig(`mergetool.${opts.mergeTool}.trustExitCode`, 'true');
746746
} else {
747747
concatConfig(`mergetool.${opts.mergeTool}.cmd`, `'${opts.mergeTool} "$LOCAL" "$MERGED" "$REMOTE"'`);

app/frontend/global/notification.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class GPNotification {
2121
this.showLoad = opts.showLoad;
2222
this.notificationElement = null;
2323
this.autoclose = opts.autoclose;
24+
this.closable = opts.closable;
2425
}
2526

2627
pop() {
@@ -56,6 +57,19 @@ class GPNotification {
5657
}
5758

5859
this.notificationElement.innerHTML += `<section class="content">${bodyText || titleText}</section>`;
60+
61+
if (this.closable) {
62+
let closeBtn = document.createElement('button');
63+
64+
closeBtn.className = 'close-button';
65+
closeBtn.title = MSGS.Close;
66+
closeBtn.innerHTML = '<span class="octicon octicon-x"></span>';
67+
closeBtn.onclick = function () {
68+
this.close();
69+
}.bind(this);
70+
71+
this.notificationElement.appendChild(closeBtn);
72+
}
5973

6074
container.appendChild(this.notificationElement);
6175

app/frontend/modules/settings-page.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
(function () {
24

35
angular.module('settings', []).directive('settingsPage', function () {
@@ -24,6 +26,8 @@
2426
{ code: 'en', description: 'English'},
2527
{ code: 'pt-BR', description: 'Portuguese (Brazil)'}
2628
];
29+
30+
this.appVersion = require('./package').version;
2731

2832
this.hideSettingsPage = function () {
2933
this.showSettingsPage = false;
@@ -36,9 +40,9 @@
3640

3741
this.getGlobalGitConfigs = function () {
3842
GIT.getGlobalConfigs(function (err, configs) {
39-
43+
4044
if (err) {
41-
alert(err.message);
45+
new GPNotification(MSGS['It seems that a git username and email are not set globally. You can fix this accessing the Settings menu'], { closable: true }).pop();
4246
} else {
4347
this.globalGitConfigs = configs;
4448
}

app/frontend/view/content/settings-page.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@
140140
<li>{{ MSGS.SettingsPage["GitPie is an open source git client that have the goal to be the most simple and nice client for any project and for any people"] }}</li>
141141
</ul>
142142
</li>
143+
144+
<li>
145+
<div class="label">{{ MSGS.SettingsPage.Version }}</div>
146+
<ul>
147+
<li>{{ settingsCtrl.appVersion }}</li>
148+
</ul>
149+
</li>
143150

144151
<li>
145152
<div class="label">{{ MSGS.SettingsPage.License }}</div>

language/en.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@
9898
"It happends with me all the time too. But lets's try find your project again!": "It happends with me all the time too. But let's try find your project again!",
9999
"Start adding, clonning or creating some awesome things": "Start adding, clonning or creating some awesome things",
100100
"Nothing for me here.\n The folder {folder} is not a git project": "Nothing for me here.\n The folder {folder} is not a git project",
101+
"Close": "Close",
102+
"It seems that a git username and email are not set globally. You can fix this accessing the Settings menu": "It seems that a git username and email are not set globally. You can fix this accessing the Settings menu",
101103

102104
"Error counting commits. Error: ": "Error counting commits. Error: ",
103105
"Error adding files. Error:": "Error adding files. Error:",
@@ -143,7 +145,8 @@
143145
"Navigate between repositories top to bottom": "Navigate between repositories top to bottom",
144146
"Navigate between repositories bottom to top": "Navigate between repositories bottom to top",
145147
"Add focus on the \"Search repositories\" field": "Add focus on the \"Search repositories\" field",
146-
"Close modal windows and header menus": "Close modal windows and header menus"
148+
"Close modal windows and header menus": "Close modal windows and header menus",
149+
"Version": "Version"
147150
},
148151

149152
"Authentication required": "Authentication required",

language/pt-BR.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@
9898
"It happends with me all the time too. But lets's try find your project again!": "Isso acontece comigo o tempo todo. Mas vamos tentar achar o seu projeto de novo!",
9999
"Start adding, clonning or creating some awesome things": "Comece adicionando, clonando ou criando coisas incríveis",
100100
"Nothing for me here.\n The folder {folder} is not a git project": "Nada pra mim aqui.\n A pasta {folder} não é um projeto git",
101+
"Close": "Fechar",
102+
"It seems that a git username and email are not set globally. You can fix this accessing the Settings menu": "Parece que um usuário e email git não estão definidos globalmente. Você pode corrigir isso acessando o menu de Configurações",
101103

102104
"Error counting commits. Error: ": "Erro contando commits. Erro: ",
103105
"Error adding files. Error:": "Erro adicionando arquivos. Erro:",
@@ -143,7 +145,8 @@
143145
"Navigate between repositories top to bottom": "Navega entre os repositórios de cima para baixo",
144146
"Navigate between repositories bottom to top": "Navega entre os repositórios de baixo para cima",
145147
"Add focus on the \"Search repositories\" field": "Adiciona foco no campo \"Procurar repositórios\"",
146-
"Close modal windows and header menus": "Fecha janelas modais e menus de cabeçalho"
148+
"Close modal windows and header menus": "Fecha janelas modais e menus de cabeçalho",
149+
"Version": "Versão"
147150
},
148151

149152
"Authentication required": "Autenticação requerida",

resources/sass/all.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,22 @@ body {
579579
.content {
580580
flex: 1 1 auto;
581581
}
582+
583+
.close-button {
584+
padding: 0;
585+
padding-left: 20px;
586+
padding-right: 10px;
587+
color: #FFF;
588+
background-color: #404040;
589+
border: 0;
590+
box-shadow: none;
591+
cursor: pointer;
592+
transition: color ease 0.2s;
593+
594+
&:hover {
595+
color: rgba(255, 255, 255, 0.7);
596+
}
597+
}
582598
}
583599

584600
/* Header of the application */

0 commit comments

Comments
 (0)