Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

fix: refresh assets gallery after deleting an upload

Paulo Castellanoa4f5c35ead4e
diff --git a/resources/js/components/assets/GalleryBrowser.vue b/resources/js/components/assets/GalleryBrowser.vue
index 20e7d6ea7..a49d2d434 100644
--- a/resources/js/components/assets/GalleryBrowser.vue
+++ b/resources/js/components/assets/GalleryBrowser.vue
@@ -264,6 +264,10 @@ const handleDelete = (assetId: string) => {
});
};
+const onAssetDeleted = async () => {
+ await loadUploadsFirstPage();
+};
+
const createPostFromAsset = (asset: AssetMedia) => {
router.post(storePost.url(), {
media: [{ id: asset.id, path: asset.path, url: asset.url, type: asset.type, mime_type: asset.mime_type }],
@@ -940,6 +944,7 @@ onUnmounted(() => {
:description="trans('assets.delete.description')"
:action="trans('assets.delete.confirm')"
:cancel="trans('assets.delete.cancel')"
+ @deleted="onAssetDeleted"
/>
<ImagePreviewDialog ref="lightbox" />