perf(runner): support asynchronous plugin result handling, improvements on ResultWidget

This commit is contained in:
retrozinndev
2025-10-31 16:46:13 -03:00
parent 9ec7b8a8be
commit a894f10edb
5 changed files with 165 additions and 61 deletions
+9
View File
@@ -60,6 +60,15 @@ export function escapeSpecialCharacters(str: string): string {
return str.replace(/[\\^$.*?()[\]{}|]/g, "\\$&");
}
/** translate paths with environment variables in it to absolute paths */
export function translateDirWithEnvironment(path: string): string {
path = path.replace(/^[~]/, GLib.get_home_dir());
return path.split('/').map(part => /^\$/.test(part) ?
GLib.getenv(part.replace(/^\$/, "")) ?? part
: part).join('/');
}
export function getChildren(widget: Gtk.Widget): Array<Gtk.Widget> {
const firstChild = widget.get_first_child(),
children: Array<Gtk.Widget> = [];