UI style adjustment

This commit is contained in:
2023-06-05 15:21:56 +08:00
parent 93d5be462e
commit 2366b378d2
4 changed files with 138 additions and 36 deletions

View File

@ -337,6 +337,7 @@ class CustomerCommunication {
if (option.autoUpdatesVisible === false) {
checkAutoUpdate.style.display = 'none';
}
const This = this;
const checkLink = createCheckbox({
className: 'check-status-link',
enabled: !readonly,
@ -347,6 +348,9 @@ class CustomerCommunication {
setTooltip(checkLink, this.checked ?
r('statusLinkIncluded', 'Status Link Included') :
r('statusLinkExcluded', 'Status Link Excluded'));
if (typeof option.onStatusLinkChanged === 'function') {
option.onStatusLinkChanged.call(This, this.checked);
}
}
});
if (option.statusLinkVisible === false) {
@ -898,7 +902,33 @@ class CustomerCommunication {
});
});
})
)
),
createElement('div', div => {
div.className = 'bar-info';
div.innerText = r('contactInformation', 'Contact Information');
}),
createElement('div', div => {
if (option.contactCollapsed) {
container.classList.add('collapsed');
div.className = 'bar-collapser collapsed';
} else {
div.className = 'bar-collapser';
}
div.addEventListener('click', () => {
const collapsed = div.classList.contains('collapsed');
if (collapsed) {
div.classList.remove('collapsed');
container.classList.remove('collapsed');
} else {
div.classList.add('collapsed');
container.classList.add('collapsed');
}
if (typeof option.onContactCollapsed === 'function') {
option.onContactCollapsed.call(this, !collapsed);
}
});
div.append(createElement('span'));
})
)
);
return contacts;