Changes of Linux canary v0.0.69

This commit is contained in:
root 2019-01-30 03:57:05 +01:00
parent e1ff2e2d4e
commit f77ae11327
3 changed files with 50 additions and 14 deletions

View file

@ -1,15 +1,14 @@
[
"Leeeeeeroy jenkins!",
"Readying the felines.",
"Ensuring dankest memes.",
"Recruiting robot hamsters.",
"Getting dunked.",
"Summoning unnecessarily dramatic encounters.",
"Procedurally generating buttons.",
"Preparing for a team fight.",
"Buffing before the raid.",
"Top decking lethal.",
"Reloading the R8.",
"Constructing additional pylons.",
"Unbenching the Kench."
"Upsorbing the Contents",
"Additive Parsing the Load",
"Commence Monosaturated Goodening",
"Kick Off the Multi-Core Widening",
"Bastening the Game Turkey",
"Abstracting the Rummage Disc",
"Undecerealenizing the Process",
"Postrefragmenting the Widget Layer",
"Satisfying the Constraints",
"Abnoramalzing Some of the Matrices",
"Optimizing the People",
"Proclaigerizing the Network"
]

View file

@ -22554,6 +22554,9 @@ const Splash = _react2.default.createClass({
ipcRenderer.on('SPLASH_UPDATE_STATE', (_e, state) => {
this.setState({ update: state });
});
ipcRenderer.on('SPLASH_SCREEN_QUOTE', (_e, quote) => {
this.setState({ quote });
});
ipcRenderer.send('SPLASH_SCREEN_READY');
},
@ -25703,7 +25706,7 @@ module.exports = require("electron");
/* 199 */
/***/ (function(module, exports) {
module.exports = ["Leeeeeeroy jenkins!","Readying the felines.","Ensuring dankest memes.","Recruiting robot hamsters.","Getting dunked.","Summoning unnecessarily dramatic encounters.","Procedurally generating buttons.","Preparing for a team fight.","Buffing before the raid.","Top decking lethal.","Reloading the R8.","Constructing additional pylons.","Unbenching the Kench."]
module.exports = ["Upsorbing the Contents","Additive Parsing the Load","Commence Monosaturated Goodening","Kick Off the Multi-Core Widening","Bastening the Game Turkey","Abstracting the Rummage Disc","Undecerealenizing the Process","Postrefragmenting the Widget Layer","Satisfying the Constraints","Abnoramalzing Some of the Matrices","Optimizing the People","Proclaigerizing the Network"]
/***/ }),
/* 200 */

View file

@ -31,6 +31,14 @@ var _ipcMain = require('./ipcMain');
var _ipcMain2 = _interopRequireDefault(_ipcMain);
var _paths = require('../common/paths');
var paths = _interopRequireWildcard(_paths);
var _fs = require('fs');
var _fs2 = _interopRequireDefault(_fs);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@ -77,6 +85,7 @@ let updateTimeout;
let updateAttempt;
let splashState;
let launchedMainWindow;
let quoteCachePath;
function initSplash(startMinimized = false) {
modulesListeners = {};
@ -144,6 +153,9 @@ function initSplash(startMinimized = false) {
});
launchSplashWindow(startMinimized);
quoteCachePath = _path2.default.join(paths.getUserData(), 'quotes.json');
_ipcMain2.default.on('UPDATED_QUOTES', (_event, quotes) => cacheLatestQuotes(quotes));
}
function destroySplash() {
@ -228,6 +240,11 @@ function launchSplashWindow(startMinimized) {
}
_ipcMain2.default.on('SPLASH_SCREEN_READY', () => {
let cachedQuote = chooseCachedQuote();
if (cachedQuote) {
webContentsSend(splashWindow, 'SPLASH_SCREEN_QUOTE', cachedQuote);
}
if (splashWindow && !startMinimized) {
splashWindow.show();
}
@ -269,3 +286,20 @@ function pageReady() {
destroySplash();
process.nextTick(() => events.emit(APP_SHOULD_SHOW));
}
function cacheLatestQuotes(quotes) {
_fs2.default.writeFile(quoteCachePath, JSON.stringify(quotes), e => {
if (e) {
console.warn('Failed updating quote cache with error: ', e);
}
});
}
function chooseCachedQuote() {
let cachedQuote = null;
try {
const cachedQuotes = JSON.parse(_fs2.default.readFileSync(quoteCachePath));
cachedQuote = cachedQuotes[Math.floor(Math.random() * cachedQuotes.length)];
} catch (_err) {}
return cachedQuote;
}