etcher/lib/gui/index.html
Juan Cruz Viotti 618440e38f
fix(GUI): ensure settings are loaded before bootstrapping application (#1879)
We load localStorage settings into the Redux store in an asynchronous
way. This means that user settings might not be loaded by the time the
application starts, resulting in Mixpanel sending a few tracking events
before Etcher realises that the user opted out from anonoymous analytics
and error reporting.

In order to fix that, we remove `ng-app` and we manually bootstrap the
Angular.js application *after* the local settings are loaded.

Change-Type: patch
Changelog-Entry: Don't send initial Mixpanel events before "Anonymous Tracking" settings are loaded.
Fixes: https://github.com/resin-io/etcher/issues/1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2017-12-05 11:04:52 -04:00

75 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Etcher</title>
<link rel="stylesheet" type="text/css" href="../../node_modules/flexboxgrid/dist/flexboxgrid.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="stylesheet" type="text/css" href="css/desktop.css">
<link rel="stylesheet" type="text/css" href="css/angular.css">
<script src="./app.js"></script>
</head>
<body>
<header class="section-header" ng-controller="HeaderController as header">
<button class="button button-link"
ng-click="header.openHelpPage()"
tabindex="-1">
<span tabindex="4" class="glyphicon glyphicon-question-sign"></span>
</button>
<button class="button button-link"
ui-sref="settings"
hide-if-state="settings"
tabindex="-1">
<span tabindex="5" class="glyphicon glyphicon-cog"></span>
</button>
<button class="button button-link"
tabindex="-1"
ui-sref="main"
show-if-state="settings">
<span tabindex="5" class="glyphicon glyphicon-chevron-left"></span> Back
</button>
</header>
<main class="wrapper" ui-view></main>
<footer class="section-footer" ng-controller="StateController as state"
ng-hide="state.currentName === 'success'">
<span os-open-external="https://etcher.io?ref=etcher_footer"
tabindex="100">
<svg-icon path="'../assets/etcher.svg'"
width="'83px'"
height="'13px'"></svg-icon>
</span>
<span class="caption">
is <span class="caption"
tabindex="101"
os-open-external="https://github.com/resin-io/etcher">an open source project</span> by
</span>
<span os-open-external="https://resin.io?ref=etcher"
tabindex="102">
<svg-icon path="'../assets/resin.svg'"
width="'79px'"
height="'23px'"></svg-icon>
</span>
<span class="caption footer-right"
tabindex="103"
manifest-bind="version"
os-open-external="https://github.com/resin-io/etcher/blob/master/CHANGELOG.md"></span>
</footer>
<div class="section-loader"
ng-controller="StateController as state"
ng-class="{
isFinish: state.currentName === 'success'
}">
<safe-webview
src="'https://etcher.io/success-banner/'"
refresh-now="state.previousName === 'success'"></safe-webview>
</div>
</body>
</html>