From fbe6fe11424ae34d2d1d59042304f30500d6ede2 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Sat, 11 Jun 2016 15:45:46 -0400 Subject: [PATCH] Show a "Locked" label if the drive is write-protected (#475) * Implement SelectionStateModel.isDriveLocked() Notice we also increase the maximum number of lines JSCS check, since the `SelectionStateModel` test suite already met that limit. Signed-off-by: Juan Cruz Viotti * Show a "Locked" label if the drive is write-protected Fixes: https://github.com/resin-io/etcher/issues/458 Signed-off-by: Juan Cruz Viotti --- .jscsrc | 2 +- .../templates/drive-selector-modal.tpl.html | 18 +- lib/gui/models/selection-state.js | 60 +++++ package.json | 2 +- tests/gui/models/selection-state.spec.js | 209 +++++++++++++++--- 5 files changed, 260 insertions(+), 31 deletions(-) diff --git a/.jscsrc b/.jscsrc index c7d6cc49..e777638e 100644 --- a/.jscsrc +++ b/.jscsrc @@ -131,7 +131,7 @@ "!==" ], "maximumLineLength": 130, - "maximumNumberOfLines": 500, + "maximumNumberOfLines": 1000, "requireAlignedMultilineParams": true, "requireAlignedObjectValues": false, "requireAnonymousFunctions": true, diff --git a/lib/gui/components/drive-selector/templates/drive-selector-modal.tpl.html b/lib/gui/components/drive-selector/templates/drive-selector-modal.tpl.html index 4dd7f164..4d79629e 100644 --- a/lib/gui/components/drive-selector/templates/drive-selector-modal.tpl.html +++ b/lib/gui/components/drive-selector/templates/drive-selector-modal.tpl.html @@ -6,20 +6,32 @@