The tree and main panels now behave like a native file manager: right click (or the keyboard Menu key) on a folder, asset, breadcrumb crumb, or empty tree/panel background brings up the relevant actions instead of a row of always-visible buttons. - New generic showContextMenu() in app.js with per-target-kind menu builders (folder/asset/tree background/panel background), gated by admin role the same way the old buttons were. - Removed: the "..." tree-row action button, and the New Folder/Add Asset/Rename/Delete/Edit/Move/Duplicate/Import/Export buttons from the inventory toolbar and every panel. Expand All/Collapse All shrank to two icon-only buttons next to the search box; everything else creation- or mutation-related is right-click only. - Replaced the per-asset embedded "Move" modal with one shared #moveAssetModal populated via a new GET /app/folders/options endpoint, since move can now be triggered from any asset row, not just its own detail view. - Breadcrumb crumbs (including the current folder) and folder/asset table rows are now valid right-click targets too, not just tree rows.
191 lines
2.9 KiB
CSS
191 lines
2.9 KiB
CSS
:root {
|
|
--tree-indent: 1.15rem;
|
|
}
|
|
|
|
body {
|
|
background-color: #f7f8fa;
|
|
}
|
|
|
|
.app-navbar {
|
|
background-color: #fff;
|
|
}
|
|
|
|
.login-body {
|
|
min-height: 100vh;
|
|
background: linear-gradient(180deg, #eef1f6 0%, #f7f8fa 100%);
|
|
}
|
|
|
|
/* Admin-only UI: shown only when <body> carries the role-admin class. */
|
|
.admin-only { display: none !important; }
|
|
body.role-admin .admin-only { display: inherit !important; }
|
|
body.role-admin button.admin-only,
|
|
body.role-admin a.admin-only { display: inline-block !important; }
|
|
|
|
.inventory-shell {
|
|
height: calc(100vh - 56px);
|
|
min-height: 480px;
|
|
}
|
|
|
|
.tree-pane {
|
|
width: 340px;
|
|
min-width: 260px;
|
|
max-width: 45vw;
|
|
background-color: #fff;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.tree-scroll {
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.main-panel {
|
|
background-color: #fff;
|
|
}
|
|
|
|
ul.tree, ul.tree-children {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding-left: 0;
|
|
}
|
|
|
|
ul.tree-children {
|
|
padding-left: var(--tree-indent);
|
|
}
|
|
|
|
.tree-node-root > .tree-row {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.tree-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.35rem;
|
|
padding: 0.2rem 0.4rem;
|
|
border-radius: 0.25rem;
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
user-select: none;
|
|
}
|
|
|
|
.tree-row:hover {
|
|
background-color: #f1f3f5;
|
|
}
|
|
|
|
.tree-row.selected {
|
|
background-color: #e7f1ff;
|
|
color: #0d6efd;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.tree-row.drop-target {
|
|
outline: 2px dashed #0d6efd;
|
|
outline-offset: -2px;
|
|
background-color: #e7f1ff;
|
|
}
|
|
|
|
.tree-row-more {
|
|
cursor: default;
|
|
}
|
|
|
|
.tree-toggle {
|
|
border: none;
|
|
background: none;
|
|
padding: 0;
|
|
width: 1.1rem;
|
|
height: 1.1rem;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
color: #6c757d;
|
|
}
|
|
|
|
.tree-toggle i {
|
|
transition: transform 0.12s ease;
|
|
}
|
|
|
|
.tree-toggle.expanded i {
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
.tree-toggle-spacer {
|
|
width: 1.1rem;
|
|
flex-shrink: 0;
|
|
display: inline-block;
|
|
}
|
|
|
|
.tree-icon {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.tree-label {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
flex: 1 1 auto;
|
|
}
|
|
|
|
.tree-status-badge {
|
|
font-size: 0.65rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.tree-node.dragging {
|
|
opacity: 0.4;
|
|
}
|
|
|
|
/* Generic right-click context menu (tree + panels feel like a native app:
|
|
most actions live here instead of on-screen buttons). */
|
|
.ctx-menu {
|
|
position: fixed;
|
|
z-index: 1080;
|
|
min-width: 190px;
|
|
display: none;
|
|
}
|
|
|
|
.ctx-menu .dropdown-item i {
|
|
width: 1.1rem;
|
|
display: inline-block;
|
|
text-align: center;
|
|
margin-right: 0.15rem;
|
|
}
|
|
|
|
[data-context="asset-header"],
|
|
[data-context="folder-header"] {
|
|
cursor: default;
|
|
}
|
|
|
|
.stat-card .card-body {
|
|
text-align: center;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 1.4rem;
|
|
font-weight: 600;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 0.75rem;
|
|
color: #6c757d;
|
|
}
|
|
|
|
.panel-content {
|
|
max-width: 1100px;
|
|
}
|
|
|
|
.asset-row, .folder-link, .asset-link {
|
|
cursor: pointer;
|
|
}
|
|
|
|
@media (max-width: 767.98px) {
|
|
.inventory-shell {
|
|
flex-direction: column;
|
|
height: auto;
|
|
}
|
|
.tree-pane {
|
|
width: 100%;
|
|
max-width: 100%;
|
|
max-height: 40vh;
|
|
}
|
|
}
|