forked from retoor/devplacepy
feat: add project file system with CRUD, upload, inline editing, and video attachment support
- Add new `/projects/{slug}/files` endpoint group for per-project filesystem operations including directory and file CRUD, upload, and inline editing with public read and owner write access
- Extend attachment system to support video formats (webm, ogv, mov, m4v) with proper file icons and MIME types
- Implement configurable allowed file types via `allowed_file_types` site setting, replacing hardcoded `ALLOWED_UPLOAD_TYPES` with dynamic `allowed_extensions()` and `is_extension_allowed()` functions
- Add `delete_all_project_files()` call in `delete_content_item()` to clean up project files when a project is deleted
- Create database indexes on `project_files` table for `(project_uid, path)` and `(project_uid, parent_path)` to optimize file lookups
- Introduce `docs_prose.py` module with `render_prose()` function that renders Markdown content inside `data-render` divs using mistune, enabling dynamic prose rendering in documentation pages
- Enhance docs search with Markdown-aware text stripping (`_demarkdown()`) and improved HTML/script/style sanitization for better search indexing
- Update documentation API samples to reflect new attachment response fields (`is_image`, `is_video`, `mime_type`) and note video format support
- Update README to document the new project files endpoint and clarify AI gateway attribution for guest Devii sessions
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
<div class="docs-content" data-render>
|
||||
# emoji-picker
|
||||
|
||||
A vendored third-party emoji picker (`emoji-picker-element`) with category browsing, search, and
|
||||
skin-tone selection. DevPlace loads it globally and uses it on comment forms via the
|
||||
`EmojiPicker` wrapper (textareas marked `.emoji-picker-target`).
|
||||
|
||||
Source: `static/vendor/emoji-picker-element/`.
|
||||
|
||||
## Attributes
|
||||
|
||||
| Attribute | Description |
|
||||
|---|---|
|
||||
| `locale` | Language for emoji labels (for example `en`). |
|
||||
| `skin-tone-emoji` | Default skin-tone emoji. |
|
||||
| `emoji-version` | Restrict to a Unicode emoji version. |
|
||||
|
||||
## Events
|
||||
|
||||
| Event | Detail |
|
||||
|---|---|
|
||||
| `emoji-click` | `{ unicode, emoji, ... }` for the chosen emoji (primary event). |
|
||||
| `skin-tone-change` | The selected skin tone. |
|
||||
|
||||
## Usage
|
||||
|
||||
```html
|
||||
<emoji-picker></emoji-picker>
|
||||
```
|
||||
|
||||
```javascript
|
||||
picker.addEventListener("emoji-click", (event) => {
|
||||
insert(event.detail.unicode);
|
||||
});
|
||||
```
|
||||
</div>
|
||||
|
||||
<div class="component-demo">
|
||||
<div class="component-demo-title">Live example - pick an emoji</div>
|
||||
<div class="component-demo-stage">
|
||||
<emoji-picker></emoji-picker>
|
||||
<span id="emoji-demo-result" class="text-muted">No emoji selected yet.</span>
|
||||
</div>
|
||||
</div>
|
||||
<script type="module">
|
||||
import "/static/vendor/emoji-picker-element/index.js";
|
||||
const result = document.getElementById("emoji-demo-result");
|
||||
document.querySelector(".component-demo emoji-picker").addEventListener("emoji-click", (event) => {
|
||||
result.textContent = `Selected: ${event.detail.unicode}`;
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user