Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove outdated crash reporting + remove donate dialog #638

Merged
merged 3 commits into from
Dec 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@ If you'd like to install a version of Cerebro, but the executable hasn't been re

1. Clone the repository
2. Install dependencies with [yarn](https://yarnpkg.com/getting-started/install):

```bash
yarn --force
```

3. Build the package:

```bash
yarn package
```
Expand Down
6 changes: 3 additions & 3 deletions app/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ const schema = {
cleanOnHide: { type: 'boolean', default: true },
selectOnShow: { type: 'boolean', default: false },
hideOnBlur: { type: 'boolean', default: true },
skipDonateDialog: { type: 'boolean', default: false },
lastShownDonateDialog: { type: 'number', default: 0 },
plugins: { type: 'object', default: {} },
isMigratedPlugins: { type: 'boolean', default: false },
crashreportingEnabled: { type: 'boolean', default: true },
openAtLogin: { type: 'boolean', default: true },
winPosition: { type: 'array', default: [] },
}
Expand All @@ -28,6 +25,9 @@ const store = new Store({
migrations: {
'>=0.9.0': (oldStore) => {
oldStore.delete('positions')
},
'>=0.10.0': (oldStore) => {
oldStore.delete('crashreportingEnabled')
}
}
})
Expand Down
17 changes: 1 addition & 16 deletions app/main.development.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { app, ipcMain, crashReporter } from 'electron'
import { app, ipcMain } from 'electron'
import path from 'path'

import createMainWindow from './main/createWindow'
Expand All @@ -22,21 +22,6 @@ let mainWindow
let backgroundWindow
let tray

if (process.env.NODE_ENV !== 'development') {
// Set up crash reporter before creating windows in production builds
if (config.get('crashreportingEnabled')) {
crashReporter.start({
globalExtra: {
_companyName: 'Cerebro',
},
productName: 'Cerebro',
submitURL: 'http://crashes.cerebroapp.com/post',
autoSubmit: true,
compress: false
})
}
}

const setupEnvVariables = () => {
process.env.CEREBRO_VERSION = app.getVersion()

Expand Down
5 changes: 0 additions & 5 deletions app/main/createWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
import buildMenu from './createWindow/buildMenu'
import toggleWindow from './createWindow/toggleWindow'
import handleUrl from './createWindow/handleUrl'
import * as donateDialog from './createWindow/donateDialog'

export default ({ src, isDev }) => {
const [x, y] = config.get('winPosition')
Expand Down Expand Up @@ -169,10 +168,6 @@ export default ({ src, isDev }) => {
})
}

if (donateDialog.shouldShow()) {
setTimeout(donateDialog.show, 1000)
}

// Save in config information, that application has been started
config.set('firstStart', false)

Expand Down
5 changes: 0 additions & 5 deletions app/main/createWindow/AppTray.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Menu, Tray, app } from 'electron'
import showWindowWithTerm from './showWindowWithTerm'
import toggleWindow from './toggleWindow'
import checkForUpdates from './checkForUpdates'
import { donate } from './donateDialog'

/**
* Class that controls state of icon in menu bar
Expand Down Expand Up @@ -61,10 +60,6 @@ export default class AppTray {
click: checkForUpdates,
},
separator,
{
label: 'Donate...',
click: donate
}
]

if (isDev) {
Expand Down
55 changes: 0 additions & 55 deletions app/main/createWindow/donateDialog.js

This file was deleted.

6 changes: 0 additions & 6 deletions app/plugins/core/settings/Settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ function Settings({ get, set }) {
cleanOnHide: get('cleanOnHide'),
selectOnShow: get('selectOnShow'),
pluginsSettings: get('plugins'),
crashreportingEnabled: get('crashreportingEnabled'),
openAtLogin: get('openAtLogin')
}))

Expand Down Expand Up @@ -83,11 +82,6 @@ function Settings({ get, set }) {
value={state.selectOnShow}
onChange={(value) => changeConfig('selectOnShow', value)}
/>
<Checkbox
label="Send automatic crash reports (requires restart)"
value={state.crashreportingEnabled}
onChange={(value) => changeConfig('crashreportingEnabled', value)}
/>
</div>
)
}
Expand Down