diff --git a/Conversion/Converter.cs b/Conversion/Converter.cs index e64c3d6..9eeaea0 100644 --- a/Conversion/Converter.cs +++ b/Conversion/Converter.cs @@ -115,7 +115,14 @@ namespace vassago.Conversion } else { - return $"{String.Format("{0:G4}", accumulator)} {normalizedDestUnit}s"; + if(String.Format("{0:G3}", accumulator).Contains("E-")) + { + return $"{accumulator} {normalizedDestUnit}"; + } + else + { + return $"{String.Format("{0:N}", accumulator)} {normalizedDestUnit}"; + } } } return "dimensional analysis failure - I know those units but can't find a path between them."; diff --git a/assets/conversion.json b/assets/conversion.json index a31a538..7802e79 100644 --- a/assets/conversion.json +++ b/assets/conversion.json @@ -215,16 +215,30 @@ { "canonical":"mi", "aliases": [ - "mile", - "miles" + "mile" ] }, { - "canonical":"blue whale length", + "canonical":"blue whale lengths", "aliases": [ "bwl", "whales" ] + }, + { + "canonical":"ångströms", + "aliases": [ + "angstroms", + "Å" + ] + }, + { + "canonical":"μm", + "aliases": [ + "micrometers", + "micrometres", + "microns" + ] } ], "linearPairs":[ @@ -238,9 +252,11 @@ {"item1":"m", "item2":"in", "factor":39.37008}, {"item1":"m", "item2":"cm", "factor":100}, {"item1":"cm", "item2":"mm", "factor":10}, + {"item1":"m", "item2":"μm", "factor":1000000}, {"item1":"km", "item2":"mi", "factor":0.6213712}, {"item1":"ft", "item2":"in", "factor":12}, {"item1":"yd", "item2":"ft", "factor":3}, + {"item1":"football field", "item2":"yd", "factor":100}, {"item1":"chain", "item2":"yd", "factor":22}, {"item1":"chain", "item2":"link", "factor":100}, {"item1":"furlong", "item2":"mi", "factor":8}, @@ -249,6 +265,8 @@ {"item1":"ly", "item2":"km", "factor": 946070000000}, {"item1":"pc", "item2":"AU", "factor":206266.3}, {"item1":"blue whale length", "item2": "m", "factor": 29.9}, + {"item1":"m", "item2": "ångström", "factor": 10000000000}, + {"item1":"smoot", "item2": "cm", "factor": 170}, {"item1":"floz", "item2":"mL", "factor":29.57344}, {"item1":"L", "item2":"mL", "factor":1000}, diff --git a/jenkinsfile b/jenkinsfile new file mode 100644 index 0000000..fa8b307 --- /dev/null +++ b/jenkinsfile @@ -0,0 +1,17 @@ +pipeline { + agent any + + stages { + stage('clean old'){ + steps{ + sh 'rm -rf bin obj' + } + } + stage('Build') { + steps { + sh 'dotnet publish directors-assistant.csproj --configuration Release --os linux' + archiveArtifacts artifacts: 'bin/Release/net7.0/linux-x64/publish/*' + } + } + } +} \ No newline at end of file diff --git a/wwwroot/css/site.css b/wwwroot/css/site.css index 902e6a7..da4f34b 100644 --- a/wwwroot/css/site.css +++ b/wwwroot/css/site.css @@ -20,7 +20,7 @@ html { body { margin-bottom: 60px; } -.protocol-icon{ +.protocol-icon,.channel-type-icon{ display:inline-block; width: 32px; height: 32px; @@ -31,4 +31,16 @@ body { } .twitch .protocol-icon{ background-image: url("../imgs/twitch.png"); -} \ No newline at end of file +} +.Normal .channel-type-icon{ + background-color: black; +} +.DM .channel-type-icon{ + background-color: black; +} +.Protocol .channel-type-icon{ + background-color: black; +} +.OU .channel-type-icon{ + background-color: black; +}