Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Commit

Permalink
Remove loader text
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanbirrell committed Mar 27, 2017
1 parent be26bfe commit 2462246
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 5 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ const config = new Config()
const path = require('path')
const url = require('url')

const defaultUrl = 'https://www.trello.com/'

let currentUri = config.get('currentUri')

// Set current URL as default if not set
if (!currentUri || currentUri === '') {
currentUri = 'https://www.trello.com/'
currentUri = defaultUrl;
config.set('currentUri', currentUri)
}

Expand All @@ -30,6 +32,7 @@ function createWindow () {
transparent: false,
frame: true
}

Object.assign(options, config.get('winBounds'))

// Create the browser window.
Expand All @@ -43,7 +46,7 @@ function createWindow () {
}))

// Open the DevTools.
mainWindow.webContents.openDevTools()
// mainWindow.webContents.openDevTools()

// Emitted when the window is closed.
mainWindow.on('close', function () {
Expand All @@ -63,7 +66,6 @@ exports.getCurrentUri = () => {
return currentUri;
};
exports.setCurrentUri = function(uri) {
console.log('setCurrentUri= ' + uri);
currentUri = uri;
}

Expand Down
7 changes: 4 additions & 3 deletions renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ let loadedCurrent = false;

onload = () => {
const loadstart = () => {
indicator.innerText = 'loading...'
console.log(getCurrentUri())
// TODO: do something with loader..
// indicator.innerText = 'loading...'
if (!loadedCurrent) {
webview.loadURL(getCurrentUri())
}
loadedCurrent = true;
}

const loadstop = () => {
indicator.innerText = ''
// TODO: do something with loader..
// indicator.innerText = ''
}

webview.addEventListener('did-start-loading', loadstart)
Expand Down

0 comments on commit 2462246

Please sign in to comment.