Skip to content

Commit 1aa97ba

Browse files
committed
⬆️ 0.0.9 and some UI improvement
1 parent 2671627 commit 1aa97ba

13 files changed

+39
-33
lines changed

app/css/index.css

+6-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ body{
2222
.top-margin{
2323
margin-top: 30px;
2424
}
25+
.btn-dark{
26+
background-color: transparent;
27+
border:1px solid rgb(61, 61, 61);
28+
color: rgb(100, 100, 100);
29+
}
2530
/**
2631
* Sidebar stuff
2732
*/
@@ -57,7 +62,7 @@ body{
5762
text-align: center;
5863
width: 100px;
5964
}
60-
#toggle-mode{
65+
#sidebar .mode button{
6166
cursor: default;
6267
}
6368
#sidebar span[data-string]{

app/index.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<!-- Sidebar -->
2020
<div id="sidebar">
2121
<!-- Menu -->
22-
<ul>
22+
<ul style="margin-top:25px;">
2323
<li data-event="sidebar-run"><span class="glyphicon glyphicon-play" aria-hidden="true"></span> <span data-string="Run code"></span> <span id="run-version"></span></li>
2424
<li data-event="sidebar-clear"><span class="glyphicon glyphicon-erase" aria-hidden="true"></span> <span data-string="Clear"></span></li>
2525
<li data-event="sidebar-import"><span class="glyphicon glyphicon-open-file" aria-hidden="true"></span> <span data-string="Import from file"></span></li>
@@ -29,7 +29,12 @@
2929
<li data-event="sidebar-about" data-toggle="modal" data-target="#about"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span> <span data-string="About"></span></li>
3030
</ul>
3131
<!-- Toggle mode -->
32-
<div class="mode"><button id="toggle-mode" class="btn btn-default btn-xs btn-primary" data-string="RAW mode"></button></div>
32+
<div class="mode text-center">
33+
<div class="btn-group btn-group-xs">
34+
<button class="toggle-mode-raw btn btn-primary">RAW</button>
35+
<button class="toggle-mode-html btn btn-dark">HTML</button>
36+
</div>
37+
</div>
3338
</div>
3439
<div id="content">
3540
<div id="editor"></div>

app/js/main.functions.js

