insomnia/app/main.html

106 lines
2.6 KiB
HTML
Raw Normal View History

2016-03-22 18:20:05 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
2016-07-21 22:26:51 +00:00
<title>Insomnia</title>
2016-10-27 03:41:30 +00:00
<script>
</script>
2016-03-22 18:20:05 +00:00
</head>
<body>
<div id="root"></div>
2016-10-05 17:13:43 +00:00
<script src="./external/jsonlint.js"></script>
<script src="./external/raven.min.js"></script>
2016-10-11 21:06:25 +00:00
<script>
// UPDATE HANDLERS
(function () {
const CHECK_FOR_UPDATES_INTERVAL = 1000 * 60 * 60 * 3; // 3 hours
function showUpdateNotification () {
console.log('-- Update Available --');
new Notification('Insomnia Update Ready', {
body: 'Relaunch the app for it to take effect',
silent: true,
sticky: true,
2016-10-11 21:06:25 +00:00
});
}
const {ipcRenderer} = require('electron');
ipcRenderer.on('update-available', () => {
showUpdateNotification();
});
setInterval(() => {
ipcRenderer.send('check-for-updates');
}, CHECK_FOR_UPDATES_INTERVAL);
})();
</script>
<script>
// Sentry
if (process.env.INSOMNIA_ENV !== 'development') {
2016-10-27 03:41:30 +00:00
Raven.config('https://786e43ae199c4757a9ea4a48a9abd17d@sentry.io/109702', {
logger: 'electron.renderer',
environment: process.env.INSOMNIA_ENV || 'production',
level: 'warning',
2016-09-15 22:45:08 +00:00
release: require('./package.json').version,
ignoreUrls: [
/.*raven\.min\.js.*/
],
includePaths: [
/^(?!.*raven.min.js$).*$/ // Ignore raven stuff
],
dataCallback: function (data) {
var normalize = function (filename) {
var match = filename.match(/\/(app.asar|build)\/(.*)/);
if (match) {
return match[2]; // return everything after ../app.asar/*
} else {
return filename;
}
};
2016-08-17 19:12:13 +00:00
if (!data.exception) {
// Probably a regular console.error, etc
return data;
}
2016-08-25 19:44:51 +00:00
data.exception.values[0].stacktrace.frames.forEach(function (frame) {
frame.filename = normalize(frame.filename);
});
2016-08-17 19:12:13 +00:00
return data
}
}).install();
console.log('-- Initialized Sentry --');
} else {
console.log('-- Did not Initialize Sentry --');
}
</script>
2016-07-21 22:26:51 +00:00
<script>
Sync Proof of Concept (#33) * Maybe working POC * Change to use remote url * Other URL too * Some logic * Got the push part working * Made some updates * Fix * Update * Add status code check * Stuff * Implemented new sync api * A bit more robust * Debounce changes * Change timeout * Some fixes * Remove .less * Better error handling * Fix base url * Support for created vs updated docs * Try silent * Silence removal too * Small fix after merge * Fix test * Stuff * Implement key generation algorithm * Tidy * stuff * A bunch of stuff for the new API * Integrated the session stuff * Stuff * Just started on encryption * Lots of updates to encryption * Finished createResourceGroup function * Full encryption/decryption working (I think) * Encrypt localstorage with sessionID * Some more * Some extra checks * Now uses separate DB. Still needs to be simplified a LOT * Fix deletion bug * Fixed unicode bug with encryption * Simplified and working * A bunch of polish * Some stuff * Removed some workspace meta properties * Migrated a few more meta properties * Small changes * Fix body scrolling and url cursor jumping * Removed duplication of webpack port * Remove workspaces reduces * Some small fixes * Added sync modal and opt-in setting * Good start to sync flow * Refactored modal footer css * Update sync status * Sync logger * A bit better logging * Fixed a bunch of sync-related bugs * Fixed signup form button * Gravatar component * Split sync modal into tabs * Tidying * Some more error handling * start sending 'user agent * Login/signup error handling * Use real UUIDs * Fixed tests * Remove unused function * Some extra checks * Moved cloud sync setting to about page * Some small changes * Some things
2016-10-21 17:20:36 +00:00
const {productName, version} = require('./package.json');
2016-09-07 22:21:10 +00:00
if (process.env.INSOMNIA_ENV === 'development') {
Sync Proof of Concept (#33) * Maybe working POC * Change to use remote url * Other URL too * Some logic * Got the push part working * Made some updates * Fix * Update * Add status code check * Stuff * Implemented new sync api * A bit more robust * Debounce changes * Change timeout * Some fixes * Remove .less * Better error handling * Fix base url * Support for created vs updated docs * Try silent * Silence removal too * Small fix after merge * Fix test * Stuff * Implement key generation algorithm * Tidy * stuff * A bunch of stuff for the new API * Integrated the session stuff * Stuff * Just started on encryption * Lots of updates to encryption * Finished createResourceGroup function * Full encryption/decryption working (I think) * Encrypt localstorage with sessionID * Some more * Some extra checks * Now uses separate DB. Still needs to be simplified a LOT * Fix deletion bug * Fixed unicode bug with encryption * Simplified and working * A bunch of polish * Some stuff * Removed some workspace meta properties * Migrated a few more meta properties * Small changes * Fix body scrolling and url cursor jumping * Removed duplication of webpack port * Remove workspaces reduces * Some small fixes * Added sync modal and opt-in setting * Good start to sync flow * Refactored modal footer css * Update sync status * Sync logger * A bit better logging * Fixed a bunch of sync-related bugs * Fixed signup form button * Gravatar component * Split sync modal into tabs * Tidying * Some more error handling * start sending 'user agent * Login/signup error handling * Use real UUIDs * Fixed tests * Remove unused function * Some extra checks * Moved cloud sync setting to about page * Some small changes * Some things
2016-10-21 17:20:36 +00:00
document.title = `${productName} v${version} (DEV)`;
2016-09-07 22:21:10 +00:00
} else {
Sync Proof of Concept (#33) * Maybe working POC * Change to use remote url * Other URL too * Some logic * Got the push part working * Made some updates * Fix * Update * Add status code check * Stuff * Implemented new sync api * A bit more robust * Debounce changes * Change timeout * Some fixes * Remove .less * Better error handling * Fix base url * Support for created vs updated docs * Try silent * Silence removal too * Small fix after merge * Fix test * Stuff * Implement key generation algorithm * Tidy * stuff * A bunch of stuff for the new API * Integrated the session stuff * Stuff * Just started on encryption * Lots of updates to encryption * Finished createResourceGroup function * Full encryption/decryption working (I think) * Encrypt localstorage with sessionID * Some more * Some extra checks * Now uses separate DB. Still needs to be simplified a LOT * Fix deletion bug * Fixed unicode bug with encryption * Simplified and working * A bunch of polish * Some stuff * Removed some workspace meta properties * Migrated a few more meta properties * Small changes * Fix body scrolling and url cursor jumping * Removed duplication of webpack port * Remove workspaces reduces * Some small fixes * Added sync modal and opt-in setting * Good start to sync flow * Refactored modal footer css * Update sync status * Sync logger * A bit better logging * Fixed a bunch of sync-related bugs * Fixed signup form button * Gravatar component * Split sync modal into tabs * Tidying * Some more error handling * start sending 'user agent * Login/signup error handling * Use real UUIDs * Fixed tests * Remove unused function * Some extra checks * Moved cloud sync setting to about page * Some small changes * Some things
2016-10-21 17:20:36 +00:00
document.title = `${productName} v${version}`;
2016-09-07 22:21:10 +00:00
}
2016-07-21 22:26:51 +00:00
</script>
2016-03-22 18:20:05 +00:00
<script>
// HOT RELOADING IN DEV
2016-03-22 18:20:05 +00:00
(function () {
const script = document.createElement('script');
2016-07-18 20:10:18 +00:00
script.src = (process.env.HOT) ? 'http://localhost:3333/build/bundle.js' : './bundle.js';
2016-03-22 18:20:05 +00:00
document.write(script.outerHTML);
}());
</script>
2016-07-07 22:06:18 +00:00
2016-07-18 19:44:46 +00:00
<script>
// SOME HELPERS
2016-07-07 22:06:18 +00:00
document.body.setAttribute('data-platform', process.platform);
2016-07-07 22:06:18 +00:00
</script>
2016-03-22 18:20:05 +00:00
</body>
</html>