Skip to content

Commit

Permalink
Add build configuration and fix minor UI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
suyashmahar committed Aug 25, 2020
1 parent e206b56 commit 27e54b7
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
build/
3 changes: 2 additions & 1 deletion src/css/newserver.css
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ body {
}

.descriptive-option {
opacity: 0.8;
/* opacity: 0.8; */
padding-top: 2%;
padding-bottom: 2%;
padding-left: 5%;
height: 20%;
}

Expand Down
22 changes: 12 additions & 10 deletions src/js/welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,23 @@ document.getElementById('helpKeyboardShortcuts').addEventListener('click', () =>

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

// on receive todos
ipcRenderer.on('todos', (event, todos) => {
// get the todoList ul
const todoList = document.getElementById('todoList')
ipcRenderer.on('todos', (event, recentItemsList) => {
const recentUrlElem = document.getElementById('todoList');

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

return html
return html;
}, '')

if (!recentUrlHtml) {
recentUrlHtml = "No recent items";
}

// set list html to the todo items
todoList.innerHTML = todoItems
recentUrlElem.innerHTML = recentUrlHtml;

// Add click handlers to the link
todoList.querySelectorAll('.recent-item-link').forEach(item => {
Expand Down
8 changes: 6 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ function main () {
file: path.join('renderer', 'welcome.html')
})

// Hide menu bars
mainWindow.setMenu(null)
mainWindow.setAutoHideMenuBar(true)

// add todo window
let addTodoWin
let newJupyterWin
Expand Down Expand Up @@ -156,8 +160,8 @@ function main () {
})

// Disable menu bar
// newServerDialog.setMenu(null)
// newServerDialog.setAutoHideMenuBar(true)
newServerDialog.setMenu(null)
newServerDialog.setAutoHideMenuBar(true)

// cleanup
newServerDialog.on('closed', () => {
Expand Down
5 changes: 4 additions & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"JupyterLab",
"Jupyter"
],
"license": "AGPLv3",
"license": "AGPL-3.0-or-later",
"devDependencies": {
"devtron": "^1.4.0",
"electron": "^3.0.4",
Expand All @@ -27,6 +27,9 @@
"spectre.css": "^0.5.3"
},
"build": {
"directories": {
"output": "../build/"
},
"appId": "com.suyashmahar.europa",
"mac": {
"category": "Utilities"
Expand Down
13 changes: 1 addition & 12 deletions src/renderer/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,13 @@
<h1>Europa</h1>
<h3>Jupyter Lab's Moon</h3>

<!-- <div class="main-section">
<h4 class="section-header">Start</h4>
<ul class="compact-list">
<li class="compact-list-item"><a id="newServerBtn" href="javascript:void">New Jupyter server</a></li>
<li class="compact-list-item"><a id="openUrlBtn" href="javascript:void">Open url...</a></li>
</ul>
</div> -->

<div class="container transparent-main-section">
<div class="row">
<div class="col-xs-2 large-btn text-primary" id="newServerBtn">
<i class="fas fa-server large-btn-icon fa-fw"></i>
<div class="large-btn-txt">New server</div>
</div>
<div class="col-xs-2 large-btn text-primary">
<i class="fas fa-network-wired large-btn-icon fa-fw"></i>
<div class="large-btn-txt">New remote<br>server</div>
</div>

<div class="col-xs-2 large-btn text-primary" id="openUrlBtn">
<i class="fas fa-link large-btn-icon fa-fw"></i>
<div class="large-btn-txt">Open URL</div>
Expand Down

0 comments on commit 27e54b7

Please sign in to comment.