forked from retoor/devplacepy
docs: add block/mute user relations, emoji-sync CLI, and uid indexes
- Add `/block`, `/mute` endpoints with block/unblock and mute/unmute functionality in `routers/relations.py`, hiding blocked users' content everywhere except their own profile while muting only suppresses notifications - Introduce `devplace emoji-sync` CLI command to regenerate `static/js/emoji-shortcodes.js` from the emoji library, documented in `CLAUDE.md` and wired in `cli.py` - Create `get_blocked_uids()` database helper and apply it in `content.py` `load_detail()` to filter blocked users' posts from detail views - Implement `_uid_index()` and `_drop_index()` helpers in `database.py` for unique uid indexes across tables, with `user_relations` added to `SOFT_DELETE_TABLES` - Document new routes in `AGENTS.md` and `README.md`, including emoji shortcodes rendering behavior distinct from the emoji picker
This commit is contained in:
@@ -32,6 +32,7 @@ export class AppLightbox extends Component {
|
||||
overlay.className = "lightbox-overlay";
|
||||
overlay.setAttribute("role", "dialog");
|
||||
overlay.setAttribute("aria-modal", "true");
|
||||
overlay.setAttribute("aria-label", "Image viewer");
|
||||
overlay.innerHTML =
|
||||
'<button type="button" class="lightbox-close" aria-label="Close">×</button>' +
|
||||
'<img class="lightbox-image" src="" alt="">';
|
||||
@@ -53,6 +54,12 @@ export class AppLightbox extends Component {
|
||||
this.close();
|
||||
}
|
||||
});
|
||||
this.overlay.addEventListener("keydown", (e) => {
|
||||
if (e.key === "Tab" && this.overlay.classList.contains("visible")) {
|
||||
e.preventDefault();
|
||||
this.closeBtn.focus();
|
||||
}
|
||||
});
|
||||
document.addEventListener("click", (e) => {
|
||||
const thumb = e.target.closest("img[data-lightbox]");
|
||||
if (!thumb || thumb.closest("a")) return;
|
||||
|
||||
Reference in New Issue
Block a user