atlus/frontend/css/apps/packages.css
roberts 9c402e3726 Add package manager, text editor, file manager enhancements, auto-updates
Package Manager (new app):
- Search, install, remove apt packages via web UI
- Backend: apt-cache/dpkg-query/apt-get wrapper with input validation
- Frontend: searchable package list with expandable detail panels

Text Editor / File Viewer (new app):
- Opens from file manager, supports text editing with line numbers
- Image preview via authenticated blob URLs
- Binary file info display with download option
- Ctrl+S / Cmd+S save, dirty tracking, tab key support

File Manager enhancements:
- Toolbar: New File, New Folder, Upload, Delete, Refresh buttons
- Context menu: New File/Folder options, Open in Editor
- Double-click files to open in editor
- Right-click empty area for create options

Auto-update notification:
- Backend checks git repo for new commits (fetch + compare)
- One-click update: git pull + pip install + service restart
- Toast notification in right panel with dismiss option
- Polls every 30 minutes, retry logic for server restart

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 19:13:13 -05:00

262 lines
4.7 KiB
CSS

/* Package Manager app styles */
.app-packages {
display: flex;
flex-direction: column;
height: 100%;
}
.pkg-toolbar {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
background: var(--bg-titlebar);
border-bottom: 1px solid var(--border-structural);
min-height: 48px;
}
.pkg-search {
flex: 1;
height: 36px;
padding: 0 12px;
background: var(--bg-input);
border: 1px solid var(--border-structural);
border-radius: var(--radius-md);
color: var(--text-primary);
font-family: var(--font-mono);
font-size: 13px;
outline: none;
}
.pkg-search:focus {
border-color: var(--accent);
}
.pkg-search::placeholder {
color: var(--text-muted);
}
.pkg-cache-btn {
height: 36px;
padding: 0 14px;
background: var(--bg-titlebar);
border: 1px solid var(--border-structural);
border-radius: var(--radius-md);
color: var(--text-primary);
font-family: var(--font-ui);
font-size: 13px;
cursor: pointer;
white-space: nowrap;
flex-shrink: 0;
}
.pkg-cache-btn:hover {
background: var(--accent-hover);
}
.pkg-cache-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Results list */
.pkg-list {
flex: 1;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.pkg-empty,
.pkg-loading,
.pkg-error {
padding: 24px;
text-align: center;
font-family: var(--font-mono);
font-size: 13px;
color: var(--text-muted);
}
.pkg-error {
color: var(--status-red);
}
/* Package row */
.pkg-row {
border-bottom: 1px solid var(--border-structural);
}
.pkg-row-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
cursor: pointer;
transition: background var(--transition-fast);
min-height: 48px;
gap: 12px;
}
.pkg-row-header:hover {
background: var(--accent-hover);
}
.pkg-row.expanded .pkg-row-header {
background: var(--accent-dim);
}
.pkg-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.pkg-name {
font-family: var(--font-mono);
font-size: 14px;
font-weight: 500;
color: var(--text-primary);
}
.pkg-summary {
font-family: var(--font-ui);
font-size: 12px;
color: var(--text-secondary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.pkg-expand-icon {
color: var(--text-muted);
font-size: 12px;
flex-shrink: 0;
width: 16px;
text-align: center;
}
/* Package detail */
.pkg-detail {
padding: 0 16px 16px;
background: var(--bg-dock);
border-top: 1px solid var(--border-structural);
}
.pkg-detail-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 12px 0;
flex-wrap: wrap;
}
.pkg-detail-version {
font-family: var(--font-mono);
font-size: 13px;
color: var(--text-secondary);
}
.pkg-badge {
display: inline-block;
padding: 2px 8px;
border-radius: 10px;
font-family: var(--font-mono);
font-size: 11px;
font-weight: 500;
margin-left: 8px;
}
.pkg-badge.installed {
background: rgba(58, 184, 106, 0.15);
color: var(--status-green);
}
.pkg-badge.not-installed {
background: var(--border-structural);
color: var(--text-muted);
}
.pkg-detail-actions {
flex-shrink: 0;
}
.pkg-action-btn {
height: 32px;
padding: 0 16px;
border: none;
border-radius: var(--radius-sm);
font-family: var(--font-ui);
font-size: 13px;
font-weight: 500;
cursor: pointer;
}
.pkg-action-btn.install {
background: var(--accent);
color: #fff;
}
.pkg-action-btn.install:hover {
opacity: 0.9;
}
.pkg-action-btn.remove {
background: var(--status-red);
color: #fff;
}
.pkg-action-btn.remove:hover {
opacity: 0.9;
}
.pkg-action-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.pkg-detail-desc {
font-family: var(--font-ui);
font-size: 13px;
color: var(--text-primary);
line-height: 1.5;
padding: 8px 0;
white-space: pre-wrap;
}
.pkg-detail-meta {
display: flex;
flex-wrap: wrap;
gap: 16px;
padding: 4px 0;
font-family: var(--font-mono);
font-size: 11px;
color: var(--text-secondary);
}
.pkg-detail-deps {
font-family: var(--font-mono);
font-size: 11px;
color: var(--text-secondary);
padding: 4px 0;
word-break: break-word;
}
.pkg-deps-label {
color: var(--text-muted);
font-weight: 500;
}
/* Status bar */
.pkg-status {
padding: 6px 16px;
background: var(--bg-titlebar);
border-top: 1px solid var(--border-structural);
font-family: var(--font-mono);
font-size: 11px;
color: var(--text-muted);
min-height: 28px;
display: flex;
align-items: center;
}