|
|
|
@ -205,8 +205,8 @@ export function buildPageWidgetPicker(
|
|
|
|
|
// If savePromise throws an error, before or after timeout, we let the error propagate as it
|
|
|
|
|
// should be handle by the caller.
|
|
|
|
|
if (await isLongerThan(savePromise, DELAY_BEFORE_SPINNER_MS)) {
|
|
|
|
|
const widget = getWidgetTypes(type);
|
|
|
|
|
const label = getWidgetTypesLabelTranslation(widget);
|
|
|
|
|
const widgetInfo = getWidgetTypes(type);
|
|
|
|
|
const label = getWidgetTypesLabelTranslation(widgetInfo);
|
|
|
|
|
await spinnerModal(t("Building {{- label}} widget", { label }), savePromise);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -318,12 +318,12 @@ export class PageWidgetSelect extends Disposable {
|
|
|
|
|
cssPanel(
|
|
|
|
|
header(t("Select Widget")),
|
|
|
|
|
sectionTypes.map((value) => {
|
|
|
|
|
const widget = getWidgetTypes(value);
|
|
|
|
|
const tLabel = getWidgetTypesLabelTranslation(widget);
|
|
|
|
|
const widgetInfo = getWidgetTypes(value);
|
|
|
|
|
const tLabel = getWidgetTypesLabelTranslation(widgetInfo);
|
|
|
|
|
const disabled = computed(this._value.table, (use, tid) => this._isTypeDisabled(value, tid));
|
|
|
|
|
return cssEntry(
|
|
|
|
|
dom.autoDispose(disabled),
|
|
|
|
|
cssTypeIcon(widget.icon),
|
|
|
|
|
cssTypeIcon(widgetInfo.icon),
|
|
|
|
|
tLabel,
|
|
|
|
|
dom.on('click', () => !disabled.get() && this._selectType(value)),
|
|
|
|
|
cssEntry.cls('-selected', (use) => use(this._value.type) === value),
|
|
|
|
|