momolulu 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.js +15 -7
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -458,13 +458,21 @@ window.__ModuleLoader__.load({
|
|
|
458
458
|
ctx.inject(['commandUi'], (scope) => {
|
|
459
459
|
const commandUi = scope.get('commandUi');
|
|
460
460
|
if (commandUi === undefined) return;
|
|
461
|
-
scope.effect(() =>
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
461
|
+
scope.effect(() => {
|
|
462
|
+
try {
|
|
463
|
+
return commandUi.register({
|
|
464
|
+
name: 'focus',
|
|
465
|
+
label: () => t('focusCommand'),
|
|
466
|
+
description: () => t('focusCommandHint'),
|
|
467
|
+
available: () => true,
|
|
468
|
+
ui: { kind: 'action', run: () => { if (state.status === 'running') pause(); else startFocused(); } },
|
|
469
|
+
});
|
|
470
|
+
} catch (error) {
|
|
471
|
+
// A host /focus command or another plugin may already own the name; the widget still works without it.
|
|
472
|
+
console.warn('momolulu: /focus command unavailable', error);
|
|
473
|
+
return () => {};
|
|
474
|
+
}
|
|
475
|
+
}, 'momolulu /focus command');
|
|
468
476
|
});
|
|
469
477
|
ctx.slots.inject('sidebar.panellist', () => ctx.slots.register({ name: 'sidebar.panellist', id: 'lumululu-mei', order: 18, label: () => t('title') }, Icon));
|
|
470
478
|
ctx.slots.inject('main', () => ctx.slots.register({ name: 'main', key: 'lumululu-mei' }, (props) => h(Companion, { ...props, panelMode: true })));
|
package/package.json
CHANGED