File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -708,6 +708,7 @@ void APIKeyTemplate(KeyResponse key)
708
708
{
709
709
Button button = new Button ( ) ;
710
710
711
+ bool isLegacyKey = ! ( key . api_key . StartsWith ( "prod_" ) || key . api_key . StartsWith ( "dev_" ) ) ;
711
712
button . name = key . api_key ;
712
713
713
714
Label keyName = new Label ( ) ;
@@ -721,15 +722,26 @@ void APIKeyTemplate(KeyResponse key)
721
722
button . style . borderRightColor = button . style . borderLeftColor = button . style . borderTopColor = button . style . borderBottomColor = stage ;
722
723
}
723
724
724
- button . AddToClassList ( "apikey" ) ;
725
+ if ( isLegacyKey )
726
+ {
727
+ keyName . text = "Legacy key: " + keyName . text ;
728
+ button . AddToClassList ( "legacyApikey" ) ;
729
+ }
730
+ else
731
+ {
732
+ button . AddToClassList ( "apikey" ) ;
733
+ }
725
734
726
735
727
736
keyName . AddToClassList ( "apikeyName" ) ;
728
737
729
738
730
739
button . Add ( keyName ) ;
731
740
732
- button . clickable . clickedWithEventInfo += OnAPIKeySelected ;
741
+ if ( ! isLegacyKey )
742
+ {
743
+ button . clickable . clickedWithEventInfo += OnAPIKeySelected ;
744
+ }
733
745
734
746
apiKeyList . Add ( button ) ;
735
747
}
Original file line number Diff line number Diff line change 57
57
height: 40px;
58
58
}
59
59
60
+ .legacyApikey {
61
+ flex-direction: row;
62
+ width: 300px;
63
+ height: 40px;
64
+ background-color: #885555;
65
+ opacity: 0.5;
66
+ }
67
+
60
68
.clickable {
61
69
cursor: link;
62
70
}
You can’t perform that action at this time.
0 commit comments