Change title of settings button to give an indication WHY it isn't enabled

This commit is contained in:
Isaac Connor 2022-02-08 17:51:21 -05:00
parent 9fee64b62f
commit b866888062
1 changed files with 9 additions and 1 deletions

View File

@ -805,7 +805,15 @@ function initPage() {
if (monitorType == 'Local') getSettingsModal();
}
// Only enable the settings button for local cameras
settingsBtn.prop('disabled', !(canView.Control && (monitorType == 'Local')));
if (!canView.Control) {
settingsBtn.prop('disabled', true);
settingsBtn.prop('title', 'Disbled due to lack of Control View permission.');
} else if (monitorType != 'Local') {
settingsBtn.prop('disabled', true);
settingsBtn.prop('title', 'Settings only available for Local monitors.');
} else {
settingsBtn.prop('disabled', false);
}
if (monitorType != 'WebSite') {
monitorStream = new MonitorStream(monitorData[monIdx]);