|
6 | 6 | */ |
7 | 7 |
|
8 | 8 | import { useState, useCallback } from 'react'; |
9 | | -import { VscError, VscWarning } from 'react-icons/vsc'; |
10 | 9 | import { CheckIcon } from 'lucide-react'; |
11 | 10 | import { useLocation } from 'react-router'; |
12 | 11 | import { useAppStore } from '~/store'; |
@@ -102,55 +101,82 @@ export function IDEFooter() { |
102 | 101 |
|
103 | 102 | return ( |
104 | 103 | <> |
105 | | - <footer className="flex h-6 items-stretch justify-between bg-[#007acc] pl-3 pr-6 text-xs text-white"> |
106 | | - {/* Left section - Diagnostics */} |
107 | | - <Button |
108 | | - variant="ghost" |
109 | | - size="sm" |
110 | | - className="flex h-full items-center gap-2 rounded-none px-1 py-0 text-white hover:bg-white/20 hover:text-white" |
| 104 | + <footer |
| 105 | + className="flex h-6 items-stretch justify-between border-t pl-4 pr-5 text-[11px]" |
| 106 | + style={{ |
| 107 | + background: 'var(--ide-surface-elevated)', |
| 108 | + borderColor: 'var(--ide-border-subtle)', |
| 109 | + color: 'var(--ide-text-muted)', |
| 110 | + }} |
| 111 | + > |
| 112 | + {/* Left section - Diagnostics as colored dots + neutral counts */} |
| 113 | + <button |
111 | 114 | onClick={() => { |
112 | 115 | setBottomPanelTab('problems'); |
113 | 116 | toggleBottomPanel(); |
114 | 117 | }} |
| 118 | + className="flex h-full items-center gap-2.5 px-1.5 pb-1 transition-colors duration-150 cursor-pointer" |
| 119 | + onMouseEnter={e => { |
| 120 | + e.currentTarget.style.background = 'var(--ide-surface-hover)'; |
| 121 | + }} |
| 122 | + onMouseLeave={e => { |
| 123 | + e.currentTarget.style.background = 'transparent'; |
| 124 | + }} |
| 125 | + style={{ color: 'var(--ide-text-muted)' }} |
115 | 126 | > |
116 | | - <VscError className="h-3.5 w-3.5" /> |
117 | | - <NumberFlow |
118 | | - value={errorCount} |
119 | | - className="text-xs font-medium" |
120 | | - animated |
121 | | - /> |
122 | | - <VscWarning className="h-3.5 w-3.5" /> |
123 | | - <NumberFlow |
124 | | - value={warningCount} |
125 | | - className="text-xs font-medium" |
126 | | - animated |
127 | | - /> |
128 | | - </Button> |
| 127 | + <span className="flex items-center gap-1.5"> |
| 128 | + <span |
| 129 | + className="h-1.5 w-1.5 rounded-full" |
| 130 | + style={{ background: 'var(--ide-danger)' }} |
| 131 | + /> |
| 132 | + <NumberFlow |
| 133 | + value={errorCount} |
| 134 | + className="font-medium tabular-nums" |
| 135 | + animated |
| 136 | + /> |
| 137 | + </span> |
| 138 | + <span className="flex items-center gap-1.5"> |
| 139 | + <span |
| 140 | + className="h-1.5 w-1.5 rounded-full" |
| 141 | + style={{ background: 'var(--ide-warning)' }} |
| 142 | + /> |
| 143 | + <NumberFlow |
| 144 | + value={warningCount} |
| 145 | + className="font-medium tabular-nums" |
| 146 | + animated |
| 147 | + /> |
| 148 | + </span> |
| 149 | + </button> |
129 | 150 |
|
130 | 151 | {/* Right section - Dialect + Cursor position */} |
131 | | - <div className="flex items-center gap-3 text-white"> |
132 | | - <Button |
133 | | - variant="ghost" |
134 | | - size="sm" |
135 | | - className="flex h-full items-center gap-1 rounded-none px-1.5 py-0 text-white hover:bg-white/20 hover:text-white" |
| 152 | + <div |
| 153 | + className="flex items-center gap-4 pb-0.5" |
| 154 | + style={{ color: 'var(--ide-text-muted)' }} |
| 155 | + > |
| 156 | + <button |
| 157 | + className="flex h-full items-center gap-1 px-1.5 transition-colors duration-150 cursor-pointer" |
136 | 158 | onClick={() => setSelectorOpen(true)} |
| 159 | + onMouseEnter={e => { |
| 160 | + e.currentTarget.style.background = 'var(--ide-surface-hover)'; |
| 161 | + }} |
| 162 | + onMouseLeave={e => { |
| 163 | + e.currentTarget.style.background = 'transparent'; |
| 164 | + }} |
137 | 165 | > |
138 | | - <span className="text-xs"> |
| 166 | + <span> |
139 | 167 | {currentDialect |
140 | | - ? `${currentDialect.displayName} (${currentDialect.version})` |
| 168 | + ? `${currentDialect.displayName} v${currentDialect.version}` |
141 | 169 | : 'Select Dialect'} |
142 | 170 | </span> |
143 | | - </Button> |
| 171 | + </button> |
144 | 172 |
|
145 | 173 | {/* Cursor position */} |
146 | 174 | {isScriptView && editorSelection && ( |
147 | | - <> |
148 | | - <span> |
149 | | - Ln {editorSelection.endLineNumber}, Col{' '} |
150 | | - {editorSelection.endColumn} |
151 | | - </span> |
152 | | - {selectedCount > 0 && <span>({selectedCount} selected)</span>} |
153 | | - </> |
| 175 | + <span className="tabular-nums"> |
| 176 | + Ln {editorSelection.endLineNumber}, Col{' '} |
| 177 | + {editorSelection.endColumn} |
| 178 | + {selectedCount > 0 && ` · ${selectedCount} sel`} |
| 179 | + </span> |
154 | 180 | )} |
155 | 181 | </div> |
156 | 182 | </footer> |
|
0 commit comments