Rework the integration UI so Add and Manage are separate surfaces, only active integrations appear in Manage, and integrations with settings (e.g. Bitcoin) can be edited via the same form used to add them. Replace the ModalDialog/initialComponent flow with a modal service and a single ModalHost that lazily mounts each dialog body, so forms and custom elements start fresh per open. Move integration components to settings/integrations, add an integrations service that unifies registry capabilities with live instances, and fix the select value refresh and bitcoin config reset.
20 lines
596 B
JavaScript
20 lines
596 B
JavaScript
import { modifier } from 'ember-modifier';
|
|
|
|
// `<el-select>` only observes its `required` attribute, so it reads `value`
|
|
// once during mount. Mirroring the value onto the element's `value` property
|
|
// after mount is what refreshes `<el-selectedcontent>` for later changes.
|
|
export default modifier((element, [value]) => {
|
|
if (value === undefined || value === null) {
|
|
element.removeAttribute('value');
|
|
return;
|
|
}
|
|
|
|
element.setAttribute('value', String(value));
|
|
|
|
queueMicrotask(() => {
|
|
if (element.isConnected && 'value' in element) {
|
|
element.value = value;
|
|
}
|
|
});
|
|
});
|