mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-13 14:47:57 -04:00
* 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
103 lines
2.6 KiB
HTML
103 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Insomnia</title>
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script src="./external/jsonlint.js"></script>
|
|
<script src="./external/raven.min.js"></script>
|
|
<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'
|
|
});
|
|
}
|
|
|
|
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') {
|
|
Raven.config('https://fb3242f902b54cdd934b8ffa204426c0:23430fbe203a4189a68efb63c38fc50b@app.getsentry.com/88289', {
|
|
allowSecretKey: true,
|
|
logger: 'renderer',
|
|
environment: process.env.INSOMNIA_ENV || 'production',
|
|
level: 'warning',
|
|
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;
|
|
}
|
|
};
|
|
|
|
if (!data.exception) {
|
|
// Probably a regular console.error, etc
|
|
return data;
|
|
}
|
|
|
|
data.exception.values[0].stacktrace.frames.forEach(function (frame) {
|
|
frame.filename = normalize(frame.filename);
|
|
});
|
|
|
|
return data
|
|
}
|
|
}).install();
|
|
|
|
console.log('-- Initialized Sentry --');
|
|
} else {
|
|
console.log('-- Did not Initialize Sentry --');
|
|
}
|
|
</script>
|
|
<script>
|
|
const {productName, version} = require('./package.json');
|
|
if (process.env.INSOMNIA_ENV === 'development') {
|
|
document.title = `${productName} v${version} (DEV)`;
|
|
} else {
|
|
document.title = `${productName} v${version}`;
|
|
}
|
|
</script>
|
|
<script>
|
|
// HOT RELOADING IN DEV
|
|
|
|
(function () {
|
|
const script = document.createElement('script');
|
|
script.src = (process.env.HOT) ? 'http://localhost:3333/build/bundle.js' : './bundle.js';
|
|
document.write(script.outerHTML);
|
|
}());
|
|
</script>
|
|
|
|
<script>
|
|
// SOME HELPERS
|
|
|
|
document.body.setAttribute('data-platform', process.platform);
|
|
</script>
|
|
</body>
|
|
</html>
|