Skip to content

Commit 27e54b7

Browse files
committed
Add build configuration and fix minor UI issues
1 parent e206b56 commit 27e54b7

File tree

6 files changed

+26
-26
lines changed

6 files changed

+26
-26
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
build/

src/css/newserver.css

+2-1
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,10 @@ body {
128128
}
129129

130130
.descriptive-option {
131-
opacity: 0.8;
131+
/* opacity: 0.8; */
132132
padding-top: 2%;
133133
padding-bottom: 2%;
134+
padding-left: 5%;
134135
height: 20%;
135136
}
136137

src/js/welcome.js

+12-10
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,23 @@ document.getElementById('helpKeyboardShortcuts').addEventListener('click', () =>
3838

3939
https://github.com/suyashmahar/jupytron/wiki
4040

41-
// on receive todos
42-
ipcRenderer.on('todos', (event, todos) => {
43-
// get the todoList ul
44-
const todoList = document.getElementById('todoList')
41+
ipcRenderer.on('todos', (event, recentItemsList) => {
42+
const recentUrlElem = document.getElementById('todoList');
4543

46-
// create html string
47-
const todoItems = todos.reduce((html, todo) => {
48-
var itemDeleteBtnHtml = `<a id="${todo}" href="javascript:void" class="inline-btn-link-delete">✕</a>`
49-
html += `<li class="recent-item"><a class="recent-item-link" href="javascript:void" id="${todo}">${todo}</a>${itemDeleteBtnHtml}</li>`
44+
// create an html string
45+
var recentUrlHtml = recentItemsList.reduce((html, item) => {
46+
var itemDeleteBtnHtml = `<a id="${item}" href="javascript:void" class="inline-btn-link-delete">✕</a>`
47+
html += `<li class="recent-item"><a class="recent-item-link" href="javascript:void" id="${item}">${item}</a>${itemDeleteBtnHtml}</li>`
5048

51-
return html
49+
return html;
5250
}, '')
5351

52+
if (!recentUrlHtml) {
53+
recentUrlHtml = "No recent items";
54+
}
55+
5456
// set list html to the todo items
55-
todoList.innerHTML = todoItems
57+
recentUrlElem.innerHTML = recentUrlHtml;
5658

5759
// Add click handlers to the link
5860
todoList.querySelectorAll('.recent-item-link').forEach(item => {

src/main.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ function main () {
8787
file: path.join('renderer', 'welcome.html')
8888
})
8989

90+
// Hide menu bars
91+
mainWindow.setMenu(null)
92+
mainWindow.setAutoHideMenuBar(true)
93+
9094
// add todo window
9195
let addTodoWin
9296
let newJupyterWin
@@ -156,8 +160,8 @@ function main () {
156160
})
157161

158162
// Disable menu bar
159-
// newServerDialog.setMenu(null)
160-
// newServerDialog.setAutoHideMenuBar(true)
163+
newServerDialog.setMenu(null)
164+
newServerDialog.setAutoHideMenuBar(true)
161165

162166
// cleanup
163167
newServerDialog.on('closed', () => {

src/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"JupyterLab",
1414
"Jupyter"
1515
],
16-
"license": "AGPLv3",
16+
"license": "AGPL-3.0-or-later",
1717
"devDependencies": {
1818
"devtron": "^1.4.0",
1919
"electron": "^3.0.4",
@@ -27,6 +27,9 @@
2727
"spectre.css": "^0.5.3"
2828
},
2929
"build": {
30+
"directories": {
31+
"output": "../build/"
32+
},
3033
"appId": "com.suyashmahar.europa",
3134
"mac": {
3235
"category": "Utilities"

src/renderer/welcome.html

+1-12
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,13 @@
1414
<h1>Europa</h1>
1515
<h3>Jupyter Lab's Moon</h3>
1616

17-
<!-- <div class="main-section">
18-
<h4 class="section-header">Start</h4>
19-
<ul class="compact-list">
20-
<li class="compact-list-item"><a id="newServerBtn" href="javascript:void">New Jupyter server</a></li>
21-
<li class="compact-list-item"><a id="openUrlBtn" href="javascript:void">Open url...</a></li>
22-
</ul>
23-
</div> -->
24-
2517
<div class="container transparent-main-section">
2618
<div class="row">
2719
<div class="col-xs-2 large-btn text-primary" id="newServerBtn">
2820
<i class="fas fa-server large-btn-icon fa-fw"></i>
2921
<div class="large-btn-txt">New server</div>
3022
</div>
31-
<div class="col-xs-2 large-btn text-primary">
32-
<i class="fas fa-network-wired large-btn-icon fa-fw"></i>
33-
<div class="large-btn-txt">New remote<br>server</div>
34-
</div>
23+
3524
<div class="col-xs-2 large-btn text-primary" id="openUrlBtn">
3625
<i class="fas fa-link large-btn-icon fa-fw"></i>
3726
<div class="large-btn-txt">Open URL</div>

0 commit comments

Comments
 (0)