Skip to content

Commit 44fdd65

Browse files
feat: use theme color for shortcuts rows
1 parent 8665a08 commit 44fdd65

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

gui/src/pages/config/KeyboardShortcuts.tsx

+6-10
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,10 @@ interface KeyboardShortcutProps {
1111
function KeyboardShortcut(props: KeyboardShortcutProps) {
1212
return (
1313
<div
14-
className="sm:flex-row flex-col flex items-start sm:items-center py-2"
15-
style={{
16-
backgroundColor: props.isEven ? '#1e1e1e' : 'transparent',
17-
}}
14+
className={`flex flex-col items-start p-2 py-2 sm:flex-row sm:items-center ${props.isEven ? "bg-list-active" : ""}`}
1815
>
19-
<div className="flex-grow pr-4 pb-1 sm:pb-0 w-full sm:w-auto">
20-
<span className="text-xs block break-words">{props.description}:</span>
16+
<div className="w-full flex-grow pb-1 pr-4 sm:w-auto sm:pb-0">
17+
<span className="block break-words text-xs">{props.description}:</span>
2118
</div>
2219
<div className="flex-shrink-0 whitespace-nowrap">
2320
<Shortcut>{props.shortcut}</Shortcut>
@@ -27,7 +24,7 @@ function KeyboardShortcut(props: KeyboardShortcutProps) {
2724
}
2825

2926
// Shortcut strings will be rendered correctly based on the platform by the Shortcut component
30-
const vscodeShortcuts: Omit<KeyboardShortcutProps, 'isEven'>[] = [
27+
const vscodeShortcuts: Omit<KeyboardShortcutProps, "isEven">[] = [
3128
{
3229
shortcut: "cmd '",
3330
description: "Toggle Selected Model",
@@ -84,7 +81,7 @@ const vscodeShortcuts: Omit<KeyboardShortcutProps, 'isEven'>[] = [
8481
},
8582
];
8683

87-
const jetbrainsShortcuts: Omit<KeyboardShortcutProps, 'isEven'>[] = [
84+
const jetbrainsShortcuts: Omit<KeyboardShortcutProps, "isEven">[] = [
8885
{
8986
shortcut: "cmd '",
9087
description: "Toggle Selected Model",
@@ -135,7 +132,7 @@ function KeyboardShortcuts() {
135132
}, []);
136133

137134
return (
138-
<div className="p-5 h-full overflow-auto">
135+
<div className="h-full overflow-auto p-5">
139136
<h3 className="mb-5 text-xl">Keyboard shortcuts</h3>
140137
<div>
141138
{shortcuts.map((shortcut, i) => {
@@ -154,4 +151,3 @@ function KeyboardShortcuts() {
154151
}
155152

156153
export default KeyboardShortcuts;
157-

0 commit comments

Comments
 (0)