Skip to content

Commit f188b5a

Browse files
committed
style(yasgui): accent the AI privacy notice, show AI services as cards, use the Yasgui font in the settings
1 parent 3754bab commit f188b5a

2 files changed

Lines changed: 42 additions & 5 deletions

File tree

‎packages/yasgui/src/TabSettingsModal.scss‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,17 @@
3535
}
3636
}
3737

38+
// The modal is appended to the page body, outside .yasgui, so it sets the Yasgui font itself
3839
.tabSettingsModal {
40+
font-family: var(--yasgui-font-family, system-ui, sans-serif);
41+
font-size: var(--yasgui-font-size, 13px);
3942
background: var(--yasgui-bg-primary, white);
43+
44+
// Low specificity, so monospace fields such as .prefixTextarea keep their font
45+
:where(input, select, textarea, button) {
46+
font-family: inherit;
47+
}
48+
4049
border-radius: 8px;
4150
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
4251
max-width: 1000px;

‎packages/yasgui/src/ai/AiPanel.scss‎

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
// "AI" view of the side panel (see AiPanel.ts) and the AI section of the settings (AiSettingsForm.ts)
2+
// Accent of the privacy notice and of the selected service in the settings
3+
:root {
4+
--yasgui-ai-accent: #4f46e5;
5+
--yasgui-ai-accent-soft: rgba(79, 70, 229, 0.06);
6+
}
7+
8+
[data-theme="dark"] {
9+
--yasgui-ai-accent: #818cf8;
10+
--yasgui-ai-accent-soft: #1b2033;
11+
}
12+
213
.yasgui-sidePanel__view[data-view="assistant"] {
314
position: relative;
415
min-height: 320px;
@@ -215,9 +226,17 @@
215226
}
216227
}
217228

229+
&__consent {
230+
border: 0;
231+
border-left: 3px solid var(--yasgui-ai-accent);
232+
border-radius: 4px var(--yasgui-radius-md, 10px) var(--yasgui-radius-md, 10px) 4px;
233+
background: var(--yasgui-surface-sunken, #edf1f6);
234+
}
235+
218236
&__consent.answered {
219237
padding: 4px 10px;
220-
border-style: dashed;
238+
border-left-color: var(--yasgui-line-strong, #808893);
239+
background: transparent;
221240
font-size: 12px;
222241
color: var(--yasgui-ink-subtle, #6a7380);
223242

@@ -458,12 +477,21 @@
458477

459478
&__choice {
460479
display: flex;
461-
align-items: flex-start;
462-
gap: 8px;
480+
align-items: center;
481+
gap: 10px;
482+
padding: 10px 12px;
483+
border: 1px solid var(--yasgui-border-color, #dfe5ec);
484+
border-radius: var(--yasgui-radius-md, 10px);
485+
background: var(--yasgui-bg-secondary, #fff);
463486
cursor: pointer;
464487

488+
&:has(input:checked) {
489+
border-color: var(--yasgui-ai-accent);
490+
background: var(--yasgui-ai-accent-soft);
491+
}
492+
465493
input {
466-
margin-top: 3px;
494+
margin: 0;
467495
}
468496

469497
strong {
@@ -489,7 +517,7 @@
489517
&__choiceHelp {
490518
display: block;
491519
font-size: 12px;
492-
opacity: 0.8;
520+
color: var(--yasgui-text-secondary, #666);
493521
}
494522

495523
&__own[hidden] {

0 commit comments

Comments
 (0)