Skip to content

Commit 64fca21

Browse files
committed
feat(ai-chat): add screenshot button styles and i18n strings
Add camera button, dropup menu, and area selection overlay styles. Add screenshot-related string keys for menu items and toolbar buttons.
1 parent 6f58b0c commit 64fca21

2 files changed

Lines changed: 114 additions & 0 deletions

File tree

src/nls/root/strings.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,6 +2103,12 @@ define({
21032103
"AI_CHAT_IMAGE_LIMIT": "Maximum {0} images allowed",
21042104
"AI_CHAT_IMAGE_REMOVE": "Remove image",
21052105
"AI_CHAT_ATTACH_FILE": "Attach files",
2106+
"AI_CHAT_SCREENSHOT_TITLE": "Take Screenshot",
2107+
"AI_CHAT_SCREENSHOT_LIVE_PREVIEW": "Live Preview",
2108+
"AI_CHAT_SCREENSHOT_AREA": "Select Area",
2109+
"AI_CHAT_SCREENSHOT_FULL_EDITOR": "Full Editor",
2110+
"AI_CHAT_SCREENSHOT_CAPTURE": "Capture",
2111+
"AI_CHAT_SCREENSHOT_CANCEL": "Cancel",
21062112
"AI_CHAT_FILE_REMOVE": "Remove file",
21072113
"AI_CHAT_QUEUED": "Queued",
21082114
"AI_CHAT_QUEUED_EDIT": "Edit",

src/styles/Extn-AIChatPanel.less

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,6 +1690,7 @@
16901690

16911691
/* ── Input area ─────────────────────────────────────────────────────── */
16921692
.ai-chat-input-area {
1693+
position: relative;
16931694
flex-shrink: 0;
16941695
padding: 6px 8px 8px 8px;
16951696

@@ -1980,6 +1981,30 @@
19801981
}
19811982
}
19821983

1984+
.ai-screenshot-btn {
1985+
background: none;
1986+
border: none;
1987+
color: @project-panel-text-2;
1988+
width: 28px;
1989+
cursor: pointer;
1990+
display: flex;
1991+
align-items: center;
1992+
justify-content: center;
1993+
flex-shrink: 0;
1994+
align-self: stretch;
1995+
opacity: 0.5;
1996+
transition: opacity 0.15s ease, color 0.15s ease;
1997+
1998+
&:hover {
1999+
opacity: 1;
2000+
color: @project-panel-text-1;
2001+
}
2002+
2003+
i {
2004+
font-size: @sidebar-content-font-size;
2005+
}
2006+
}
2007+
19832008
.ai-send-btn {
19842009
background: none;
19852010
border: none;
@@ -2033,6 +2058,89 @@
20332058
font-size: @sidebar-content-font-size;
20342059
}
20352060
}
2061+
2062+
.ai-screenshot-dropup {
2063+
position: fixed;
2064+
background: @bc-ai-input-bg;
2065+
border: 1px solid @bc-ai-input-border;
2066+
border-radius: 8px;
2067+
padding: 4px 0;
2068+
box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
2069+
z-index: 100;
2070+
min-width: 200px;
2071+
2072+
.ai-screenshot-option {
2073+
padding: 8px 12px;
2074+
cursor: pointer;
2075+
color: @project-panel-text-1;
2076+
font-size: @sidebar-content-font-size;
2077+
white-space: nowrap;
2078+
display: flex;
2079+
align-items: center;
2080+
gap: 8px;
2081+
2082+
&:hover {
2083+
background: rgba(255, 255, 255, 0.08);
2084+
}
2085+
2086+
i {
2087+
width: 16px;
2088+
text-align: center;
2089+
opacity: 0.7;
2090+
}
2091+
}
2092+
}
2093+
}
2094+
2095+
/* ── Screenshot area selection overlay ─────────────────────────────── */
2096+
.ai-screenshot-overlay {
2097+
position: fixed;
2098+
z-index: 10000;
2099+
cursor: crosshair;
2100+
2101+
.ai-screenshot-canvas {
2102+
display: block;
2103+
width: 100%;
2104+
height: 100%;
2105+
}
2106+
2107+
.ai-screenshot-toolbar {
2108+
position: absolute;
2109+
display: flex;
2110+
gap: 8px;
2111+
padding: 6px;
2112+
background: rgba(30, 30, 30, 0.9);
2113+
border-radius: 6px;
2114+
border: 1px solid rgba(255, 255, 255, 0.15);
2115+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
2116+
2117+
button {
2118+
border: none;
2119+
border-radius: 4px;
2120+
padding: 4px 12px;
2121+
cursor: pointer;
2122+
font-size: 12px;
2123+
font-family: inherit;
2124+
}
2125+
2126+
.ai-screenshot-capture-btn {
2127+
background: #4fc3f7;
2128+
color: #000;
2129+
2130+
&:hover {
2131+
background: #81d4fa;
2132+
}
2133+
}
2134+
2135+
.ai-screenshot-cancel-btn {
2136+
background: rgba(255, 255, 255, 0.12);
2137+
color: #ccc;
2138+
2139+
&:hover {
2140+
background: rgba(255, 255, 255, 0.2);
2141+
}
2142+
}
2143+
}
20362144
}
20372145

20382146
/* ── Unavailable / placeholder state ────────────────────────────────── */

0 commit comments

Comments
 (0)