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

Commit

Permalink
Version 0.0.32
Browse files Browse the repository at this point in the history
  • Loading branch information
THPubs committed Sep 1, 2018
1 parent 9ae6769 commit 3897c2c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 62 deletions.
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "FontLet",
"description": "A package manager for fonts bringing latest and greatest libre fonts to your desktop ",
"version": "0.0.20",
"version": "0.0.23",
"author": "Friends of Akuru <[email protected]>",
"license": "MIT",
"homepage": "./",
Expand Down Expand Up @@ -74,6 +74,12 @@
"publish": {
"provider": "github"
},
"mac": {
"target": [
"zip",
"dmg"
]
},
"win": {
"target": [
"nsis",
Expand Down
60 changes: 0 additions & 60 deletions public/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const electron = require('electron');
const openAboutWindow = require('about-window').default;
const path = require('path');
const isDev = require('electron-is-dev');
const notifier = require('node-notifier');
const { autoUpdater } = require('electron-updater');

require('update-electron-app')();
Expand All @@ -15,25 +14,6 @@ autoUpdater.logger = require('electron-log');

autoUpdater.logger.transports.file.level = 'info';

autoUpdater.on('checking-for-update', () => {
console.log('Checking for update...');
});
autoUpdater.on('update-available', info => {
console.log('Update available.', info);
});
autoUpdater.on('update-not-available', info => {
console.log('Update not available.', info);
});
autoUpdater.on('error', err => {
console.log(`Error in auto-updater. ${err}`);
});
autoUpdater.on('download-progress', progressObj => {
console.log('downloading....................');
});
autoUpdater.on('update-downloaded', info => {
console.log('Update downloaded', info);
});

function createWindow() {
mainWindow = new BrowserWindow({
width: 900,
Expand All @@ -49,47 +29,7 @@ function createWindow() {
});
// initAutoUpdate();
autoUpdater.checkForUpdatesAndNotify();
autoUpdater.checkForUpdates();
// Open the DevTools.
mainWindow.webContents.openDevTools();
}

function initAutoUpdate() {
if (isDev) {
return;
}

if (process.platform === 'linux') {
return;
}

autoUpdater.checkForUpdates();
autoUpdater.signals.updateDownloaded(showUpdateNotification);
}

function showUpdateNotification(update) {
const updateInfo = update || {};
const restartNowAction = 'Restart now';

const versionLabel = updateInfo.label ? `Version ${updateInfo.version}` : 'The latest version';

notifier.notify(
{
title: 'A new update is ready to install.',
message:
`${versionLabel}` +
'has been downloaded and will be automatically installed after restart.',
closeLabel: 'Okay',
actions: restartNowAction
},
(err, response, metadata) => {
if (err) throw err;
if (metadata.activationValue !== restartNowAction) {
return;
}
autoUpdater.quitAndInstall();
}
);
}

app.on('ready', createWindow);
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class Welcome extends Component {
)}

<Content>
<MainTitle>Welcome to FontLet App</MainTitle>
<MainTitle>Welcome to FontLet</MainTitle>
<ReactSVG
src={fontletLogo}
evalScripts="once"
Expand Down

0 comments on commit 3897c2c

Please sign in to comment.