<!DOCTYPE html>
<md-dialog style="background-color: #424242;" md-theme="altTheme">
    <md-dialog-content flex md-theme="altTheme" layout="column">
        <md-toolbar md-theme="altTheme" style="background-color: #FFEB3B;" flex="none">
            <div class="md-toolbar-tools">
                <span style="color: black;">Update available</span>
            </div>
        </md-toolbar>
        <md-progress-linear style="background-color: #FFEB3B !important; color: rgba(0,0,0,0) !important;" md-mode="{{ DownloadProgressMode }}" class="nga-fade nga-fast nga-stagger-fast" ng-if="downloading" value="{{ DownloadProgress }}" flex="none"></md-progress-linear>
        <md-content layout-padding ng-if="!downloading && !LoadingReleaseData" class="nga-fade nga-fast nga-stagger-fast" md-theme="altTheme" flex="grow">
            <h1 md-theme="altTheme" flex>{{ version }}</h1>
            <div md-theme="altTheme" ng-if="releaseNotes" marked="releaseNotes" flex></div>
            <a md-theme="altTheme" ng-if="!releaseNotes" flex>
                No changelog
            </a>
        </md-content>
        <md-content layout-padding ng-if="downloading" class="nga-fade nga-fast nga-stagger-fast" md-theme="altTheme">
            <nothing ng-if="!finished" class="nga-fade nga-fast nga-stagger-fast">Downloading <a ng-if="speed">{{ speed }}</a></nothing>
            <nothing ng-if="finished" class="nga-fade nga-fast nga-stagger-fast">Download finished. Please wait the client will restart...</nothing>
        </md-content>
        <md-content layout-align="center center" layout="row" ng-if="LoadingReleaseData && !downloading" class="nga-fade nga-fast nga-stagger-fast" style="height: 300px;" flex="initial">
            <md-progress-circular md-mode="indeterminate"></md-progress-circular>
        </md-content>
    </md-dialog-content>
    <md-dialog-actions md-theme="altTheme">
        <md-button md-theme="altTheme" ng-click="nope()" ng-disabled="downloading">I hate updates</md-button>
        <md-button style="background-color: #FFEB3B !important; color: black;" md-theme="altTheme" ng-click="downloadAndInstall()" ng-disabled="downloading">Download & Install</md-button>
    </md-dialog-actions>
</md-dialog>