dsh-link-pulse 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/src/client.js +33 -32
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -201,6 +201,12 @@ window.__ModuleLoader__.load({
|
|
|
201
201
|
|
|
202
202
|
const otherProviders = (data?.providers || []).filter((p) => p.id !== activeProviderInfo?.id)
|
|
203
203
|
|
|
204
|
+
const segments = [
|
|
205
|
+
{ text: providerDisplayName, color: T.label, bold: true },
|
|
206
|
+
{ text: modelShortName, color: T.secondary },
|
|
207
|
+
{ text: currentLatency > 0 ? `${currentLatency}ms` : '探测中', color: statusColor, bold: true },
|
|
208
|
+
]
|
|
209
|
+
|
|
204
210
|
const node = h(
|
|
205
211
|
'button',
|
|
206
212
|
{
|
|
@@ -222,44 +228,39 @@ window.__ModuleLoader__.load({
|
|
|
222
228
|
}),
|
|
223
229
|
wide &&
|
|
224
230
|
h(
|
|
225
|
-
'
|
|
231
|
+
'span',
|
|
226
232
|
{
|
|
227
233
|
style: {
|
|
228
|
-
display: 'flex',
|
|
234
|
+
display: 'inline-flex',
|
|
229
235
|
alignItems: 'center',
|
|
230
|
-
|
|
231
|
-
flex: 1,
|
|
232
|
-
overflow: 'hidden',
|
|
236
|
+
lineHeight: '18px',
|
|
233
237
|
whiteSpace: 'nowrap',
|
|
238
|
+
minWidth: 0,
|
|
239
|
+
overflow: 'hidden',
|
|
240
|
+
textOverflow: 'ellipsis',
|
|
234
241
|
},
|
|
235
242
|
},
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
color: statusColor,
|
|
258
|
-
marginLeft: 6,
|
|
259
|
-
flexShrink: 0,
|
|
260
|
-
},
|
|
261
|
-
},
|
|
262
|
-
currentLatency > 0 ? `${currentLatency}ms` : '探测中',
|
|
243
|
+
segments.flatMap((s, i) =>
|
|
244
|
+
i === 0
|
|
245
|
+
? [h('span', { key: `s${i}`, style: { color: s.color, fontWeight: 500, flexShrink: 0 } }, s.text)]
|
|
246
|
+
: [
|
|
247
|
+
h('span', { key: `sep${i}`, style: { color: T.secondary, margin: '0 5px', opacity: 0.7, flexShrink: 0 } }, '·'),
|
|
248
|
+
h(
|
|
249
|
+
'span',
|
|
250
|
+
{
|
|
251
|
+
key: `s${i}`,
|
|
252
|
+
style: {
|
|
253
|
+
color: s.color,
|
|
254
|
+
fontWeight: s.bold ? 500 : undefined,
|
|
255
|
+
fontVariantNumeric: 'tabular-nums',
|
|
256
|
+
overflow: 'hidden',
|
|
257
|
+
textOverflow: 'ellipsis',
|
|
258
|
+
flexShrink: i === segments.length - 1 ? 0 : 1,
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
s.text,
|
|
262
|
+
),
|
|
263
|
+
],
|
|
263
264
|
),
|
|
264
265
|
),
|
|
265
266
|
)
|