Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Remove status check when configuration was changed
Setting a null status was supposed to remove the status check, but
nothing was changed in that case. Now the status check is properly
removed, and doing that by hiding the element rather than just turning
it invisible also prevents that clicking on the invisible status
triggers a check, as until the new configuration is saved the check will
still be performed with the old configuration, which could be misleading
for the user.

Additionally, an explicit width is set to the parent of the span element
to prevent its width from changing when the span is shown and hidden.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
  • Loading branch information
danxuliu authored and AndyScherzinger committed Sep 4, 2024
commit 8d3ff42f78143aa3a6bfcea38a82aaea20c77f6a
2 changes: 2 additions & 0 deletions apps/files_external/css/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
/* overwrite conflicting core styles */
display: table-cell;
vertical-align: middle;
/* ensure width does not change even if internal span is not displayed */
width: 43px;
}

#externalStorage td.status > span {
Expand Down
4 changes: 4 additions & 0 deletions apps/files_external/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,7 @@ MountConfigListView.prototype = _.extend({
switch (status) {
case null:
// remove status
$statusSpan.hide();
break;
case StorageConfig.Status.IN_PROGRESS:
$statusSpan.attr('class', 'icon-loading-small');
Expand All @@ -1333,6 +1334,9 @@ MountConfigListView.prototype = _.extend({
default:
$statusSpan.attr('class', 'error icon-error-white');
}
if (status !== null) {
$statusSpan.show();
}
if (typeof message === 'string') {
$statusSpan.attr('title', message);
}
Expand Down