commit 5b1808d8e71b53ed9339a0176a2d6da0d461b26e
parent 36a92b379527b4e57938acb105505eeaf357b7a7
Author: William Casarin <jb55@jb55.com>
Date: Fri, 7 Apr 2023 10:10:13 -0700
Add custom #plebchain icon
Changelog-Added: Add custom #plebchain icon
Diffstat:
5 files changed, 97 insertions(+), 0 deletions(-)
diff --git a/damus/Assets.xcassets/Colors/DamusDeepPurple.colorset/Contents.json b/damus/Assets.xcassets/Colors/DamusDeepPurple.colorset/Contents.json
@@ -0,0 +1,20 @@
+{
+ "colors" : [
+ {
+ "color" : {
+ "color-space" : "srgb",
+ "components" : {
+ "alpha" : "1.000",
+ "blue" : "0xED",
+ "green" : "0x26",
+ "red" : "0xBF"
+ }
+ },
+ "idiom" : "universal"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/damus/Assets.xcassets/Hashtags/plebchain-hashtag.imageset/Contents.json b/damus/Assets.xcassets/Hashtags/plebchain-hashtag.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "plebchain.svg",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "plebchain.svg",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "plebchain.svg",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/damus/Assets.xcassets/Hashtags/plebchain-hashtag.imageset/plebchain.svg b/damus/Assets.xcassets/Hashtags/plebchain-hashtag.imageset/plebchain.svg
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ viewBox="0 0 21.315096 18"
+ width="21.315096"
+ height="18"
+ version="1.1"
+ id="svg21"
+ sodipodi:docname="plebchain.svg"
+ inkscape:version="1.3-dev (77bc73e, 2022-05-18)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs21" />
+ <sodipodi:namedview
+ id="namedview21"
+ pagecolor="#ffffff"
+ bordercolor="#000000"
+ borderopacity="0.25"
+ inkscape:showpageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1"
+ showgrid="false"
+ inkscape:zoom="19.666667"
+ inkscape:cx="12.762712"
+ inkscape:cy="12.991525"
+ inkscape:window-width="1418"
+ inkscape:window-height="883"
+ inkscape:window-x="1745"
+ inkscape:window-y="10"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg21" />
+ <path
+ d="M 18.625339,11.886754 C 17.668676,9.87076 15.553749,8.748431 12.298294,7.531368 12.258627,7.5164347 11.514296,7.2747022 10.649566,6.9942364 9.6532356,6.6713042 8.5682391,6.7520372 7.6316422,7.220569 L 5.7999816,8.136166 13.616623,17.9338 h 4.316652 l 0.703264,-1.662727 c 0.593598,-1.401862 0.641198,-3.009057 -0.0112,-4.384319 z"
+ id="path5"
+ style="fill:#bf26ed;fill-opacity:1;stroke-width:0.466665" />
+ <path
+ d="M 16.627546,5.1089093 C 16.710146,4.5484447 16.797412,3.95578 16.838479,3.6790475 17.083011,2.0219197 15.937348,0.48005806 14.28022,0.23552546 12.623092,-0.00900704 11.081231,1.1366559 10.836698,2.7937838 c -0.0406,0.2762657 -0.128333,0.8689305 -0.210932,1.4298619 -0.282799,0.058333 -0.513332,0.2851324 -0.558132,0.5870648 -0.0658,0.441465 0.084,1.0145298 0.370999,1.2072625 0.09707,1.4303286 1.118596,2.778524 2.547992,2.989457 1.429395,0.210933 2.796257,-0.785398 3.302589,-2.1265932 0.330399,-0.1021996 0.639331,-0.6071313 0.703731,-1.0490632 0.0434,-0.302399 -0.111533,-0.5856647 -0.365399,-0.7228643 z"
+ id="path10"
+ style="fill:#bf26ed;fill-opacity:1;stroke-width:0.466665" />
+ <path
+ d="m 21.193864,14.872477 c -0.0392,-0.501665 -0.310799,-0.956663 -0.684131,-1.294529 l -1.900727,-1.723394 c 0,0 0.172666,0.346732 0.332732,1.276796 L 15.53415,11.550288 c -0.878731,-0.405999 -1.835861,-0.616465 -2.804191,-0.616465 h -0.807331 c -0.87733,0 -1.681394,-0.553464 -1.9338602,-1.393928 C 9.8926348,9.220696 9.819835,8.832897 9.7904351,8.363432 V 8.362965 C 10.503966,7.7651672 10.944031,6.8285703 10.968765,5.8700401 11.247364,5.6651742 11.372897,5.0865094 11.28843,4.648311 11.230564,4.3482453 10.990698,4.1317127 10.706032,4.0850462 10.599632,3.5283147 10.487633,2.93985 10.435366,2.6654509 10.121301,1.0199896 8.5327726,-0.05940684 6.8873113,0.25419216 5.2418501,0.56779106 4.1624536,2.1567859 4.4760526,3.8022471 4.5283191,4.0766462 4.6407854,4.665111 4.7467184,5.2218423 4.4989192,5.3697751 4.355653,5.6595742 4.4125861,5.9596399 4.4956525,6.3983051 4.8255848,6.8901701 5.159717,6.9779032 5.2950499,7.2952355 5.4798493,7.5892345 5.7015152,7.8510336 L 5.7999816,8.136166 5.2171168,11.699621 3.2925898,12.11822 C 3.041524,12.177953 2.8109914,12.278752 2.6061254,12.411752 1.8342613,12.912484 1.5458622,13.865414 1.7731282,14.725478 1.8309946,14.943877 2.8833245,17.9338 2.8833245,17.9338 H 15.133284 l 0.408332,-1.691661 3.480855,0.605265 c 1.184397,0.211399 2.267993,-0.748064 2.171393,-1.974927 z"
+ id="path16"
+ style="fill:#f59119;fill-opacity:1;stroke-width:0.466665" />
+ <path
+ d="m 12.589026,15.06801 -2.251659,-0.776531 c 0,0 0.96693,-0.1106 0.95853,-0.625798 -4.67e-4,-0.03687 -0.01213,-0.240332 -0.307999,-0.210932 -0.0812,0.0079 -0.734064,0.07327 -1.1927962,0.118999 -0.3028657,0.03033 -0.6015314,0.09007 -0.8927304,0.178733 l -0.1591328,0.04853 -3.5256551,-2.101393 c 0,0 0,0 0.3495322,-0.763464 C 6.1779803,9.600561 5.8004482,8.136166 5.8004482,8.136166 L 1.324663,10.373825 C 0.63539857,10.718224 0.2,11.422889 0.2,12.193819 c 0,0.939397 0.64306455,1.756528 1.5558615,1.977727 l 6.4357789,1.371062 2.5834586,0.955731 c 0.167999,0.0532 0.329932,0.0602 0.517065,0.0033 0.187599,-0.05693 0.246399,-0.09847 0.337398,-0.165199 0.2464,-0.180133 0.706065,-0.536665 1.037864,-0.795664 0.170799,-0.133933 0.125533,-0.402266 -0.0784,-0.472732 z"
+ id="path21"
+ style="fill:#bf26ed;fill-opacity:1;stroke-width:0.466665" />
+</svg>
diff --git a/damus/Components/DamusColors.swift b/damus/Components/DamusColors.swift
@@ -18,6 +18,7 @@ class DamusColors {
static let darkGrey = Color("DamusDarkGrey")
static let green = Color("DamusGreen")
static let purple = Color("DamusPurple")
+ static let deepPurple = Color("DamusDeepPurple")
static let blue = Color("DamusBlue")
}
diff --git a/damus/Util/Hashtags.swift b/damus/Util/Hashtags.swift
@@ -22,6 +22,7 @@ struct CustomHashtag {
static let coffee = CustomHashtag(name: "coffee", color: DamusColors.brown, offset: -1.0)
static let bitcoin = CustomHashtag(name: "bitcoin", color: Color.orange, offset: -3.0)
static let nostr = CustomHashtag(name: "nostr", color: DamusColors.purple, offset: -2.0)
+ static let plebchain = CustomHashtag(name: "plebchain", color: DamusColors.deepPurple, offset: -3.0)
}
@@ -30,6 +31,7 @@ let custom_hashtags: [String: CustomHashtag] = [
"nostr": CustomHashtag.nostr,
"coffee": CustomHashtag.coffee,
"coffeechain": CustomHashtag.coffee,
+ "plebchain": CustomHashtag.plebchain,
]
func hashtag_str(_ htag: String) -> CompatibleText {