mirror of
https://github.com/edu4rdshl/Strata.git
synced 2026-07-17 23:24:46 +00:00
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.
11 lines
357 B
JavaScript
11 lines
357 B
JavaScript
/* util.js - shared helpers for the Strata extension. */
|
|
|
|
import GLib from 'gi://GLib';
|
|
import Gio from 'gi://Gio';
|
|
|
|
export function logError(label, err) {
|
|
if (err instanceof GLib.Error)
|
|
Gio.DBusError.strip_remote_error(err);
|
|
const tail = err !== undefined ? `: ${err?.message ?? err}` : '';
|
|
console.error(`[Strata] ${label}${tail}`);
|
|
}
|