Files
devplacepy/devplacepy/static/css/project_files.css
T
retoor 97eb58fc19 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
2026-06-08 20:51:09 +00:00

227 lines
3.7 KiB
CSS

.pf-page {
display: flex;
flex-direction: column;
height: calc(100vh - 2rem);
min-height: 480px;
}
.pf-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
flex-wrap: wrap;
margin-bottom: 0.75rem;
padding-top: calc(var(--nav-height) + 0.5rem);
scroll-margin-top: calc(var(--nav-height) + 1rem);
}
.pf-toolbar .btn {
scroll-margin-top: calc(var(--nav-height) + 1rem);
}
.pf-toolbar {
display: flex;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
}
.pf-toolbar .btn {
padding: 0.35rem 0.75rem;
font-size: 0.8125rem;
}
.pf-status {
font-size: 0.8125rem;
color: var(--accent);
min-width: 4rem;
}
.pf-body {
display: flex;
flex: 1;
min-height: 0;
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
background: var(--bg-card);
}
.pf-tree {
width: 280px;
flex-shrink: 0;
overflow: auto;
padding: 0.5rem;
border-right: 1px solid var(--border);
background: var(--bg-card-hover);
}
.pf-tree-empty {
padding: 1rem;
font-size: 0.8125rem;
color: var(--text-muted);
}
.pf-tree-list {
list-style: none;
margin: 0;
padding: 0;
}
.pf-children {
padding-left: 1rem;
}
.pf-node.collapsed > .pf-children {
display: none;
}
.pf-node-row {
display: flex;
align-items: center;
gap: 0.4rem;
width: 100%;
padding: 0.25rem 0.4rem;
border: none;
background: none;
color: var(--text-secondary);
font-size: 0.8125rem;
text-align: left;
cursor: pointer;
border-radius: 4px;
}
.pf-node-row:hover {
background: var(--bg-card);
color: var(--text-primary);
}
.pf-node-row.active {
background: var(--accent);
color: #fff;
}
.pf-node-row.pf-selected {
background: var(--accent-light);
color: var(--text-primary);
}
.pf-node-row.pf-selected.active {
background: var(--accent);
color: #fff;
}
.pf-node-row.pf-dragging {
opacity: 0.5;
}
.pf-node-row.pf-dragover {
outline: 2px dashed var(--accent);
outline-offset: -2px;
background: var(--accent-light);
}
.pf-tree.pf-root-drop {
outline: 2px dashed var(--accent);
outline-offset: -4px;
}
.pf-root-row {
font-weight: 600;
color: var(--text-muted);
margin-bottom: 0.25rem;
}
.pf-label {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.pf-main {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
}
.pf-editor-wrap[hidden],
.pf-preview[hidden],
.pf-empty[hidden],
.pf-current[hidden] {
display: none;
}
.pf-current {
padding: 0.5rem 0.75rem;
font-size: 0.8125rem;
font-family: monospace;
color: var(--text-muted);
border-bottom: 1px solid var(--border);
min-height: 1.25rem;
}
.pf-editor-wrap {
flex: 1;
min-height: 0;
}
.pf-editor-wrap .CodeMirror {
height: 100%;
font-size: 0.9rem;
}
.pf-preview {
flex: 1;
overflow: auto;
padding: 1rem;
display: flex;
align-items: flex-start;
justify-content: center;
}
.pf-preview img,
.pf-preview video {
max-width: 100%;
max-height: 100%;
border-radius: var(--radius);
}
.pf-download {
color: var(--accent);
font-size: 0.9375rem;
}
.pf-empty {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-muted);
padding: 1rem;
text-align: center;
}
.pf-empty-inner {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
}
.pf-empty-icon {
font-size: 2.5rem;
opacity: 0.5;
}
.pf-empty-msg {
font-size: 0.875rem;
}
@media (max-width: 768px) {
.pf-tree {
width: 180px;
}
}