+14-9
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,21 @@ function preventLinkDefault() {
2121
*/
2222

2323
/* Toggle RAW and HTML modes */
24-
function toggleMode() {
25-
const btn = $('#toggle-mode');
26-
btn.toggleClass('btn-primary btn-success');
27-
if (mode === 'raw') {
28-
btn.html(i18n.__('HTML mode'));
29-
mode = 'html';
24+
function toggleMode(switchMode) {
25+
if (switchMode === 'html') {
26+
// Swap classes
27+
$('.toggle-mode-html').addClass('btn-primary').removeClass('btn-dark');
28+
$('.toggle-mode-raw').addClass('btn-dark').removeClass('btn-primary');
29+
30+
// Swap consoles
3031
$('#console').css('display', 'none');
3132
$('#console-html').css('display', 'block');
3233
} else {
33-
btn.html(i18n.__('RAW mode'));
34-
mode = 'raw';
34+
// Swap classes
35+
$('.toggle-mode-html').addClass('btn-dark').removeClass('btn-primary');
36+
$('.toggle-mode-raw').addClass('btn-primary').removeClass('btn-dark');
37+
38+
// Swap consoles
3539
$('#console').css('display', 'block');
3640
$('#console-html').css('display', 'none');
3741
}
@@ -256,7 +260,8 @@ function renderApp(refresh) {
256260
$('*[data-event="sidebar-import"]').click(importFromFile);
257261

258262
// "Toggle mode" button click
259-
$('#toggle-mode').click(toggleMode);
263+
$('.toggle-mode-raw').click(() => toggleMode('raw'));
264+
$('.toggle-mode-html').click(() => toggleMode('html'));
260265

261266
// Presentation mode
262267
$('*[data-event="sidebar-fullscreen"]').click(toggleFullscreen);

app/locales/da.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
"Clear": "Ryd",
44
"Settings": "Indstillinger",
55
"About": "Om",
6-
"RAW mode": "RAW mode",
7-
"HTML mode": "HTML mode",
86
"Save": "Gem",
97
"Cancel": "Annuller",
108
"General": "General",
@@ -88,4 +86,4 @@
8886
"Be careful! This is not a sandbox. The indiscriminate use of some functions may damage the system.": "Be careful! This is not a sandbox. The indiscriminate use of some functions may damage the system.",
8987
"None": "None",
9088
"Add binary": "Add binary"
91-
}
89+
}

app/locales/de.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
"Clear": "Leeren",
44
"Settings": "Einstellungen",
55
"About": "Über",
6-
"RAW mode": "RAW Modus",
7-
"HTML mode": "HTML Modus",
86
"Save": "Speichern",
97
"Cancel": "Abbrechen",
108
"General": "Allgemein",
@@ -88,4 +86,4 @@
8886
"Be careful! This is not a sandbox. The indiscriminate use of some functions may damage the system.": "Be careful! This is not a sandbox. The indiscriminate use of some functions may damage the system.",
8987
"None": "None",
9088
"Add binary": "Add binary"
91-
}
89+
}

app/locales/en.json

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
"Clear": "Clear",
44
"Settings": "Settings",
55
"About": "About",
6-
"RAW mode": "RAW mode",
7-
"HTML mode": "HTML mode",
86
"Save": "Save",
97
"Cancel": "Cancel",
108
"General": "General",

app/locales/fr.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
"Clear": "Effacer",
44
"Settings": "Réglages",
55
"About": "À propos",
6-
"RAW mode": "Mode RAW",
7-
"HTML mode": "Mode HTML",
86
"Save": "Sauvegarder",
97
"Cancel": "Annuler",
108
"General": "Général",
@@ -88,4 +86,4 @@
8886
"Be careful! This is not a sandbox. The indiscriminate use of some functions may damage the system.": "Be careful! This is not a sandbox. The indiscriminate use of some functions may damage the system.",
8987
"None": "None",
9088
"Add binary": "Add binary"
91-
}
89+
}

app/locales/pt-BR.json

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
"Clear": "Limpar",
44
"Settings": "Configurações",
55
"About": "Sobre",
6-
"RAW mode": "Modo RAW",
7-
"HTML mode": "Modo HTML",
86
"Save": "Salvar",
97
"Cancel": "Cancelar",
108
"General": "Geral",

app/main.js

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ app.on('ready', () => {
5858
height: 700,
5959
width: 900,
6060
center: true,
61+
titleBarStyle: 'hidden',
6162
icon: Path.join(__dirname, 'gfx', 'app-icon.png'),
6263
skipTaskbar: conf.get('general.mode') === 'tray',
6364
});

app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "phpassistant",
33
"productName": "PHP Assistant",
4-
"version": "0.0.8",
4+
"version": "0.0.9",
55
"main": "main.js",
66
"description": "A cross-platform desktop PHP runner",
77
"author": "Rafael Jaques <[email protected]>",

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ deploy:
4646
subject: rafajaques
4747
repo: windows
4848
package: "php-assistant"
49-
version: 0.0.8
49+
version: 0.0.9
5050
publish: true
5151
override: true
5252
explode: true

deploy/descriptor-linux.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
},
1717

1818
"version": {
19-
"name": "0.0.8",
19+
"name": "0.0.9",
2020
"desc": "Minor release",
21-
"released": "2016-06-02",
22-
"vcs_tag": "0.0.8",
21+
"released": "2016-06-06",
22+
"vcs_tag": "0.0.9",
2323
"gpgSign": false
2424
},
2525

deploy/descriptor-osx.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
},
1717

1818
"version": {
19-
"name": "0.0.8",
19+
"name": "0.0.9",
2020
"desc": "Minor release",
21-
"released": "2016-06-02",
22-
"vcs_tag": "0.0.8",
21+
"released": "2016-06-06",
22+
"vcs_tag": "0.0.9",
2323
"gpgSign": false
2424
},
2525

0 commit comments

Comments
 (0)