Skip to content

Commit

Permalink
add beta indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
soad003 committed Dec 20, 2023
1 parent fab304b commit f1fd23a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/View/CurrencyMeta.elm
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ currencies =
, ( "ltc", { name = "Litecoin", icon = "m 45.589572,72.899487 4.90193,-18.457976 11.605478,-4.240003 2.886703,-10.847695 -0.09862,-0.26914 -11.42395,4.173502 8.231006,-30.993183 H 38.348667 l -10.764281,40.446839 -8.987408,3.283222 -2.969657,11.183244 8.980541,-3.280458 -6.344128,23.837167 H 80.389878 L 84.372679,72.899441 H 45.58948" } )
, ( "zec", { name = "Zcash", icon = "m 45.934937,66.676792 h 28.469644 v 14.3061 H 56.874942 c 0.28527,4.09359 0.442148,7.887628 0.727416,11.966934 H 42.854072 v -11.8243 H 25.324433 c 0,-4.678371 -0.584781,-9.342458 0.285269,-13.721318 0.442147,-2.339166 3.066622,-4.378818 4.678371,-6.418512 5.548422,-6.57539 11.096883,-12.993862 16.78794,-19.569292 2.196572,-2.481801 4.378859,-4.821006 6.860659,-7.588075 H 26.63667 V 19.522185 H 42.839829 V 7.5552506 H 57.003294 V 19.236916 h 17.672273 c 0,4.821007 0.584781,9.485134 -0.285269,13.87824 -0.442146,2.339206 -3.066622,4.37886 -4.821005,6.418513 -5.548422,6.57539 -11.096884,12.993902 -16.78794,19.569292 -2.168045,2.610191 -4.350332,4.935113 -6.846416,7.573831 z" } )
, ( "eth", { name = "Ethereum", icon = "M 49.992373,4.0821708 21.80439,50.852186 49.992373,67.512274 78.17844,50.852186 Z M 21.80439,56.19624 49.992373,95.917829 78.19561,56.19624 49.992373,72.850601 Z" } )
, ( "trx", { name = "Tron", icon = "M 20.4 47.4 C 11.64 25.32 4.8 6.84 5.16 6.36 C 5.64 6 19.92 8.16 36.84 11.16 l 30.96 5.64 l 8.04 8.04 l 7.92 8.16 l -22.32 27.24 C 49.08 75.24 38.4 87.48 37.68 87.48 C 36.96 87.6 29.28 69.48 20.4 47.4 Z m 18.72 8.04 c 1.08 -8.76 1.8 -16.08 1.56 -16.32 c -0.24 -0.12 -5.04 -4.08 -10.68 -8.64 C 14.04 17.4 15.12 18 17.04 22.8 c 0.96 2.28 5.76 14.28 10.68 26.64 c 4.92 12.24 9 22.2 9.12 22.08 c 0.12 -0.12 1.2 -7.32 2.28 -16.08 z m 18.84 -0.84 c 7.68 -9.24 13.68 -16.92 13.56 -17.16 c -0.36 -0.36 -23.76 3.6 -24.48 4.08 c -0.6 0.36 -3.72 24.12 -3.84 27.96 c 0 1.56 0.24 2.64 0.48 2.4 c 0.24 -0.24 6.72 -8.04 14.28 -17.28 z m 7.2 -22.2 l 8.28 -1.56 l -3.6 -3.6 c -4.08 -4.08 -4.44 -3.96 -13.44 3.96 c -3.12 2.76 -3.6 3.6 -1.8 3.12 c 1.32 -0.24 6.12 -1.2 10.56 -1.92 z M 51.72 27.36 c 4.08 -3.48 6.96 -6.36 6.36 -6.6 c -3.96 -0.96 -35.76 -6.36 -36.48 -6.12 c -0.96 0.36 20.28 18.72 21.84 18.84 c 0.36 0.12 4.08 -2.64 8.28 -6.12 z" } )
, ( "trx", { name = "Tron (BETA)", icon = "M 20.4 47.4 C 11.64 25.32 4.8 6.84 5.16 6.36 C 5.64 6 19.92 8.16 36.84 11.16 l 30.96 5.64 l 8.04 8.04 l 7.92 8.16 l -22.32 27.24 C 49.08 75.24 38.4 87.48 37.68 87.48 C 36.96 87.6 29.28 69.48 20.4 47.4 Z m 18.72 8.04 c 1.08 -8.76 1.8 -16.08 1.56 -16.32 c -0.24 -0.12 -5.04 -4.08 -10.68 -8.64 C 14.04 17.4 15.12 18 17.04 22.8 c 0.96 2.28 5.76 14.28 10.68 26.64 c 4.92 12.24 9 22.2 9.12 22.08 c 0.12 -0.12 1.2 -7.32 2.28 -16.08 z m 18.84 -0.84 c 7.68 -9.24 13.68 -16.92 13.56 -17.16 c -0.36 -0.36 -23.76 3.6 -24.48 4.08 c -0.6 0.36 -3.72 24.12 -3.84 27.96 c 0 1.56 0.24 2.64 0.48 2.4 c 0.24 -0.24 6.72 -8.04 14.28 -17.28 z m 7.2 -22.2 l 8.28 -1.56 l -3.6 -3.6 c -4.08 -4.08 -4.44 -3.96 -13.44 3.96 c -3.12 2.76 -3.6 3.6 -1.8 3.12 c 1.32 -0.24 6.12 -1.2 10.56 -1.92 z M 51.72 27.36 c 4.08 -3.48 6.96 -6.36 6.36 -6.6 c -3.96 -0.96 -35.76 -6.36 -36.48 -6.12 c -0.96 0.36 20.28 18.72 21.84 18.84 c 0.36 0.12 4.08 -2.64 8.28 -6.12 z" } )
]
18 changes: 17 additions & 1 deletion src/View/Graph/Browser.elm
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,13 @@ rowsAddress vc now table address =

Loading _ _ ->
[]
betaIndicator = [
OptionalRow (Footnote "BETA")
(case address of
Loaded a ->
a.address.currency == "trx"
_ ->
False)]

len =
multiValueMaxLen vc .address address
Expand Down Expand Up @@ -927,6 +934,7 @@ rowsAddress vc now table address =
]
++ dataPart2
++ statusNote
++ betaIndicator


unwrapTableRouteMatch : (table -> route -> Bool) -> Maybe table -> route -> Bool
Expand Down Expand Up @@ -1229,6 +1237,14 @@ rowsEntity vc gc now table ent =
}
)

betaIndicator = [
OptionalRow (Footnote "BETA")
(case ent of
Loaded e ->
e.entity.currency == "trx"
_ ->
False)]

len =
multiValueMaxLen vc .entity ent
in
Expand Down Expand Up @@ -1400,7 +1416,7 @@ rowsEntity vc gc now table ent =
)
|> Loadable.withDefault Nothing
)
]
] ++ betaIndicator


rowsActor : View.Config -> Graph.Config -> Time.Posix -> Maybe ActorTable -> Loadable String Actor -> List (Row (Value Msg) Coords Msg)
Expand Down

0 comments on commit f1fd23a

Please sign in to comment.