From dab1eece4ca318074e73c9c35a774cd2d514f43f Mon Sep 17 00:00:00 2001 From: Benedict Aas Date: Thu, 8 Feb 2018 16:43:34 +0000 Subject: [PATCH] feat: add icon next to drive on warnings (#2014) We add an icon next to the drive size that is displayed when there is a drive-image compatibility status message available. We display the first one in the list and importance is then enforced by the order they are added to the list in `drive-constraints`. Change-Type: patch Changelog-Entry: Add icon next to drive size when compatibility warnings exist. --- lib/gui/app/pages/main/controllers/main.js | 2 ++ .../app/pages/main/templates/main.tpl.html | 9 +++++--- lib/shared/drive-constraints.js | 21 +++++++++++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/lib/gui/app/pages/main/controllers/main.js b/lib/gui/app/pages/main/controllers/main.js index 8d9c00db..fc8a3792 100644 --- a/lib/gui/app/pages/main/controllers/main.js +++ b/lib/gui/app/pages/main/controllers/main.js @@ -22,6 +22,7 @@ const analytics = require('../../../modules/analytics') const exceptionReporter = require('../../../modules/exception-reporter') const availableDrives = require('../../../../../shared/models/available-drives') const selectionState = require('../../../../../shared/models/selection-state') +const driveConstraints = require('../../../../../shared/drive-constraints') module.exports = function ( TooltipModalService, @@ -33,6 +34,7 @@ module.exports = function ( this.state = flashState this.settings = settings this.external = OSOpenExternalService + this.constraints = driveConstraints /** * @summary Determine if the drive step should be disabled diff --git a/lib/gui/app/pages/main/templates/main.tpl.html b/lib/gui/app/pages/main/templates/main.tpl.html index 91d15cb7..80faff80 100644 --- a/lib/gui/app/pages/main/templates/main.tpl.html +++ b/lib/gui/app/pages/main/templates/main.tpl.html @@ -64,13 +64,16 @@
- + }"> + {{ (main.selection.getDrive().description || "") | middleEllipses:11 }} {{ main.selection.getDrive().size | closestUnit }} +