|
204 | 204 | > |
205 | 205 | <!-- Strategy Status --> |
206 | 206 | <template slot="strategyStatus" slot-scope="text"> |
207 | | - <a-badge :status="text === 'running' ? 'processing' : 'default'" /> |
208 | | - <a-tag :color="text === 'running' ? 'green' : 'default'" size="small"> |
209 | | - {{ text === 'running' ? ($t('systemOverview.running') || 'Running') : ($t('systemOverview.stopped') || 'Stopped') }} |
210 | | - </a-tag> |
| 207 | + <span class="status-cell"> |
| 208 | + <span class="status-dot" :class="text === 'running' ? 'dot-running' : 'dot-stopped'" /> |
| 209 | + <span :class="text === 'running' ? 'status-running' : 'status-stopped'"> |
| 210 | + {{ text === 'running' ? ($t('systemOverview.running') || 'Running') : ($t('systemOverview.stopped') || 'Stopped') }} |
| 211 | + </span> |
| 212 | + </span> |
211 | 213 | </template> |
212 | 214 |
|
213 | 215 | <!-- User Column --> |
214 | 216 | <template slot="userInfo" slot-scope="text, record"> |
215 | | - <span class="user-cell"> |
216 | | - <a-icon type="user" style="margin-right: 4px; color: #1890ff" /> |
217 | | - {{ record.nickname || record.username || '-' }} |
218 | | - </span> |
| 217 | + <a-tooltip :title="(record.nickname || record.username || '-')"> |
| 218 | + <span class="user-cell"> |
| 219 | + <a-avatar size="small" :style="{ backgroundColor: getUserColor(record.user_id), fontSize: '11px', marginRight: '6px' }"> |
| 220 | + {{ (record.nickname || record.username || '?').charAt(0).toUpperCase() }} |
| 221 | + </a-avatar> |
| 222 | + <span class="user-name">{{ truncate(record.nickname || record.username || '-', 8) }}</span> |
| 223 | + </span> |
| 224 | + </a-tooltip> |
219 | 225 | </template> |
220 | 226 |
|
221 | 227 | <!-- Symbol Column --> |
@@ -751,6 +757,11 @@ export default { |
751 | 757 | this.loadSystemStrategies() |
752 | 758 | }, |
753 | 759 |
|
| 760 | + getUserColor (userId) { |
| 761 | + const colors = ['#1890ff', '#722ed1', '#13c2c2', '#fa8c16', '#eb2f96', '#52c41a', '#2f54eb', '#faad14'] |
| 762 | + return colors[(userId || 0) % colors.length] |
| 763 | + }, |
| 764 | +
|
754 | 765 | formatNumber (num) { |
755 | 766 | if (!num && num !== 0) return '0' |
756 | 767 | return Number(num).toLocaleString('en-US', { minimumFractionDigits: 0, maximumFractionDigits: 2 }) |
@@ -1209,8 +1220,64 @@ export default { |
1209 | 1220 | margin-top: 2px; |
1210 | 1221 | } |
1211 | 1222 |
|
| 1223 | + // Status cell |
| 1224 | + .status-cell { |
| 1225 | + display: inline-flex; |
| 1226 | + align-items: center; |
| 1227 | + gap: 6px; |
| 1228 | + white-space: nowrap; |
| 1229 | +
|
| 1230 | + .status-dot { |
| 1231 | + display: inline-block; |
| 1232 | + width: 7px; |
| 1233 | + height: 7px; |
| 1234 | + border-radius: 50%; |
| 1235 | + flex-shrink: 0; |
| 1236 | +
|
| 1237 | + &.dot-running { |
| 1238 | + background: #52c41a; |
| 1239 | + box-shadow: 0 0 6px rgba(82, 196, 26, 0.5); |
| 1240 | + animation: pulse-green 2s infinite; |
| 1241 | + } |
| 1242 | +
|
| 1243 | + &.dot-stopped { |
| 1244 | + background: #d9d9d9; |
| 1245 | + } |
| 1246 | + } |
| 1247 | +
|
| 1248 | + .status-running { |
| 1249 | + color: #52c41a; |
| 1250 | + font-weight: 500; |
| 1251 | + font-size: 13px; |
| 1252 | + } |
| 1253 | +
|
| 1254 | + .status-stopped { |
| 1255 | + color: #999; |
| 1256 | + font-size: 13px; |
| 1257 | + } |
| 1258 | + } |
| 1259 | +
|
| 1260 | + @keyframes pulse-green { |
| 1261 | + 0%, 100% { opacity: 1; } |
| 1262 | + 50% { opacity: 0.5; } |
| 1263 | + } |
| 1264 | +
|
| 1265 | + // User cell |
1212 | 1266 | .user-cell { |
1213 | | - font-size: 13px; |
| 1267 | + display: inline-flex; |
| 1268 | + align-items: center; |
| 1269 | + max-width: 100%; |
| 1270 | + overflow: hidden; |
| 1271 | + white-space: nowrap; |
| 1272 | + cursor: default; |
| 1273 | +
|
| 1274 | + .user-name { |
| 1275 | + font-size: 13px; |
| 1276 | + overflow: hidden; |
| 1277 | + text-overflow: ellipsis; |
| 1278 | + white-space: nowrap; |
| 1279 | + max-width: 80px; |
| 1280 | + } |
1214 | 1281 | } |
1215 | 1282 |
|
1216 | 1283 | .indicator-name { |
|
0 commit comments