fix: DockerSecretsResolver - don't normalize absolute paths like /var/www/html/...
Some checks failed
Deploy Application / deploy (push) Has been cancelled
Some checks failed
Deploy Application / deploy (push) Has been cancelled
This commit is contained in:
@@ -39,13 +39,29 @@ export class LoadingStateManager {
|
||||
* @param {string} componentId - Component ID
|
||||
* @param {HTMLElement} element - Component element
|
||||
* @param {Object} options - Loading options
|
||||
* @param {HTMLElement} actionElement - Optional action element (for per-action indicators)
|
||||
*/
|
||||
showLoading(componentId, element, options = {}) {
|
||||
showLoading(componentId, element, options = {}, actionElement = null) {
|
||||
const config = this.loadingConfigs.get(componentId) || {
|
||||
type: this.config.defaultType,
|
||||
showDelay: this.config.showDelay
|
||||
};
|
||||
|
||||
// Check for per-action indicator (data-lc-indicator)
|
||||
if (actionElement?.dataset.lcIndicator) {
|
||||
const indicatorSelector = actionElement.dataset.lcIndicator;
|
||||
const indicators = document.querySelectorAll(indicatorSelector);
|
||||
indicators.forEach(indicator => {
|
||||
if (indicator instanceof HTMLElement) {
|
||||
indicator.style.display = '';
|
||||
indicator.setAttribute('aria-busy', 'true');
|
||||
indicator.classList.add('lc-indicator-active');
|
||||
}
|
||||
});
|
||||
// Don't show default loading if custom indicator is used
|
||||
return;
|
||||
}
|
||||
|
||||
const loadingType = options.type || config.type;
|
||||
|
||||
// Skip if type is 'none' or optimistic UI is enabled
|
||||
@@ -86,8 +102,21 @@ export class LoadingStateManager {
|
||||
* Hide loading state
|
||||
*
|
||||
* @param {string} componentId - Component ID
|
||||
* @param {HTMLElement} actionElement - Optional action element (for per-action indicators)
|
||||
*/
|
||||
hideLoading(componentId) {
|
||||
hideLoading(componentId, actionElement = null) {
|
||||
// Hide per-action indicators if specified
|
||||
if (actionElement?.dataset.lcIndicator) {
|
||||
const indicatorSelector = actionElement.dataset.lcIndicator;
|
||||
const indicators = document.querySelectorAll(indicatorSelector);
|
||||
indicators.forEach(indicator => {
|
||||
if (indicator instanceof HTMLElement) {
|
||||
indicator.removeAttribute('aria-busy');
|
||||
indicator.classList.remove('lc-indicator-active');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Hide skeleton loading
|
||||
this.actionLoadingManager.hideLoading(componentId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user