From 82fff4591cdc37a942f83ee8bdae6bdb43dcaa26 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Fri, 7 Apr 2023 12:05:54 -0700 Subject: [PATCH] Add #zap and #zapathon custom hashtags Changelog-Added: Add #zap and #zapathon custom hashtags --- .../Colors/DamusYellow.colorset/Contents.json | 20 +++++++ .../zap-hashtag.imageset/Contents.json | 23 +++++++ .../zap-hashtag.imageset/zapathon.svg | 60 +++++++++++++++++++ damus/Components/DamusColors.swift | 1 + damus/Util/Hashtags.swift | 3 + 5 files changed, 107 insertions(+) create mode 100644 damus/Assets.xcassets/Colors/DamusYellow.colorset/Contents.json create mode 100644 damus/Assets.xcassets/Hashtags/zap-hashtag.imageset/Contents.json create mode 100644 damus/Assets.xcassets/Hashtags/zap-hashtag.imageset/zapathon.svg diff --git a/damus/Assets.xcassets/Colors/DamusYellow.colorset/Contents.json b/damus/Assets.xcassets/Colors/DamusYellow.colorset/Contents.json new file mode 100644 index 00000000..1d9c188a --- /dev/null +++ b/damus/Assets.xcassets/Colors/DamusYellow.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x05", + "green" : "0xDF", + "red" : "0xFA" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/damus/Assets.xcassets/Hashtags/zap-hashtag.imageset/Contents.json b/damus/Assets.xcassets/Hashtags/zap-hashtag.imageset/Contents.json new file mode 100644 index 00000000..37663ab7 --- /dev/null +++ b/damus/Assets.xcassets/Hashtags/zap-hashtag.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "zapathon.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "zapathon.svg", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "zapathon.svg", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/damus/Assets.xcassets/Hashtags/zap-hashtag.imageset/zapathon.svg b/damus/Assets.xcassets/Hashtags/zap-hashtag.imageset/zapathon.svg new file mode 100644 index 00000000..266924b2 --- /dev/null +++ b/damus/Assets.xcassets/Hashtags/zap-hashtag.imageset/zapathon.svg @@ -0,0 +1,60 @@ + + + + + + + + + + + + + diff --git a/damus/Components/DamusColors.swift b/damus/Components/DamusColors.swift index 6e08edb4..b6115fac 100644 --- a/damus/Components/DamusColors.swift +++ b/damus/Components/DamusColors.swift @@ -13,6 +13,7 @@ class DamusColors { static let white = Color("DamusWhite") static let black = Color("DamusBlack") static let brown = Color("DamusBrown") + static let yellow = Color("DamusYellow") static let lightGrey = Color("DamusLightGrey") static let mediumGrey = Color("DamusMediumGrey") static let darkGrey = Color("DamusDarkGrey") diff --git a/damus/Util/Hashtags.swift b/damus/Util/Hashtags.swift index 64b253d8..d0aab355 100644 --- a/damus/Util/Hashtags.swift +++ b/damus/Util/Hashtags.swift @@ -23,6 +23,7 @@ struct CustomHashtag { 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) + static let zap = CustomHashtag(name: "zap", color: DamusColors.yellow, offset: -4.0) } @@ -32,6 +33,8 @@ let custom_hashtags: [String: CustomHashtag] = [ "coffee": CustomHashtag.coffee, "coffeechain": CustomHashtag.coffee, "plebchain": CustomHashtag.plebchain, + "zap": CustomHashtag.zap, + "zapathon": CustomHashtag.zap, ] func hashtag_str(_ htag: String) -> CompatibleText {