@@ -14,6 +14,8 @@ import {
14
14
mdiDownload ,
15
15
mdiFileCodeOutline ,
16
16
mdiHandExtendedOutline ,
17
+ mdiInformation ,
18
+ mdiMedal ,
17
19
mdiOpenInNew ,
18
20
mdiPackageVariant ,
19
21
mdiPlayCircleOutline ,
@@ -23,6 +25,7 @@ import {
23
25
mdiRenameBox ,
24
26
mdiShapeOutline ,
25
27
mdiStopCircleOutline ,
28
+ mdiTrophy ,
26
29
mdiWrench ,
27
30
} from "@mdi/js" ;
28
31
import type { UnsubscribeFunc } from "home-assistant-js-websocket" ;
@@ -338,6 +341,36 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
338
341
${ this . _manifest ?. version != null
339
342
? html `<div class= "version" > ${ this . _manifest . version } </ div> `
340
343
: nothing }
344
+ ${ this . _manifest ?. quality_scale &&
345
+ this . _manifest ?. quality_scale !== "internal"
346
+ ? html `<ha- alert
347
+ class= ${ classMap ( {
348
+ [ `${ this . _manifest . quality_scale } -medal` ] : true ,
349
+ } ) }
350
+ alert- type= "info"
351
+ > <ha- svg- icon
352
+ class= "medal"
353
+ slot = "icon"
354
+ path= ${ this . _manifest . quality_scale === "platinum"
355
+ ? mdiTrophy
356
+ : mdiMedal }
357
+ > </ ha- svg- icon>
358
+ ${ this . hass . localize (
359
+ `ui.panel.config.integrations.config_entry.${ this . _manifest . quality_scale } _quality`
360
+ ) }
361
+ <a
362
+ slot= "action"
363
+ href = ${ `https://developers.home-assistant.io/docs/core/integration-quality-scale/#-${ this . _manifest . quality_scale } ` }
364
+ rel= "noopener noreferrer"
365
+ target= "_blank"
366
+ >
367
+ <ha- svg- icon
368
+ class= "info"
369
+ path = ${ mdiInformation }
370
+ > </ ha- svg- icon>
371
+ </ a>
372
+ </ ha- alert> `
373
+ : nothing }
341
374
${ this . _manifest ?. is_built_in === false
342
375
? html `<ha- alert alert- type= "warning"
343
376
> <ha- svg- icon
@@ -1478,6 +1511,32 @@ class HaConfigIntegrationPage extends SubscribeMixin(LitElement) {
1478
1511
ha-alert : first-of-type {
1479
1512
margin-top : 16px ;
1480
1513
}
1514
+
1515
+ @keyframes shimmer {
1516
+ 100% {
1517
+ mask-position : left;
1518
+ }
1519
+ }
1520
+ ha-svg-icon .medal {
1521
+ mask : linear-gradient (-60deg , # 000 30% , # 0005, # 000 70% ) right/350%
1522
+ 100% ;
1523
+ animation : shimmer 2.5s infinite;
1524
+ }
1525
+ ha-alert .bronze-medal {
1526
+ --info-color : # cd7f32 ;
1527
+ }
1528
+ ha-alert .silver-medal {
1529
+ --info-color : silver;
1530
+ }
1531
+ ha-alert .gold-medal {
1532
+ --info-color : gold;
1533
+ }
1534
+ ha-alert .platinum-medal {
1535
+ --info-color : # d9d9d9 ;
1536
+ }
1537
+ ha-alert ha-svg-icon .info {
1538
+ color : var (--secondary-text-color );
1539
+ }
1481
1540
ha-md-list-item {
1482
1541
position : relative;
1483
1542
}
0 commit comments