Skip to content

Commit

Permalink
Removed EULA
Browse files Browse the repository at this point in the history
  • Loading branch information
ron-rookout committed Jun 4, 2024
1 parent 4efd50a commit b05ec90
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 180 deletions.
25 changes: 6 additions & 19 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ let dataCollectionEnabled: boolean;
const icon = nativeImage.createFromPath(APP_ICON);
let analytics: Analytics;
let userId: string;
let signedEula: boolean = false;

// getAppIcon resolves the right icon for the running platform
function getAppIcon() {
Expand Down Expand Up @@ -145,18 +144,7 @@ function registerIpc() {
store.set("sentry-enabled", enable);
e.sender.send("exception-manager-enabled-changed", enable);
});
ipcMain.on("has-signed-eula", (e: IpcMainEvent) => {
e.returnValue = store.get("has-signed-eula", false);
});
ipcMain.on("signed-eula", (e: IpcMainEvent) => {
if (dataCollectionEnabled || process.env.development) {
initExceptionManager(() => userId);
initAnalytics();
track("signed-eula");
}
store.set("has-signed-eula", true);
startGraphqlServer();
});

ipcMain.on("auto-launch-set", (e: IpcMainEvent, enable: boolean) => {
if (enable) {
store.set("linux-start-with-os", true);
Expand Down Expand Up @@ -236,8 +224,8 @@ function main() {
});
userId = store.getOrCreate("user-id", uuidv4());
dataCollectionEnabled = Boolean(store.get("sentry-enabled", true));
signedEula = Boolean(store.get("has-signed-eula", false));
if (signedEula && (dataCollectionEnabled || process.env.development)) {

if (dataCollectionEnabled || process.env.development) {
initExceptionManager(() => userId);
initAnalytics();
}
Expand Down Expand Up @@ -379,9 +367,8 @@ function createMainWindow(indexWorkerWindow: BrowserWindow, hidden: boolean = fa
webPreferences: { nodeIntegration: true, contextIsolation: false, sandbox: false }
});
remoteEnable(mainWindow.webContents);
if (signedEula) {
startGraphqlServer();
}
startGraphqlServer();

ipcMain.on("app-window-up", (ev: IpcMainEvent) => {
ev.sender.send("indexer-worker-id", indexWorker.id);
if (hidden && process.platform === "darwin") {
Expand Down Expand Up @@ -486,4 +473,4 @@ app.on("quit", async () => {
notify(error);
}
}
});
});
1 change: 0 additions & 1 deletion src/webapp/public/eula.v2.html

This file was deleted.

38 changes: 0 additions & 38 deletions src/webapp/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,45 +89,7 @@ div, span {
margin-bottom: 8px;
}

.eula-modal {
display: flex;
flex-direction: column;
background: #111223;
font-family: DynatraceFlow, sans-serif;
height: 100%;
padding-left: 5%;
padding-right: 5%;
}

.eula-modal .headline {
color: white;
font-size: 24px;
margin-top: 30px;
font-weight: 300;
}

.eula-modal .eula-iframe {
width: 100%;
height: 65%;
}

.eula-modal .eula-box {
width: 100%;
height: 65%;
overflow: auto;
background-color: grey;
}

.eula-modal .actions {
display: flex;
justify-content: flex-end;
height: 35px;
margin-bottom: 20px;
}

.eula-modal .agree {
margin-left: 10px;
}

#footer-container {
border-top: 1px solid #4D5667;
Expand Down
5 changes: 1 addition & 4 deletions src/webapp/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ import './App.css'
import './Fonts.css'
import { Header } from './components/Header'
import Footer from './components/Footer'
import { EulaModal } from './components/EulaModal'
import { EmptyState } from './components/EmptyState'

const INITIAL_HAS_SIGNED_EULA = ipcRenderer.sendSync('has-signed-eula')

export const App = () => {
const [loading, setLoading] = useState(true)
const [hasSignedEula, setHasSignedEula] = useState(INITIAL_HAS_SIGNED_EULA)

useEffect(() => {
// "indexer-worker-id" event should be subscribed to BEFORE "app-window-up" event
Expand All @@ -30,7 +27,7 @@ export const App = () => {
return (
<div style={{ display: 'flex', height: '100%', flexDirection: 'column' }}>
<Header />
{hasSignedEula ? <EmptyState /> : <EulaModal setSignedEula={setHasSignedEula} />}
<EmptyState />
<Footer />
</div>
)
Expand Down
118 changes: 0 additions & 118 deletions src/webapp/src/components/EulaModal.js

This file was deleted.

0 comments on commit b05ec90

Please sign in to comment.