Files
Owen 14e2f3bb77 Bulk multi-select actions, barcode format, batch printing, site name on login
Multi-select (Ctrl/Cmd+click toggle, Shift+click range, right-click the
active selection for bulk actions - same conventions as a native file
manager):
- Print Labels (N) / Export CSV (N) for any mix of individually-picked
  assets and whole folders. Labels/export now take asset_ids/folder_ids
  instead of a single asset_id/folder_id.
- Edit Status..., Check Out..., Duplicate, Move to..., and Delete, bulk
  versions of the existing single-asset actions. Checkout/Move modals
  were generalized to accept an array of ids instead of just one; status
  editing got its own lightweight POST /app/assets/{id}/status endpoint
  (assets.SetStatus) so a bulk status change doesn't need to resend every
  other field the way a full PATCH would.

Labels:
- Choose QR (a /scan/<tag> URL, for a phone camera) or Code128 barcode
  (the bare Asset ID, for a USB scanner typing into the search box) via a
  format selector on the print page. New barcodeDataURI using
  github.com/boombuler/barcode alongside the existing QR generator.
- "Start at #" lets printing resume partway into an already-used sheet
  instead of wasting it on a fresh one.
- Added the Avery 5260 label template (same grid as 5160, rounded
  corners, so it isn't flagged approximate).

Also: the configured Site Name now shows on the login page too, not just
the authenticated navbar.
2026-08-17 17:12:17 -05:00

268 lines
4.4 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;
}
/* Ctrl/Shift-click multi-selection (right-click one of these for bulk
actions). Distinct from .selected, which marks the single item shown in
the main panel - a row can carry both at once. */
.tree-row.multi-selected {
background-color: #fff3cd;
outline: 1px solid #ffe69c;
outline-offset: -1px;
}
.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;
}
.panel-content {
max-width: 1100px;
}
.panel-blank {
max-width: none;
}
/* Icon picker: a searchable dropdown of common Bootstrap Icons, standing
in for a free-text icon class field. */
.icon-picker {
position: relative;
}
.icon-picker-toggle {
display: flex;
align-items: center;
gap: 0.5rem;
text-align: left;
}
.icon-picker-preview {
font-size: 1.1rem;
width: 1.1rem;
flex-shrink: 0;
}
.icon-picker-label {
flex: 1 1 auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.icon-picker-caret {
flex-shrink: 0;
font-size: 0.75rem;
color: #6c757d;
}
.icon-picker-menu {
display: none;
position: absolute;
z-index: 1085;
top: 100%;
left: 0;
margin-top: 0.25rem;
width: 280px;
max-width: 90vw;
background-color: #fff;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 0.375rem;
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
padding: 0.5rem;
}
.icon-picker-menu.show {
display: block;
}
.icon-picker-grid {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 0.25rem;
max-height: 190px;
overflow-y: auto;
margin-top: 0.5rem;
}
.icon-picker-item {
border: 1px solid transparent;
background: none;
border-radius: 0.25rem;
padding: 0.4rem;
font-size: 1.1rem;
display: flex;
align-items: center;
justify-content: center;
color: #212529;
}
.icon-picker-item:hover,
.icon-picker-item:focus {
background-color: #f1f3f5;
border-color: rgba(0, 0, 0, 0.1);
}
.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;
}
}