|
@@ -164,24 +164,23 @@ export class EwtInstallDialog extends LitElement {
|
|
let allowClosing = true;
|
|
let allowClosing = true;
|
|
|
|
|
|
content = html`
|
|
content = html`
|
|
- <table>
|
|
|
|
- <tr>
|
|
|
|
- <td>${firmwareIcon}</td>
|
|
|
|
- <td>${this._info!.firmware} ${this._info!.version}</td>
|
|
|
|
- </tr>
|
|
|
|
- <tr>
|
|
|
|
- <td>${chipIcon}</td>
|
|
|
|
- <td>${this._info!.chipFamily}</td>
|
|
|
|
- </tr>
|
|
|
|
- </table>
|
|
|
|
|
|
+ <div class="table-row">
|
|
|
|
+ ${firmwareIcon}
|
|
|
|
+ <div>${this._info!.firmware} ${this._info!.version}</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="table-row last">
|
|
|
|
+ ${chipIcon}
|
|
|
|
+ <div>${this._info!.chipFamily}</div>
|
|
|
|
+ </div>
|
|
<div class="dashboard-buttons">
|
|
<div class="dashboard-buttons">
|
|
${!this._isSameVersion
|
|
${!this._isSameVersion
|
|
? html`
|
|
? html`
|
|
<div>
|
|
<div>
|
|
<ewt-button
|
|
<ewt-button
|
|
|
|
+ text-left
|
|
.label=${!this._isSameFirmware
|
|
.label=${!this._isSameFirmware
|
|
- ? `Install ${this._manifest!.name}`
|
|
|
|
- : `Update ${this._manifest!.name}`}
|
|
|
|
|
|
+ ? `Install ${this._manifest.name}`
|
|
|
|
+ : `Update ${this._manifest.name}`}
|
|
@click=${() => {
|
|
@click=${() => {
|
|
if (this._isSameFirmware) {
|
|
if (this._isSameFirmware) {
|
|
this._startInstall(false);
|
|
this._startInstall(false);
|
|
@@ -291,6 +290,7 @@ export class EwtInstallDialog extends LitElement {
|
|
<div class="dashboard-buttons">
|
|
<div class="dashboard-buttons">
|
|
<div>
|
|
<div>
|
|
<ewt-button
|
|
<ewt-button
|
|
|
|
+ text-left
|
|
.label=${`Install ${this._manifest.name}`}
|
|
.label=${`Install ${this._manifest.name}`}
|
|
@click=${() => {
|
|
@click=${() => {
|
|
if (this._manifest.new_install_prompt_erase) {
|
|
if (this._manifest.new_install_prompt_erase) {
|
|
@@ -523,9 +523,7 @@ export class EwtInstallDialog extends LitElement {
|
|
}
|
|
}
|
|
|
|
|
|
_renderInstall(): [string | undefined, TemplateResult, boolean, boolean] {
|
|
_renderInstall(): [string | undefined, TemplateResult, boolean, boolean] {
|
|
- let heading: string | undefined = `${
|
|
|
|
- this._installConfirmed ? "Installing" : "Install"
|
|
|
|
- } ${this._manifest!.name}`;
|
|
|
|
|
|
+ let heading: string | undefined;
|
|
let content: TemplateResult;
|
|
let content: TemplateResult;
|
|
let hideActions = false;
|
|
let hideActions = false;
|
|
const allowClosing = false;
|
|
const allowClosing = false;
|
|
@@ -545,6 +543,7 @@ export class EwtInstallDialog extends LitElement {
|
|
></ewt-button>
|
|
></ewt-button>
|
|
`;
|
|
`;
|
|
} else if (!this._installConfirmed) {
|
|
} else if (!this._installConfirmed) {
|
|
|
|
+ heading = "Confirm Installation";
|
|
const action = isUpdate ? "update to" : "install";
|
|
const action = isUpdate ? "update to" : "install";
|
|
content = html`
|
|
content = html`
|
|
${isUpdate
|
|
${isUpdate
|
|
@@ -552,9 +551,9 @@ export class EwtInstallDialog extends LitElement {
|
|
${this._info!.firmware} ${this._info!.version}.<br /><br />`
|
|
${this._info!.firmware} ${this._info!.version}.<br /><br />`
|
|
: ""}
|
|
: ""}
|
|
Do you want to ${action}
|
|
Do you want to ${action}
|
|
- ${this._manifest!.name} ${this._manifest!.version}?
|
|
|
|
|
|
+ ${this._manifest.name} ${this._manifest.version}?
|
|
${this._installErase
|
|
${this._installErase
|
|
- ? "All existing data will be erased from your device."
|
|
|
|
|
|
+ ? html`<br /><br />All data on the device will be erased.`
|
|
: ""}
|
|
: ""}
|
|
<ewt-button
|
|
<ewt-button
|
|
slot="primaryAction"
|
|
slot="primaryAction"
|
|
@@ -575,9 +574,11 @@ export class EwtInstallDialog extends LitElement {
|
|
this._installState.state === FlashStateType.MANIFEST ||
|
|
this._installState.state === FlashStateType.MANIFEST ||
|
|
this._installState.state === FlashStateType.PREPARING
|
|
this._installState.state === FlashStateType.PREPARING
|
|
) {
|
|
) {
|
|
|
|
+ heading = "Installing";
|
|
content = this._renderProgress("Preparing installation");
|
|
content = this._renderProgress("Preparing installation");
|
|
hideActions = true;
|
|
hideActions = true;
|
|
} else if (this._installState.state === FlashStateType.ERASING) {
|
|
} else if (this._installState.state === FlashStateType.ERASING) {
|
|
|
|
+ heading = "Installing";
|
|
content = this._renderProgress("Erasing");
|
|
content = this._renderProgress("Erasing");
|
|
hideActions = true;
|
|
hideActions = true;
|
|
} else if (
|
|
} else if (
|
|
@@ -587,6 +588,7 @@ export class EwtInstallDialog extends LitElement {
|
|
(this._installState.state === FlashStateType.FINISHED &&
|
|
(this._installState.state === FlashStateType.FINISHED &&
|
|
this._client === undefined)
|
|
this._client === undefined)
|
|
) {
|
|
) {
|
|
|
|
+ heading = "Installing";
|
|
let percentage: number | undefined;
|
|
let percentage: number | undefined;
|
|
let undeterminateLabel: string | undefined;
|
|
let undeterminateLabel: string | undefined;
|
|
if (this._installState.state === FlashStateType.FINISHED) {
|
|
if (this._installState.state === FlashStateType.FINISHED) {
|
|
@@ -630,6 +632,7 @@ export class EwtInstallDialog extends LitElement {
|
|
></ewt-button>
|
|
></ewt-button>
|
|
`;
|
|
`;
|
|
} else if (this._installState.state === FlashStateType.ERROR) {
|
|
} else if (this._installState.state === FlashStateType.ERROR) {
|
|
|
|
+ heading = "Installation failed";
|
|
content = html`
|
|
content = html`
|
|
<ewt-page-message
|
|
<ewt-page-message
|
|
.icon=${ERROR_ICON}
|
|
.icon=${ERROR_ICON}
|
|
@@ -896,7 +899,7 @@ export class EwtInstallDialog extends LitElement {
|
|
*/
|
|
*/
|
|
private get _isSameVersion() {
|
|
private get _isSameVersion() {
|
|
return (
|
|
return (
|
|
- this._isSameFirmware && this._info!.version === this._manifest!.version
|
|
|
|
|
|
+ this._isSameFirmware && this._info!.version === this._manifest.version
|
|
);
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -916,12 +919,13 @@ export class EwtInstallDialog extends LitElement {
|
|
right: 4px;
|
|
right: 4px;
|
|
top: 10px;
|
|
top: 10px;
|
|
}
|
|
}
|
|
- table {
|
|
|
|
- border-spacing: 0;
|
|
|
|
- color: var(--improv-text-color);
|
|
|
|
|
|
+ .table-row {
|
|
|
|
+ display: flex;
|
|
|
|
+ }
|
|
|
|
+ .table-row.last {
|
|
margin-bottom: 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
}
|
|
- table svg {
|
|
|
|
|
|
+ .table-row svg {
|
|
width: 20px;
|
|
width: 20px;
|
|
margin-right: 8px;
|
|
margin-right: 8px;
|
|
}
|
|
}
|