/home/techb158/trellopowerup.abdallabala.com/public
NameSizeModeActions
assets/-0755rm
.htaccess5330644editdlrm
admin.php331100644editdlrm
authorize.html10090644editdlrm
board-dashboard.html29620644editdlrm
board-dashboard.js137190644editdlrm
card-section.html5330644editdlrm
card-section.js61420644editdlrm
client-utils.js15910644editdlrm
index.html5570644editdlrm
index.php71400644editdlrm
powerup.js41850644editdlrm
risk-modal.html68150644editdlrm
risk-modal.js207460644editdlrm
settings.html25000644editdlrm
settings.js16700644editdlrm
styles.css40340644editdlrm
Edit: /home/techb158/trellopowerup.abdallabala.com/public/settings.js (1670B)
import { canWriteBoard, powerUpOptions } from './client-utils.js'; const t = window.TrelloPowerUp.iframe(powerUpOptions()); const form = document.getElementById('settings'); const apiBaseUrl = document.getElementById('apiBaseUrl'); const defaultTypology = document.getElementById('defaultTypology'); const defaultLifecyclePhase = document.getElementById('defaultLifecyclePhase'); const defaultMeasurementMaturity = document.getElementById('defaultMeasurementMaturity'); const labelSyncEnabled = document.getElementById('labelSyncEnabled'); async function load() { const settings = await t.get('board', 'shared', 'cosmicSettings'); apiBaseUrl.value = settings?.apiBaseUrl || window.COSMIC_API_BASE || window.location.origin; defaultTypology.value = settings?.defaultTypology || 'ai_enabler'; defaultLifecyclePhase.value = settings?.defaultLifecyclePhase || 'model_development'; defaultMeasurementMaturity.value = settings?.defaultMeasurementMaturity || 'defined'; labelSyncEnabled.checked = settings?.labelSyncEnabled === true; } form.addEventListener('submit', async (event) => { event.preventDefault(); const writable = await canWriteBoard(t); if (!writable) { alert('You do not have permission to change board settings.'); return; } await t.set('board', 'shared', 'cosmicSettings', { apiBaseUrl: apiBaseUrl.value.trim() || window.COSMIC_API_BASE || window.location.origin, defaultTypology: defaultTypology.value, defaultLifecyclePhase: defaultLifecyclePhase.value, defaultMeasurementMaturity: defaultMeasurementMaturity.value, labelSyncEnabled: labelSyncEnabled.checked }); t.closePopup(); }); t.render(load);