AOSSIE-Org / AOSSIE-Org/PictoPy

Feat: Image Deletion, Undo System & Trash(Recently deleted) and restore

未關閉
#795 8 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
needs-triage
主要語言
Python
星號
283
分支
679
平均合併
7 天 2 小時
30 天內合併 PR
3

描述

### Describe the feature

Image

## Overview
PictoPy currently lacks a direct image-level deletion workflow and provides no
undo mechanism for destructive actions. This feature proposes a safe image
deletion system with undo support and lightweight action history tracking.

---

## Problem
Currently:
- No direct image delete option exists in the gallery UI
- Image removal is mostly handled indirectly via albums
- Database-level deletion performs irreversible hard deletes
- No undo or action history is available

This makes image management inconsistent and risky, especially for accidental
or bulk actions.

---

## Proposed Solution

### 🗑️ Image Deletion
- Introduce a **gallery-level image delete option**
- Support **single and bulk image deletion**
- Replace hard deletes with **soft delete** (`deleted_at` / `is_deleted`)
- Ensure deleted images are removed from albums and related metadata

### ↩️ Undo Support
- Allow users to undo recent destructive actions
- Initial scope:
- Image deletion
- Image removal from albums
- Undo can be limited to recent actions (time-based or count-based)

### 📚 Recently Deleted
All the deleted image store in trash and from here user can restore it or delete permanently .
else the image will deleted after 30 days automatically.

---

## Suggested API Design (Indicative)

DELETE /images/{image_id}
POST /images/bulk-delete
POST /images/{image_id}/restore
POST /actions/undo
GET /actions/history

### Willingness to Work
@rahulharpal1603 sir I would like to work on implementing this feature.

### Add ScreenShots

There is not undo support and deletion feature in the frontend or backend .

### Record

- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue

### Checklist before Submitting.

- [ ] Have you updated docs for it?.
- [ ] Have you added unit tests?.
- [ ] Have you made sure unit tests pass?
- [ ] Have you made sure code formatting is correct?
- [ ] Does it contain any style related issues?

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。