Compare commits

...

5 Commits

Author SHA1 Message Date
Aaron Iker
178c05dfea wip manage models dialog 2025-12-23 23:02:39 +01:00
Aaron Iker
ab8f85444d fix: light mode updates 2025-12-22 16:58:56 +01:00
Github Action
fda252e88e Update Nix flake.lock and hashes 2025-12-22 15:24:17 +00:00
Aaron Iker
4b7fe45854 Merge branch 'dev' into update-toggle-and-model-selection 2025-12-22 16:22:40 +01:00
Aaron Iker
9f458c5cb6 feat: switch style updates 2025-12-22 16:22:05 +01:00
4 changed files with 55 additions and 46 deletions

6
flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1766125104,
"narHash": "sha256-l/YGrEpLromL4viUo5GmFH3K5M1j0Mb9O+LiaeCPWEM=",
"lastModified": 1766314097,
"narHash": "sha256-laJftWbghBehazn/zxVJ8NdENVgjccsWAdAqKXhErrM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7d853e518814cca2a657b72eeba67ae20ebf7059",
"rev": "306ea70f9eb0fb4e040f8540e2deab32ed7e2055",
"type": "github"
},
"original": {

View File

@@ -35,7 +35,14 @@ export const DialogManageModels: Component = () => {
>
{(i) => (
<div class="w-full flex items-center justify-between gap-x-3">
<span>{i.name}</span>
<span
classList={{
"text-gradient-default": !local.model.visible({ modelID: i.id, providerID: i.provider.id }),
"text-gradient-active": !!local.model.visible({ modelID: i.id, providerID: i.provider.id }),
}}
>
{i.name}
</span>
<div onClick={(e) => e.stopPropagation()}>
<Switch
checked={

View File

@@ -4,7 +4,7 @@
position: fixed;
inset: 0;
z-index: 50;
background-color: hsl(from var(--background-base) h s l / 0.2);
background-color: hsl(from var(--background-base) h s l / 0.25);
/* animation: overlayHide 250ms ease 100ms forwards; */
/**/
@@ -43,14 +43,14 @@
/* padding: 8px; */
/* padding: 8px 8px 0 8px; */
border: 1px solid hsl(from var(--border-base) h s l / 0.2);
border: 1px solid hsl(from var(--border-base) h s l / 0.1);
border-radius: var(--radius-xl);
background: var(--surface-raised-stronger-non-alpha);
background-clip: padding-box;
box-shadow:
0 15px 45px 0 rgba(19, 16, 16, 0.35),
0 3.35px 10.051px 0 rgba(19, 16, 16, 0.25),
0 0.998px 2.993px 0 rgba(19, 16, 16, 0.2);
0 15px 45px 0 rgba(19, 16, 16, 0.1),
0 3.35px 10.051px 0 rgba(19, 16, 16, 0.1),
0 0.998px 2.993px 0 rgba(19, 16, 16, 0.1);
/* animation: contentHide 300ms ease-in forwards; */
/**/

View File

@@ -1,4 +1,10 @@
[data-component="switch"] {
--switch-fill: 0px;
--switch-scale-x: 1;
--switch-x: 0px;
--switch-focus: 0px;
--switch-border: var(--border-weaker-base);
display: flex;
align-items: center;
gap: 8px;
@@ -19,36 +25,41 @@
[data-slot="switch-control"] {
display: inline-flex;
align-items: center;
width: 28px;
height: 16px;
position: relative;
z-index: 1;
width: 32px;
height: 18px;
flex-shrink: 0;
border-radius: 3px;
border: 1px solid var(--border-weak-base);
background: var(--surface-base);
border-radius: 4px;
border: 1px solid var(--switch-border);
background: var(--surface-raised-base);
box-shadow: inset 0 0 0 var(--switch-fill) var(--surface-success-strong);
transition:
background-color 150ms,
border-color 150ms;
box-shadow 180ms,
border-color 180ms;
}
[data-slot="switch-thumb"] {
width: 14px;
height: 14px;
width: 16px;
height: 16px;
box-sizing: content-box;
border-radius: 2px;
border: 1px solid var(--border-base);
background: var(--icon-invert-base);
border-radius: 3px;
background: var(--surface-raised-stronger);
/* shadows/shadow-xs */
box-shadow:
0 1px 2px -1px rgba(19, 16, 16, 0.04),
0 1px 2px 0 rgba(19, 16, 16, 0.06),
0 1px 3px 0 rgba(19, 16, 16, 0.08);
0 4px 8px -2px rgba(19, 16, 16, 0.1),
0 1px 2px 0 rgba(19, 16, 16, 0.2),
0 2px 4px 0 rgba(19, 16, 16, 0.1);
transform: translateX(-1px);
transform: translateX(var(--switch-x)) scaleX(var(--switch-scale-x));
transform-origin: left center;
transition:
transform 150ms,
background-color 150ms;
transform 180ms,
background-color 180ms;
transition-timing-function: cubic-bezier(0.25, 0, 0.5, 1);
}
[data-slot="switch-label"] {
@@ -80,31 +91,23 @@
letter-spacing: var(--letter-spacing-normal);
}
&:hover:not([data-disabled], [data-readonly]) [data-slot="switch-control"] {
border-color: var(--border-hover);
background-color: var(--surface-hover);
&:hover:not([data-disabled], [data-readonly]) {
--switch-scale-x: 1.1;
}
&:focus-within:not([data-readonly]) [data-slot="switch-control"] {
border-color: var(--border-focus);
box-shadow: 0 0 0 2px var(--surface-focus);
&:focus-within:not([data-readonly]) {
--switch-focus: 2px;
}
&[data-checked] [data-slot="switch-control"] {
box-sizing: border-box;
border-color: var(--icon-strong-base);
background-color: var(--icon-strong-base);
&[data-checked] {
--switch-fill: 14px;
--switch-x: 14px;
--switch-border: var(--border-success-strong);
}
&[data-checked] [data-slot="switch-thumb"] {
border: none;
transform: translateX(12px);
background-color: var(--icon-invert-base);
}
&[data-checked]:hover:not([data-disabled], [data-readonly]) [data-slot="switch-control"] {
border-color: var(--border-hover);
background-color: var(--surface-hover);
background-color: var(--surface-interactive-weak);
transform-origin: right center;
}
&[data-disabled] {
@@ -112,7 +115,6 @@
}
&[data-disabled] [data-slot="switch-control"] {
border-color: var(--border-disabled);
background-color: var(--surface-disabled);
}