Only show diagnostics if healthy

This commit is contained in:
Ludeeus 2020-08-11 12:15:08 +00:00
parent 41b613a2d7
commit 746844dfc8

View File

@ -61,24 +61,26 @@ class HassioSupervisorInfo extends LitElement {
</tbody> </tbody>
</table> </table>
<div class="options"> <div class="options">
<ha-settings-row> ${this.supervisorInfo?.healthy
<span slot="heading"> ? html` <ha-settings-row>
Share Diagnostics <span slot="heading">
</span> Share Diagnostics
<div slot="description" class="diagnostics-description"> </span>
Share crash reports and diagnostic information. <div slot="description" class="diagnostics-description">
<button Share crash reports and diagnostic information.
class="link" <button
@click=${this._diagnosticsInformationDialog} class="link"
> @click=${this._diagnosticsInformationDialog}
Learn more >
</button> Learn more
</div> </button>
<ha-switch </div>
.checked=${this.supervisorInfo.diagnostics} <ha-switch
@change=${this._toggleDiagnostics} .checked=${this.supervisorInfo.diagnostics}
></ha-switch> @change=${this._toggleDiagnostics}
</ha-settings-row> ></ha-switch>
</ha-settings-row>`
: ""}
</div> </div>
${this._errors ${this._errors
? html` <div class="errors">Error: ${this._errors}</div> ` ? html` <div class="errors">Error: ${this._errors}</div> `