fix: sharing notification click opening directories

This commit is contained in:
jelveh
2024-11-20 15:44:17 -08:00
parent 505865f3bf
commit bfacfc2a4e
+25
View File
@@ -243,6 +243,18 @@ async function UIDesktop(options){
}),
});
},
click: async (notif) => {
if(notification.template === "file-shared-with-you"){
let item_path = '/' + notification.fields?.username;
UIWindow({
path: '/' + notification.fields?.username,
title: path.basename(item_path),
icon: await item_icon({is_dir: true, path: item_path}),
is_dir: true,
app: 'explorer',
});
}
},
});
}
});
@@ -1306,6 +1318,19 @@ async function UIDesktop(options){
}
notification.icon = icon;
notification.click = async (notif) => {
if(notification.template === "file-shared-with-you"){
let item_path = '/' + notification.fields?.username;
UIWindow({
path: '/' + notification.fields?.username,
title: path.basename(item_path),
icon: await item_icon({is_dir: true, path: item_path}),
is_dir: true,
app: 'explorer',
});
}
}
UINotification(notification);
})
}