Skip to content

Commit

Permalink
feat: improve keyboards UI
Browse files Browse the repository at this point in the history
  • Loading branch information
mishamyrt committed Mar 1, 2024
1 parent 0c41872 commit a895603
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
8 changes: 4 additions & 4 deletions frontend/src/entities/keys/lib/layouts/halo75.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ export const Halo75: KeyboardLayout = [
{ code: 'f6', color: 'dark', secondaryCode: 'fn_f6' },
{ code: 'f7', color: 'dark', secondaryCode: 'fn_f7' },
{ code: 'f8', color: 'dark', secondaryCode: 'fn_f8' },
{ code: 'f9', color: 'dark', secondaryCode: 'fn_f9' },
{ code: 'f10', color: 'dark', secondaryCode: 'fn_f10' },
{ code: 'f11', color: 'dark', secondaryCode: 'fn_f11' },
{ code: 'f12', color: 'dark', secondaryCode: 'fn_f12' },
{ code: 'f9', secondaryCode: 'fn_f9' },
{ code: 'f10', secondaryCode: 'fn_f10' },
{ code: 'f11', secondaryCode: 'fn_f11' },
{ code: 'f12', secondaryCode: 'fn_f12' },
{ code: 'screenshot', color: 'dark' },
{ code: 'del', color: 'dark' },
{ code: 'ins', color: 'dark' }
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/entities/keys/ui/AbstractKeyboard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}
.keys {
--key-color-dark: #757575;
--key-color-dark: #6b6b6b;
--key-color-light: rgb(196 196 196);
--key-color-mint: rgb(46 218 151);
--key-color-orange: rgb(226 121 80 / 100%);
Expand Down
12 changes: 10 additions & 2 deletions frontend/src/features/keys/select-key/ui/SelectableKey.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
keySelected(key)
}
$: dark = key.color === 'dark'
$: active = $selectedKeyStore.code === key.code
</script>

<div
class="key"
class:dark
class:active
on:click={handleClick}
>
Expand All @@ -30,15 +32,20 @@
width: 100%;
height: 100%;
transition: var(--transition-default);
transition-property: background-color;
transition-property: background-color, color;
border-radius: var(--key-border-radius);
font-family: var(--typography-font-family);
font-weight: 500;
font-size: 10px;
text-align: center;
padding-top: var(--space-xxs);
background-color: transparent;
cursor: default;
&.dark {
color: white;
}
&::after {
top: -4px;
left: -4px;
Expand All @@ -50,13 +57,14 @@
pointer-events: none;
transition: var(--transition-default);
border-radius: calc(var(--key-border-radius) + 4px);
box-shadow: 0 0 0 0 transparent;
box-shadow: 0 0 0 6px transparent;
}
}
.active {
background-color: var(--color-content-accent);
transition-duration: 0s;
color: white;
&::after {
box-shadow: 0 0 0 2px var(--color-content-accent);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/lights/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const lights: Page = {
layoutProps: {
toolbar: {
draggable: true,
height: 200
height: 150
},
macInset: {
enable: true
Expand Down

0 comments on commit a895603

Please sign in to comment.