diff --git a/jey_layout/api.py b/jey_layout/api.py index 781aff1..45591dc 100644 --- a/jey_layout/api.py +++ b/jey_layout/api.py @@ -219,7 +219,16 @@ def _validate_config(cfg: dict) -> dict: if order: entry["order"] = order out_ws[ws_name] = entry - return {"version": 1, "workspaces": out_ws} + + out = {"version": 1, "workspaces": out_ws} + # Global block list: doctypes blocked anywhere (incl. ones not on /desk). + blocked_doctypes = [] + for dt in cfg.get("blocked_doctypes") or []: + if isinstance(dt, str) and dt and dt not in blocked_doctypes: + blocked_doctypes.append(dt) + if blocked_doctypes: + out["blocked_doctypes"] = blocked_doctypes + return out def _write(path: str, cfg: dict): diff --git a/jey_layout/public/css/jey_layout.css b/jey_layout/public/css/jey_layout.css index 6733f00..c38e3db 100644 --- a/jey_layout/public/css/jey_layout.css +++ b/jey_layout/public/css/jey_layout.css @@ -204,3 +204,31 @@ body.jey-edit .links-widget-box { outline: 1px dashed var(--border-color); outline-offset: 2px; } + +/* Block DocTypes dialog */ +.jey-blocked-row { + display: flex; + align-items: center; + gap: 8px; + padding: 5px 8px; + border: 1px solid var(--border-color); + border-radius: 6px; + margin-bottom: 6px; + font-size: 13px; +} +.jey-blocked-row .dt { + flex: 1; + font-weight: 500; +} +.jey-blocked-x { + border: none; + background: transparent; + cursor: pointer; + color: var(--red-500, #e24c4c); + font-size: 12px; + padding: 2px 6px; + border-radius: 5px; +} +.jey-blocked-x:hover { + background: var(--red-100, #fce4e4); +} diff --git a/jey_layout/public/js/jey_layout.js b/jey_layout/public/js/jey_layout.js index 3d144bb..d63ab24 100644 --- a/jey_layout/public/js/jey_layout.js +++ b/jey_layout/public/js/jey_layout.js @@ -80,6 +80,7 @@ const $fab = $(`