fix: bundle dbus.js in the pack and share logError via util.js

extension.js imports ./dbus.js, but gnome-extensions pack never bundled it,
so the packed extension (the EGO zip) was missing the module and would fail
to load. Add dbus.js and the new util.js to the pack sources.

util.js holds the shared logError helper, replacing the per-file copies in
extension.js and panel.js and the raw console.error calls in clipboardItem.js.
This commit is contained in:
Eduard Tolosa 2026-06-25 20:29:02 -05:00
parent c9f3b6b1ad
commit 3d41f39ad9
5 changed files with 20 additions and 17 deletions

View file

@ -6,6 +6,8 @@ import St from 'gi://St';
import Clutter from 'gi://Clutter';
import Gio from 'gi://Gio';
import { logError } from '../util.js';
const TEXT_PREVIEW_LEN = 140;
const THUMB_SIZE = 48;
@ -155,18 +157,18 @@ export const ClipboardItem = GObject.registerClass({
this._thumbCache?.set(id, cachePath);
applyStyle();
} catch (e) {
console.error('[Strata] Thumbnail write error:', e);
logError('Thumbnail write error', e);
this._fallbackIcon(container);
}
}
);
} catch (e) {
console.error('[Strata] Thumbnail fetch handler error:', e);
logError('Thumbnail fetch handler error', e);
this._fallbackIcon(container);
}
});
} catch (e) {
console.error('[Strata] Thumbnail render error:', e);
logError('Thumbnail render error', e);
this._fallbackIcon(container);
}
return container;