mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-17 04:45:33 -08:00
Open any picture thumbnail in the shared picview
AI Assisted
This commit is contained in:
1 parent
1eef797dc0
commit
c26759fd88
10 files changed
+495
-254
No files matched your search
@@ -3,6 +3,8 @@
|
||||
|
||||
/* The top bar's Notebook button: drawn and lit like the Subagents button. */
|
||||
.notepad-btn { border-color: var(--rule-2); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
|
||||
/* `hidden` loses to the display above without this (agent-less sessions hide it). */
|
||||
.notepad-btn[hidden] { display: none; }
|
||||
.btn.notepad-btn { padding: 0 8px; align-self: stretch; }
|
||||
.notepad-btn .notepad-label { font-size: 13px; line-height: 1; }
|
||||
.notepad-btn .np-band { fill: var(--ink-2); stroke: none; }
|
||||
@@ -78,22 +80,10 @@
|
||||
background: var(--accent-soft);
|
||||
}
|
||||
|
||||
/* One thumbnail: the picture is a button that opens the preview, with the
|
||||
tray's round X in its corner, and the inline delete question or the upload
|
||||
state laid over it. */
|
||||
/* One thumbnail: the picture is a button that opens the picview (the shared
|
||||
.attach-open in shell.css), with the tray's round X in its corner, and the
|
||||
inline delete question or the upload state laid over it. */
|
||||
.notepad-thumb.attach-thumb { width: 88px; height: 88px; }
|
||||
.notepad-thumb-open {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: none;
|
||||
cursor: zoom-in;
|
||||
}
|
||||
.notepad-thumb-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
|
||||
.notepad-thumb.is-uploading .notepad-thumb-open,
|
||||
.notepad-thumb.is-failed .notepad-thumb-open { cursor: default; }
|
||||
.notepad-thumb .attach-overlay p { margin: 0; padding: 0 4px; }
|
||||
.notepad-thumb .attach-overlay .btn.tiny { margin: 0; padding: 1px 6px; font-size: 10.5px; }
|
||||
.notepad-ask {
|
||||
@@ -102,68 +92,6 @@
|
||||
}
|
||||
.notepad-ask-row { display: flex; gap: 4px; }
|
||||
|
||||
/* The full-screen preview: the whole viewport, the picture contained in it,
|
||||
on a near-black backdrop in both themes (a picture is judged against dark,
|
||||
whatever the page's theme), so its colors are fixed, not tokens. */
|
||||
.modal.notepad-preview {
|
||||
inset: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
max-width: none;
|
||||
max-height: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
color: #f4f1ec;
|
||||
}
|
||||
.modal.notepad-preview[open] {
|
||||
display: grid;
|
||||
grid-template-columns: 72px minmax(0, 1fr) 72px;
|
||||
grid-template-rows: minmax(0, 1fr) auto;
|
||||
}
|
||||
.modal.notepad-preview::backdrop { background: rgba(8, 8, 8, 0.92); }
|
||||
.notepad-preview-img {
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
place-self: center;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
padding-top: 24px;
|
||||
}
|
||||
.notepad-preview-step {
|
||||
grid-row: 1;
|
||||
place-self: center;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
padding: 0;
|
||||
border: 1px solid rgba(255, 255, 255, 0.35);
|
||||
border-radius: 50%;
|
||||
background: rgba(0, 0, 0, 0.45);
|
||||
color: #fff;
|
||||
font: 600 28px/1 var(--sans);
|
||||
cursor: pointer;
|
||||
}
|
||||
.notepad-preview-step.is-prev { grid-column: 1; }
|
||||
.notepad-preview-step.is-next { grid-column: 3; }
|
||||
.notepad-preview-step:hover,
|
||||
.notepad-preview-step:focus-visible { border-color: #fff; background: rgba(255, 255, 255, 0.14); }
|
||||
.notepad-preview-step[hidden] { display: none; }
|
||||
.notepad-preview-bar {
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 16px;
|
||||
padding: 12px 16px 20px;
|
||||
}
|
||||
.notepad-preview-count { margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, 0.8); }
|
||||
.btn.notepad-preview-close { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.35); color: #fff; }
|
||||
.btn.notepad-preview-close:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
|
||||
.modal.notepad .modal-actions { flex: none; align-items: center; margin-top: 14px; }
|
||||
.notepad-status { margin: 0 auto 0 0; min-height: 1.4em; font-size: 12.5px; color: var(--ink-3); }
|
||||
.notepad-status.is-problem { color: var(--warn); }
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
.modal.notepad { width: 100%; height: 100%; margin: 0; padding: 18px 16px 16px; border: 0; border-radius: 0; }
|
||||
.modal.notepad .notepad-add,
|
||||
.modal.notepad .modal-actions .btn,
|
||||
.btn.notepad-preview-close { min-height: 44px; }
|
||||
.btn.picview-close { min-height: 44px; }
|
||||
.notepad-images { flex-direction: column; align-items: stretch; }
|
||||
.notepad-tabbar { flex-wrap: wrap; }
|
||||
.modal.notepad .notepad-tab-new,
|
||||
@@ -70,7 +70,7 @@
|
||||
.notepad-tab-x { width: 32px; }
|
||||
.notepad-add { align-self: flex-start; }
|
||||
.notepad-thumb .notepad-thumb-delete { width: 30px; height: 30px; font-size: 18px; }
|
||||
.modal.notepad-preview[open] { grid-template-columns: 52px minmax(0, 1fr) 52px; }
|
||||
.modal.picview[open] { grid-template-columns: 52px minmax(0, 1fr) 52px; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
@@ -95,26 +95,10 @@
|
||||
#btn-send { animation: none; }
|
||||
}
|
||||
|
||||
/* User Preferences: the launcher's model menu. */
|
||||
.models-note { font-size: 0.9em; opacity: 0.85; }
|
||||
.models-note p, .models-note ul { margin: 0 0 6px; }
|
||||
.models-note ul { padding-left: 18px; }
|
||||
.models-list { display: grid; gap: 4px; max-height: 160px; overflow: auto; }
|
||||
.models-list:empty { display: none; }
|
||||
.models-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
|
||||
.models-row.locked { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); font-size: 0.88em; opacity: 0.75; }
|
||||
.models-row input { min-width: 0; }
|
||||
/* User Preferences: action rows (Cleanup's scan/delete buttons share this
|
||||
class; the model menu's own rules moved to agents.css). */
|
||||
.models-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
||||
.models-actions .help.error { color: var(--danger, #d64545); }
|
||||
.agent-field { display: grid; gap: 4px; min-width: 0; }
|
||||
.agent-field > span, .agent-field > label { font-size: 0.85em; opacity: 0.85; }
|
||||
.agent-rows { display: grid; gap: 4px; }
|
||||
.agent-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
|
||||
.agent-row.model { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
|
||||
.agent-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
||||
.agent-foot .help { margin: 0; }
|
||||
.agent-foot .agent-test-result { flex: 1 1 auto; }
|
||||
.agent-error { margin: 0; color: var(--danger, #d64545); font-size: 0.9em; }
|
||||
|
||||
/* User Preferences: Cleanup's list of what would go, shown before anything
|
||||
is deleted. */
|
||||
|
||||
@@ -404,10 +404,10 @@ h1 {
|
||||
.aside-empty { color: var(--ink-3); font-size: 13px; font-style: italic; }
|
||||
|
||||
/* The note box takes whatever height the panel has left, never under 160px.
|
||||
Scoped here so the page-wide textarea minimum still holds everywhere else. */
|
||||
Scoped here so the page-wide box minimum still holds everywhere else. */
|
||||
.aside { display: flex; flex-direction: column; }
|
||||
.aside > .field { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 0; }
|
||||
.aside textarea { flex: 1 1 auto; min-height: 160px; resize: vertical; }
|
||||
.aside .md-host { flex: 1 1 auto; min-height: 160px; resize: vertical; }
|
||||
|
||||
.aside.is-dropping {
|
||||
outline: 2px dashed var(--accent);
|
||||
@@ -426,6 +426,20 @@ h1 {
|
||||
flex: none;
|
||||
}
|
||||
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||||
/* The picture in a thumbnail is a button that opens the picview, with the
|
||||
tray's round X in its corner and the upload state laid over it. */
|
||||
.attach-open {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: none;
|
||||
cursor: zoom-in;
|
||||
}
|
||||
.attach-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
|
||||
.attach-thumb.is-uploading .attach-open,
|
||||
.attach-thumb.is-failed .attach-open { cursor: default; }
|
||||
.attach-remove {
|
||||
position: absolute; top: 3px; right: 3px; z-index: 2;
|
||||
width: 20px; height: 20px; padding: 0;
|
||||
@@ -470,6 +484,73 @@ h1 {
|
||||
.attach-link { color: inherit; text-decoration: none; border-radius: 8px; }
|
||||
.attach-link:hover .attach-thumb, .attach-link:focus-visible .attach-thumb { border-color: var(--accent); }
|
||||
.attach-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
/* The same hover border a linked thumbnail gets, for a thumbnail whose own
|
||||
button opens the picview. */
|
||||
.attach-thumb:has(.attach-open:hover) { border-color: var(--accent); }
|
||||
|
||||
/* The full-screen picture preview: the whole viewport, the picture contained
|
||||
in it, on a near-black backdrop in both themes (a picture is judged against
|
||||
dark, whatever the page's theme), so its colors are fixed, not tokens. */
|
||||
.modal.picview {
|
||||
inset: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
max-width: none;
|
||||
max-height: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
color: #f4f1ec;
|
||||
}
|
||||
.modal.picview[open] {
|
||||
display: grid;
|
||||
grid-template-columns: 72px minmax(0, 1fr) 72px;
|
||||
grid-template-rows: minmax(0, 1fr) auto;
|
||||
}
|
||||
.modal.picview::backdrop { background: rgba(8, 8, 8, 0.92); }
|
||||
.picview-img {
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
place-self: center;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
padding-top: 24px;
|
||||
}
|
||||
.picview-step {
|
||||
grid-row: 1;
|
||||
place-self: center;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
padding: 0;
|
||||
border: 1px solid rgba(255, 255, 255, 0.35);
|
||||
border-radius: 50%;
|
||||
background: rgba(0, 0, 0, 0.45);
|
||||
color: #fff;
|
||||
font: 600 28px/1 var(--sans);
|
||||
cursor: pointer;
|
||||
}
|
||||
.picview-step.is-prev { grid-column: 1; }
|
||||
.picview-step.is-next { grid-column: 3; }
|
||||
.picview-step:hover,
|
||||
.picview-step:focus-visible { border-color: #fff; background: rgba(255, 255, 255, 0.14); }
|
||||
.picview-step[hidden] { display: none; }
|
||||
.picview-bar {
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 16px;
|
||||
padding: 12px 16px 20px;
|
||||
}
|
||||
.picview-count { margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, 0.8); }
|
||||
.btn.picview-close { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.35); color: #fff; }
|
||||
.btn.picview-close:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
|
||||
|
||||
.msg.pending { border-style: dashed; border-color: var(--stage); background: transparent; }
|
||||
.ask-row .attach-chip { padding-right: 10px; }
|
||||
|
||||
@@ -547,8 +628,8 @@ kbd {
|
||||
}
|
||||
.waiting-pane h2 { font: 600 23px/1.3 var(--serif); color: var(--ink); margin: 0; }
|
||||
.waiting-pane p { max-width: 70ch; margin: 0; }
|
||||
/* The words that open the tasks tab: bold in the highlight color, a button
|
||||
that reads as part of the sentence. */
|
||||
/* The words that open the live task view (the phase-file tab on a build):
|
||||
bold in the highlight color, a button that reads as part of the sentence. */
|
||||
.waiting-jump {
|
||||
font: inherit;
|
||||
font-weight: 700;
|
||||
|
||||
Reference in new issue
Block a user