Changeset 0.37.5 (#217)
Co-authored-by: gobha <jasafpro@gmail.com> Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
@@ -237,6 +237,7 @@ export function createAuth() {
|
||||
window.location.href = base + '/login';
|
||||
},
|
||||
|
||||
_setAuth(data) { _setAuth(data); },
|
||||
_setRestClient(client) { _restClient = client; },
|
||||
_setEmit(fn) { _emit = fn; },
|
||||
};
|
||||
|
||||
@@ -93,10 +93,21 @@ export async function boot() {
|
||||
sw.pipe = pipe;
|
||||
sw.theme = theme;
|
||||
|
||||
// Shell helpers — imperative confirm/prompt backed by DialogStack
|
||||
// Shell helpers — imperative confirm/prompt backed by primitives
|
||||
sw.confirm = confirm;
|
||||
sw.prompt = prompt;
|
||||
|
||||
// Toast — dynamic import to avoid module resolution issues
|
||||
try {
|
||||
const toastMod = await import('../primitives/toast.js');
|
||||
sw.toast = toastMod.toast;
|
||||
events.on('toast', ({ message, variant, duration }) => {
|
||||
toastMod.toast(message, variant, duration);
|
||||
});
|
||||
} catch (e) {
|
||||
console.warn('[sw] Toast import failed:', e.message);
|
||||
}
|
||||
|
||||
// UserMenu render helper — surfaces call sw.userMenu(container, opts)
|
||||
sw.userMenu = function (container, opts = {}) {
|
||||
import('../shell/user-menu.js').then(({ UserMenu }) => {
|
||||
@@ -106,7 +117,7 @@ export async function boot() {
|
||||
};
|
||||
|
||||
// Marker for idempotency
|
||||
sw._sdk = '0.37.4';
|
||||
sw._sdk = '0.37.5';
|
||||
|
||||
// 8. Expose globally
|
||||
window.sw = sw;
|
||||
@@ -128,7 +139,7 @@ export async function boot() {
|
||||
// 10. Signal ready
|
||||
events.emit('sdk.ready', {}, { localOnly: true });
|
||||
document.dispatchEvent(new CustomEvent('sw:ready', { detail: { sw } }));
|
||||
console.log('[sw] SDK v0.37.4 ready');
|
||||
console.log('[sw] SDK v0.37.5 ready');
|
||||
|
||||
return sw;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user