Compare commits

...

24 Commits

Author SHA1 Message Date
ac39454a6e Rename Friends of Friends to Trusted Network and add popover tips to DMs and Notifications toolbars on Trusted Network button
Changelog-Changed: Renamed Friends of Friends to Trusted Network

Changelog-Added: Added popover tips to DMs and Notifications toolbars on Trusted Network button
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-06-16 13:50:56 -04:00
9eeb00c897 Add tip in threads to inform users what trusted network means
Changelog-Added: Added tip in threads to inform users what trusted network means
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-06-16 13:50:55 -04:00
140da5ba09 Add web of trust reply sorting in threads to mitigate spam
Changelog-Added: Added web of trust reply sorting in threads to mitigate spam
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-06-16 13:50:12 -04:00
f436291209 Hide end previewables when hashtags are present
Changelog-Fixed: Hide end previewables when hashtags are present
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-06-02 11:44:59 -07:00
a9196a39df Fix wallet transactions to always show profile display name unless there is no pubkey
Changelog-Fixed: Fixed wallet transactions to always show profile display name unless there is no pubkey
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-06-02 11:41:51 -07:00
William Casarin
6a8ee9c360 Merge remote-tracking branches 'github/pr/3066' and 'github/pr/3065' 2025-06-02 07:01:35 -07:00
947e24864e Add privacy-based redaction to nsec in key settings view
Changelog-Changed: Added privacy-based redaction to nsec in key settings view
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-06-01 19:54:46 -04:00
b9198d6bd7 Add privacy-based redaction to wallet view
Changelog-Changed: Added privacy-based redaction to wallet view
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-06-01 18:36:33 -04:00
William Casarin
14bf187a6e Merge remote-tracking branches 'github/pr/30{62,57,55,51,50}'
Merge a bunch of changes from terry, translations, and me

Terry Yiu (4):
      Add NIP-05 favicon to profile names and NIP-05 web of trust feed
      Fix quotes view header alignment
      Export strings for translation
      Rename Bitcoin Beach wallet to Blink

Transifex (11):
      Translate Localizable.strings in th
      Translate Localizable.strings in th
      Translate Localizable.strings in nl
      Translate Localizable.strings in de
      Translate Localizable.stringsdict in de
      Translate Localizable.stringsdict in de
      Translate Localizable.strings in th
      Translate Localizable.strings in th
      Translate Localizable.strings in th
      Translate Localizable.strings in th
      Translate Localizable.strings in th

William Casarin (2):
      perf: don't use regex in trim_{prefix,suffix}
2025-06-01 00:36:19 +02:00
William Casarin
c996e5f8b3 perf: don't use regex in trim_{prefix,suffix}
regex is overkill for this, and performance is quite bad

Fixes: b131c74ee3 ("Add prefix and suffix string trimming functions")
Signed-off-by: William Casarin <jb55@jb55.com>
2025-05-31 20:17:14 +02:00
b6dad349c9 Rename Bitcoin Beach wallet to Blink
Changelog-Changed: Renamed Bitcoin Beach wallet to Blink

Closes: https://github.com/damus-io/damus/issues/3056
2025-05-30 12:37:13 -04:00
transifex-integration[bot]
56dde30cf6 Translate Localizable.strings in th
100% translated source file: 'Localizable.strings'
on 'th'.
2025-05-29 09:24:57 -07:00
transifex-integration[bot]
95bfbae131 Translate Localizable.strings in th
100% translated source file: 'Localizable.strings'
on 'th'.
2025-05-29 09:24:57 -07:00
transifex-integration[bot]
3da0ff7ecc Translate Localizable.strings in th
100% translated source file: 'Localizable.strings'
on 'th'.
2025-05-29 09:24:57 -07:00
transifex-integration[bot]
b8f846ded8 Translate Localizable.strings in th
100% translated source file: 'Localizable.strings'
on 'th'.
2025-05-29 09:24:57 -07:00
transifex-integration[bot]
e74c45ad39 Translate Localizable.strings in th
100% translated source file: 'Localizable.strings'
on 'th'.
2025-05-29 09:24:57 -07:00
transifex-integration[bot]
e6a03522c6 Translate Localizable.stringsdict in de
100% translated source file: 'Localizable.stringsdict'
on 'de'.
2025-05-29 09:24:57 -07:00
transifex-integration[bot]
dbc7d79ecd Translate Localizable.stringsdict in de
100% translated source file: 'Localizable.stringsdict'
on 'de'.
2025-05-29 09:24:57 -07:00
transifex-integration[bot]
d2b5a65eca Translate Localizable.strings in de
100% translated source file: 'Localizable.strings'
on 'de'.
2025-05-29 09:24:57 -07:00
transifex-integration[bot]
16b19d3a96 Translate Localizable.strings in nl
100% translated source file: 'Localizable.strings'
on 'nl'.
2025-05-29 09:24:56 -07:00
transifex-integration[bot]
70edb8d7c5 Translate Localizable.strings in th
100% translated source file: 'Localizable.strings'
on 'th'.
2025-05-29 09:24:56 -07:00
ea04ebe95c Export strings for translation
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-05-29 09:24:56 -07:00
transifex-integration[bot]
44cf47faa4 Translate Localizable.strings in th
100% translated source file: 'Localizable.strings'
on 'th'.
2025-05-29 09:24:55 -07:00
20af086273 Add NIP-05 favicon to profile names and NIP-05 web of trust feed
Changelog-Added: Added NIP-05 favicon to profile names and NIP-05 web of trust feed
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-05-27 00:54:03 -04:00
55 changed files with 1803 additions and 314 deletions

View File

@@ -14,6 +14,12 @@
31D2E847295218AF006D67F8 /* Shimmer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31D2E846295218AF006D67F8 /* Shimmer.swift */; };
3A0A30BB2C21397A00F8C9BC /* EmojiPicker in Frameworks */ = {isa = PBXBuildFile; productRef = 3A0A30BA2C21397A00F8C9BC /* EmojiPicker */; };
3A23838E2A297DD200E5AA2E /* ZapButtonModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A23838D2A297DD200E5AA2E /* ZapButtonModel.swift */; };
3A2BAC5A2DD7E4C400EBB4CC /* NIP05DomainTimelineHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A2BAC592DD7E4C400EBB4CC /* NIP05DomainTimelineHeaderView.swift */; };
3A2BAC5B2DD7E4C400EBB4CC /* NIP05DomainTimelineHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A2BAC592DD7E4C400EBB4CC /* NIP05DomainTimelineHeaderView.swift */; };
3A2BAC5C2DD7E4C400EBB4CC /* NIP05DomainTimelineHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A2BAC592DD7E4C400EBB4CC /* NIP05DomainTimelineHeaderView.swift */; };
3A2BAC5E2DE02E8600EBB4CC /* NIP05DomainPubkeysView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A2BAC5D2DE02E8600EBB4CC /* NIP05DomainPubkeysView.swift */; };
3A2BAC5F2DE02E8600EBB4CC /* NIP05DomainPubkeysView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A2BAC5D2DE02E8600EBB4CC /* NIP05DomainPubkeysView.swift */; };
3A2BAC602DE02E8600EBB4CC /* NIP05DomainPubkeysView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A2BAC5D2DE02E8600EBB4CC /* NIP05DomainPubkeysView.swift */; };
3A3040ED29A5CB86008A0F29 /* ReplyDescriptionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A3040EC29A5CB86008A0F29 /* ReplyDescriptionTests.swift */; };
3A3040F129A8FF97008A0F29 /* LocalizationUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A3040F029A8FF97008A0F29 /* LocalizationUtil.swift */; };
3A3040F329A91366008A0F29 /* ProfileViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A3040F229A91366008A0F29 /* ProfileViewTests.swift */; };
@@ -21,10 +27,23 @@
3A4325A82961E11400BFCD9D /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 3A4325AA2961E11400BFCD9D /* Localizable.stringsdict */; };
3A4647CF2A413ADC00386AD8 /* CondensedProfilePicturesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A4647CE2A413ADC00386AD8 /* CondensedProfilePicturesView.swift */; };
3A48E7B029DFBE9D006E787E /* MutedThreadsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A48E7AF29DFBE9D006E787E /* MutedThreadsManager.swift */; };
3A515C502DF4E100002D3B34 /* TrustedNetworkRepliesTip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A515C4F2DF4E100002D3B34 /* TrustedNetworkRepliesTip.swift */; };
3A515C512DF4E100002D3B34 /* TrustedNetworkRepliesTip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A515C4F2DF4E100002D3B34 /* TrustedNetworkRepliesTip.swift */; };
3A515C522DF4E100002D3B34 /* TrustedNetworkRepliesTip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A515C4F2DF4E100002D3B34 /* TrustedNetworkRepliesTip.swift */; };
3A515C542DF5371D002D3B34 /* TrustedNetworkButtonTipViewStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A515C532DF5371D002D3B34 /* TrustedNetworkButtonTipViewStyle.swift */; };
3A515C552DF5371D002D3B34 /* TrustedNetworkButtonTipViewStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A515C532DF5371D002D3B34 /* TrustedNetworkButtonTipViewStyle.swift */; };
3A515C562DF5371D002D3B34 /* TrustedNetworkButtonTipViewStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A515C532DF5371D002D3B34 /* TrustedNetworkButtonTipViewStyle.swift */; };
3A8CC6CC2A2CFEF900940F5F /* StringUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A8CC6CB2A2CFEF900940F5F /* StringUtil.swift */; };
3A92C0FE2DE16E9800CEEBAC /* FaviconCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A92C0FD2DE16E9800CEEBAC /* FaviconCache.swift */; };
3A92C0FF2DE16E9800CEEBAC /* FaviconCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A92C0FD2DE16E9800CEEBAC /* FaviconCache.swift */; };
3A92C1002DE16E9800CEEBAC /* FaviconCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A92C0FD2DE16E9800CEEBAC /* FaviconCache.swift */; };
3A92C1022DE17ACA00CEEBAC /* NIP05DomainTimelineHeaderViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A92C1012DE17ACA00CEEBAC /* NIP05DomainTimelineHeaderViewTests.swift */; };
3A96E3FE2D6BCE3800AE1630 /* RepostedTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A96E3FD2D6BCE3800AE1630 /* RepostedTests.swift */; };
3AA247FF297E3D900090C62D /* RepostsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA247FE297E3D900090C62D /* RepostsView.swift */; };
3AA24802297E3DC20090C62D /* RepostView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA24801297E3DC20090C62D /* RepostView.swift */; };
3AA2F4E82DF1467A00B18606 /* TrustedNetworkButtonTip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA2F4E72DF1467A00B18606 /* TrustedNetworkButtonTip.swift */; };
3AA2F4E92DF1467A00B18606 /* TrustedNetworkButtonTip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA2F4E72DF1467A00B18606 /* TrustedNetworkButtonTip.swift */; };
3AA2F4EA2DF1467A00B18606 /* TrustedNetworkButtonTip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA2F4E72DF1467A00B18606 /* TrustedNetworkButtonTip.swift */; };
3AA59D1D2999B0400061C48E /* DraftsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AA59D1C2999B0400061C48E /* DraftsModel.swift */; };
3AAA95CA298DF87B00F3D526 /* TranslationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAA95C9298DF87B00F3D526 /* TranslationService.swift */; };
3AAA95CC298E07E900F3D526 /* DeepLPlan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AAA95CB298E07E900F3D526 /* DeepLPlan.swift */; };
@@ -33,6 +52,15 @@
3ACB685C297633BC00C46468 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3ACB685A297633BC00C46468 /* InfoPlist.strings */; };
3ACB685F297633BC00C46468 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3ACB685D297633BC00C46468 /* Localizable.strings */; };
3ACBCB78295FE5C70037388A /* TimeAgoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ACBCB77295FE5C70037388A /* TimeAgoTests.swift */; };
3ACF94382DA9A52F00971A4E /* FaviconFinder in Frameworks */ = {isa = PBXBuildFile; productRef = 3ACF94372DA9A52F00971A4E /* FaviconFinder */; };
3ACF943E2DA9B10800971A4E /* FaviconFinder in Frameworks */ = {isa = PBXBuildFile; productRef = 3ACF943D2DA9B10800971A4E /* FaviconFinder */; };
3ACF94402DA9B11200971A4E /* FaviconFinder in Frameworks */ = {isa = PBXBuildFile; productRef = 3ACF943F2DA9B11200971A4E /* FaviconFinder */; };
3ACF94422DA9FCAB00971A4E /* NIP05DomainTimelineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ACF94412DA9FCAB00971A4E /* NIP05DomainTimelineView.swift */; };
3ACF94432DA9FCAB00971A4E /* NIP05DomainTimelineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ACF94412DA9FCAB00971A4E /* NIP05DomainTimelineView.swift */; };
3ACF94442DA9FCAB00971A4E /* NIP05DomainTimelineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ACF94412DA9FCAB00971A4E /* NIP05DomainTimelineView.swift */; };
3ACF94462DAA006500971A4E /* NIP05DomainEventsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ACF94452DAA006500971A4E /* NIP05DomainEventsModel.swift */; };
3ACF94472DAA006500971A4E /* NIP05DomainEventsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ACF94452DAA006500971A4E /* NIP05DomainEventsModel.swift */; };
3ACF94482DAA006500971A4E /* NIP05DomainEventsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ACF94452DAA006500971A4E /* NIP05DomainEventsModel.swift */; };
3AE45AF6297BB2E700C1D842 /* LibreTranslateServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE45AF5297BB2E700C1D842 /* LibreTranslateServer.swift */; };
3CCD1E6A2A874C4E0099A953 /* Nip98HTTPAuth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CCD1E692A874C4E0099A953 /* Nip98HTTPAuth.swift */; };
4C011B5E2BD0A56A002F2F9B /* ChatEventView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C011B5C2BD0A56A002F2F9B /* ChatEventView.swift */; };
@@ -47,6 +75,7 @@
4C0A3F93280F66F5000448DE /* ReplyMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0A3F92280F66F5000448DE /* ReplyMap.swift */; };
4C0C03992A61E27B0098B3B8 /* primal.wasm in Resources */ = {isa = PBXBuildFile; fileRef = 4C0C03972A61E27B0098B3B8 /* primal.wasm */; };
4C0C039A2A61E27B0098B3B8 /* bool_setting.wasm in Resources */ = {isa = PBXBuildFile; fileRef = 4C0C03982A61E27B0098B3B8 /* bool_setting.wasm */; };
4C0ED07F2D7A1E260020D8A2 /* Benchmarking.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0ED07E2D7A1E260020D8A2 /* Benchmarking.swift */; };
4C1253502A76C5B20004F4B8 /* UnfollowedNotify.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C12534F2A76C5B20004F4B8 /* UnfollowedNotify.swift */; };
4C1253522A76C6130004F4B8 /* ComposeNotify.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C1253512A76C6130004F4B8 /* ComposeNotify.swift */; };
4C1253542A76C7D60004F4B8 /* LogoutNotify.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C1253532A76C7D60004F4B8 /* LogoutNotify.swift */; };
@@ -244,7 +273,7 @@
4C8D00CF29E38B950036AF10 /* nostr_bech32.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C8D00CE29E38B950036AF10 /* nostr_bech32.c */; };
4C8D00D429E3C5D40036AF10 /* NIP19Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C8D00D329E3C5D40036AF10 /* NIP19Tests.swift */; };
4C8D1A6C29F1DFC200ACDF75 /* FriendIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C8D1A6B29F1DFC200ACDF75 /* FriendIcon.swift */; };
4C8D1A6F29F31E5000ACDF75 /* FriendsButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C8D1A6E29F31E5000ACDF75 /* FriendsButton.swift */; };
4C8D1A6F29F31E5000ACDF75 /* TrustedNetworkButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C8D1A6E29F31E5000ACDF75 /* TrustedNetworkButton.swift */; };
4C8EC52529D1FA6C0085D9A8 /* DamusColors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C8EC52429D1FA6C0085D9A8 /* DamusColors.swift */; };
4C8FA7242BED58A900798A6A /* ThreadReply.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C45E5012BED4D000025A428 /* ThreadReply.swift */; };
4C9054852A6AEAA000811EEC /* NdbTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C9054842A6AEAA000811EEC /* NdbTests.swift */; };
@@ -743,7 +772,7 @@
82D6FBD52CD99F7900C925F4 /* ConnectWalletView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7D095C2A098C5D00943473 /* ConnectWalletView.swift */; };
82D6FBD62CD99F7900C925F4 /* WalletView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7D095D2A098C5D00943473 /* WalletView.swift */; };
82D6FBD72CD99F7900C925F4 /* NWCScannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7D09672A0AE9B200943473 /* NWCScannerView.swift */; };
82D6FBD82CD99F7900C925F4 /* FriendsButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C8D1A6E29F31E5000ACDF75 /* FriendsButton.swift */; };
82D6FBD82CD99F7900C925F4 /* TrustedNetworkButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C8D1A6E29F31E5000ACDF75 /* TrustedNetworkButton.swift */; };
82D6FBD92CD99F7900C925F4 /* GradientFollowButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = F71694F32A6732B7001F4053 /* GradientFollowButton.swift */; };
82D6FBDA2CD99F7900C925F4 /* AlbyButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7D09652A0AE62100943473 /* AlbyButton.swift */; };
82D6FBDC2CD99F7900C925F4 /* DamusVideoPlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C1A9A2929DDF54400516EAC /* DamusVideoPlayerView.swift */; };
@@ -1285,7 +1314,7 @@
D73E5ECC2C6A97F4007EB227 /* SuggestedUsersViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F71694EB2A662292001F4053 /* SuggestedUsersViewModel.swift */; };
D73E5ED22C6A97F4007EB227 /* WalletView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7D095D2A098C5D00943473 /* WalletView.swift */; };
D73E5ED32C6A97F4007EB227 /* NWCScannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7D09672A0AE9B200943473 /* NWCScannerView.swift */; };
D73E5ED42C6A97F4007EB227 /* FriendsButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C8D1A6E29F31E5000ACDF75 /* FriendsButton.swift */; };
D73E5ED42C6A97F4007EB227 /* TrustedNetworkButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C8D1A6E29F31E5000ACDF75 /* TrustedNetworkButton.swift */; };
D73E5ED52C6A97F4007EB227 /* GradientFollowButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = F71694F32A6732B7001F4053 /* GradientFollowButton.swift */; };
D73E5ED62C6A97F4007EB227 /* AlbyButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C7D09652A0AE62100943473 /* AlbyButton.swift */; };
D73E5ED82C6A97F4007EB227 /* DamusVideoPlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C1A9A2929DDF54400516EAC /* DamusVideoPlayerView.swift */; };
@@ -1808,6 +1837,8 @@
3A25EF142992DA5D008ABE69 /* el-GR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "el-GR"; path = "el-GR.lproj/Localizable.strings"; sourceTree = "<group>"; };
3A25EF152992DA5D008ABE69 /* el-GR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "el-GR"; path = "el-GR.lproj/Localizable.stringsdict"; sourceTree = "<group>"; };
3A2B8B0A296A8982009CC16D /* en-US */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "en-US"; path = "en-US.lproj/Localizable.stringsdict"; sourceTree = "<group>"; };
3A2BAC592DD7E4C400EBB4CC /* NIP05DomainTimelineHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NIP05DomainTimelineHeaderView.swift; sourceTree = "<group>"; };
3A2BAC5D2DE02E8600EBB4CC /* NIP05DomainPubkeysView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NIP05DomainPubkeysView.swift; sourceTree = "<group>"; };
3A3040EC29A5CB86008A0F29 /* ReplyDescriptionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReplyDescriptionTests.swift; sourceTree = "<group>"; };
3A3040F029A8FF97008A0F29 /* LocalizationUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizationUtil.swift; sourceTree = "<group>"; };
3A3040F229A91366008A0F29 /* ProfileViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewTests.swift; sourceTree = "<group>"; };
@@ -1833,6 +1864,8 @@
3A47CB782BDA05A200728A7C /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/Localizable.strings; sourceTree = "<group>"; };
3A47CB792BDA05A200728A7C /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = fi; path = fi.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
3A48E7AF29DFBE9D006E787E /* MutedThreadsManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MutedThreadsManager.swift; sourceTree = "<group>"; };
3A515C4F2DF4E100002D3B34 /* TrustedNetworkRepliesTip.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrustedNetworkRepliesTip.swift; sourceTree = "<group>"; };
3A515C532DF5371D002D3B34 /* TrustedNetworkButtonTipViewStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrustedNetworkButtonTipViewStyle.swift; sourceTree = "<group>"; };
3A5C4575296A879E0032D398 /* es-419 */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "es-419"; path = "es-419.lproj/Localizable.stringsdict"; sourceTree = "<group>"; };
3A5CAE1D298DC0DB00B5334F /* zh-CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-CN"; path = "zh-CN.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
3A5CAE1E298DC0DB00B5334F /* zh-CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-CN"; path = "zh-CN.lproj/Localizable.strings"; sourceTree = "<group>"; };
@@ -1853,6 +1886,8 @@
3A929C20297F2CF80090925E /* it-IT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "it-IT"; path = "it-IT.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
3A929C21297F2CF80090925E /* it-IT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "it-IT"; path = "it-IT.lproj/Localizable.strings"; sourceTree = "<group>"; };
3A929C22297F2CF80090925E /* it-IT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "it-IT"; path = "it-IT.lproj/Localizable.stringsdict"; sourceTree = "<group>"; };
3A92C0FD2DE16E9800CEEBAC /* FaviconCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FaviconCache.swift; sourceTree = "<group>"; };
3A92C1012DE17ACA00CEEBAC /* NIP05DomainTimelineHeaderViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NIP05DomainTimelineHeaderViewTests.swift; sourceTree = "<group>"; };
3A93342929884CA600D6A8F3 /* pl-PL */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pl-PL"; path = "pl-PL.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
3A93342A29884CA600D6A8F3 /* pl-PL */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pl-PL"; path = "pl-PL.lproj/Localizable.strings"; sourceTree = "<group>"; };
3A93342B29884CA600D6A8F3 /* pl-PL */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "pl-PL"; path = "pl-PL.lproj/Localizable.stringsdict"; sourceTree = "<group>"; };
@@ -1865,6 +1900,7 @@
3A994C4E2BE5B9370019F632 /* th */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = th; path = th.lproj/Localizable.strings; sourceTree = "<group>"; };
3AA247FE297E3D900090C62D /* RepostsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepostsView.swift; sourceTree = "<group>"; };
3AA24801297E3DC20090C62D /* RepostView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepostView.swift; sourceTree = "<group>"; };
3AA2F4E72DF1467A00B18606 /* TrustedNetworkButtonTip.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrustedNetworkButtonTip.swift; sourceTree = "<group>"; };
3AA59D1C2999B0400061C48E /* DraftsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DraftsModel.swift; sourceTree = "<group>"; };
3AA5E70229B682A5002701ED /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/Localizable.strings; sourceTree = "<group>"; };
3AA5E70329B682AD002701ED /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/InfoPlist.strings; sourceTree = "<group>"; };
@@ -1891,6 +1927,8 @@
3ACB685B297633BC00C46468 /* es-419 */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-419"; path = "es-419.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
3ACB685E297633BC00C46468 /* es-419 */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-419"; path = "es-419.lproj/Localizable.strings"; sourceTree = "<group>"; };
3ACBCB77295FE5C70037388A /* TimeAgoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeAgoTests.swift; sourceTree = "<group>"; };
3ACF94412DA9FCAB00971A4E /* NIP05DomainTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NIP05DomainTimelineView.swift; sourceTree = "<group>"; };
3ACF94452DAA006500971A4E /* NIP05DomainEventsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NIP05DomainEventsModel.swift; sourceTree = "<group>"; };
3AD14EB529C40F38009D2D9C /* hu-HU */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "hu-HU"; path = "hu-HU.lproj/Localizable.stringsdict"; sourceTree = "<group>"; };
3AD14EB629C40F38009D2D9C /* hu-HU */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "hu-HU"; path = "hu-HU.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
3AD14EB729C40F38009D2D9C /* hu-HU */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "hu-HU"; path = "hu-HU.lproj/Localizable.strings"; sourceTree = "<group>"; };
@@ -1925,6 +1963,7 @@
4C0A3F92280F66F5000448DE /* ReplyMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReplyMap.swift; sourceTree = "<group>"; };
4C0C03972A61E27B0098B3B8 /* primal.wasm */ = {isa = PBXFileReference; lastKnownFileType = file; name = primal.wasm; path = nostrscript/primal.wasm; sourceTree = SOURCE_ROOT; };
4C0C03982A61E27B0098B3B8 /* bool_setting.wasm */ = {isa = PBXFileReference; lastKnownFileType = file; name = bool_setting.wasm; path = nostrscript/bool_setting.wasm; sourceTree = SOURCE_ROOT; };
4C0ED07E2D7A1E260020D8A2 /* Benchmarking.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Benchmarking.swift; sourceTree = "<group>"; };
4C12534F2A76C5B20004F4B8 /* UnfollowedNotify.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UnfollowedNotify.swift; sourceTree = "<group>"; };
4C1253512A76C6130004F4B8 /* ComposeNotify.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposeNotify.swift; sourceTree = "<group>"; };
4C1253532A76C7D60004F4B8 /* LogoutNotify.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogoutNotify.swift; sourceTree = "<group>"; };
@@ -2249,7 +2288,7 @@
4C8D00D229E3C19F0036AF10 /* str_block.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = str_block.h; sourceTree = "<group>"; };
4C8D00D329E3C5D40036AF10 /* NIP19Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NIP19Tests.swift; sourceTree = "<group>"; };
4C8D1A6B29F1DFC200ACDF75 /* FriendIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendIcon.swift; sourceTree = "<group>"; };
4C8D1A6E29F31E5000ACDF75 /* FriendsButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendsButton.swift; sourceTree = "<group>"; };
4C8D1A6E29F31E5000ACDF75 /* TrustedNetworkButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrustedNetworkButton.swift; sourceTree = "<group>"; };
4C8EC52429D1FA6C0085D9A8 /* DamusColors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DamusColors.swift; sourceTree = "<group>"; };
4C9054842A6AEAA000811EEC /* NdbTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NdbTests.swift; sourceTree = "<group>"; };
4C9054882A6AED4700811EEC /* NdbTagIterator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NdbTagIterator.swift; sourceTree = "<group>"; };
@@ -2617,6 +2656,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
3ACF94382DA9A52F00971A4E /* FaviconFinder in Frameworks */,
4C06670428FC7EC500038D2A /* Kingfisher in Frameworks */,
D7DB1FE42D5A9AC900CF06DA /* CryptoSwift in Frameworks */,
3A0A30BB2C21397A00F8C9BC /* EmojiPicker in Frameworks */,
@@ -2648,6 +2688,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
3ACF94402DA9B11200971A4E /* FaviconFinder in Frameworks */,
82D6FC862CD9A4A600C925F4 /* MarkdownUI in Frameworks */,
D7DB1FEC2D5A9F6500CF06DA /* CryptoSwift in Frameworks */,
82D6FC8A2CD9A54600C925F4 /* SwipeActions in Frameworks */,
@@ -2664,6 +2705,7 @@
buildActionMask = 2147483647;
files = (
D703D7AF2C670FB700A400EA /* MarkdownUI in Frameworks */,
3ACF943E2DA9B10800971A4E /* FaviconFinder in Frameworks */,
D73E5F9D2C6AA8E3007EB227 /* SwipeActions in Frameworks */,
D7DB1FE82D5A9F5300CF06DA /* CryptoSwift in Frameworks */,
D73E5F762C6A997E007EB227 /* EmojiPicker in Frameworks */,
@@ -2698,6 +2740,16 @@
path = "Empty Views";
sourceTree = "<group>";
};
3A515C4E2DF4E0E6002D3B34 /* Tips */ = {
isa = PBXGroup;
children = (
3AA2F4E72DF1467A00B18606 /* TrustedNetworkButtonTip.swift */,
3A515C532DF5371D002D3B34 /* TrustedNetworkButtonTipViewStyle.swift */,
3A515C4F2DF4E100002D3B34 /* TrustedNetworkRepliesTip.swift */,
);
path = Tips;
sourceTree = "<group>";
};
3AA24800297E3DAE0090C62D /* Reposts */ = {
isa = PBXGroup;
children = (
@@ -2841,6 +2893,7 @@
5CC8529C2BD741CD0039FFC5 /* HighlightEvent.swift */,
D773BC5E2C6D538500349F0A /* CommentItem.swift */,
D767066E2C8BB3CE00F09726 /* URLHandler.swift */,
3ACF94452DAA006500971A4E /* NIP05DomainEventsModel.swift */,
);
path = Models;
sourceTree = "<group>";
@@ -3192,6 +3245,7 @@
4C190F232A547D1700027FD5 /* NostrScript */,
4C7D095A2A098C5C00943473 /* Wallet */,
4C8D1A6D29F31E4100ACDF75 /* Buttons */,
3A515C4E2DF4E0E6002D3B34 /* Tips */,
4C1A9A2829DDF53B00516EAC /* Video */,
4C1A9A1B29DDCF8B00516EAC /* Settings */,
4CFF8F6129CC9A80008DB934 /* Images */,
@@ -3255,6 +3309,9 @@
D77BFA0A2AE3051200621634 /* ProfileActionSheetView.swift */,
D71AD8FC2CEC176A002E2C3C /* AppAccessibilityIdentifiers.swift */,
D74EA0922D2E77B9002290DD /* LoadableNostrEventView.swift */,
3ACF94412DA9FCAB00971A4E /* NIP05DomainTimelineView.swift */,
3A2BAC592DD7E4C400EBB4CC /* NIP05DomainTimelineHeaderView.swift */,
3A2BAC5D2DE02E8600EBB4CC /* NIP05DomainPubkeysView.swift */,
);
path = Views;
sourceTree = "<group>";
@@ -3377,6 +3434,7 @@
D74AAFCE2B155D8C006CF0F4 /* ZapDataModel.swift */,
D74AAFD32B155ECB006CF0F4 /* Zaps+.swift */,
D7D09AB42DADCA5600AB170D /* CoinosDeterministicAccountClient.swift */,
3A92C0FD2DE16E9800CEEBAC /* FaviconCache.swift */,
);
path = Util;
sourceTree = "<group>";
@@ -3385,7 +3443,7 @@
isa = PBXGroup;
children = (
5CB017202D2D985800A9ED05 /* CoinosButton.swift */,
4C8D1A6E29F31E5000ACDF75 /* FriendsButton.swift */,
4C8D1A6E29F31E5000ACDF75 /* TrustedNetworkButton.swift */,
F71694F32A6732B7001F4053 /* GradientFollowButton.swift */,
4C7D09652A0AE62100943473 /* AlbyButton.swift */,
);
@@ -3772,6 +3830,8 @@
4C2D34402BDAF1B300F9FB44 /* NIP10Tests.swift */,
D72E12792BEEEED000F4F781 /* NostrFilterTests.swift */,
3A96E3FD2D6BCE3800AE1630 /* RepostedTests.swift */,
4C0ED07E2D7A1E260020D8A2 /* Benchmarking.swift */,
3A92C1012DE17ACA00CEEBAC /* NIP05DomainTimelineHeaderViewTests.swift */,
);
path = damusTests;
sourceTree = "<group>";
@@ -4173,6 +4233,7 @@
D70D90972CDED61800CD0534 /* CodeScanner */,
D7C48C0A2D12DE0C00A3BACF /* SwiftyCrop */,
D7DB1FE32D5A9AC900CF06DA /* CryptoSwift */,
3ACF94372DA9A52F00971A4E /* FaviconFinder */,
);
productName = damus;
productReference = 4CE6DEE327F7A08100C66700 /* damus.app */;
@@ -4240,6 +4301,7 @@
D7F360282CEBBE34009D34DA /* CodeScanner */,
D7C48C0C2D12E34900A3BACF /* SwiftyCrop */,
D7DB1FEB2D5A9F6500CF06DA /* CryptoSwift */,
3ACF943F2DA9B11200971A4E /* FaviconFinder */,
);
productName = "share extension";
productReference = 82D6FA972CD9820500C925F4 /* ShareExtension.appex */;
@@ -4269,6 +4331,7 @@
D70D909B2CDED7B200CD0534 /* CodeScanner */,
D7C48C0E2D12E35600A3BACF /* SwiftyCrop */,
D7DB1FE72D5A9F5300CF06DA /* CryptoSwift */,
3ACF943D2DA9B10800971A4E /* FaviconFinder */,
);
productName = "highlighter action extension";
productReference = D703D7172C66E47100A400EA /* HighlighterActionExtension.appex */;
@@ -4381,6 +4444,7 @@
D70D90962CDED61800CD0534 /* XCRemoteSwiftPackageReference "CodeScanner" */,
D7C48C092D12DE0C00A3BACF /* XCRemoteSwiftPackageReference "SwiftyCrop" */,
D7DB1FE22D5A9AC900CF06DA /* XCRemoteSwiftPackageReference "CryptoSwift" */,
3ACF94362DA9A52F00971A4E /* XCRemoteSwiftPackageReference "FaviconFinder" */,
);
productRefGroup = 4CE6DEE427F7A08100C66700 /* Products */;
projectDirPath = "";
@@ -4523,6 +4587,7 @@
4C3EA64428FF558100C48A62 /* sha256.c in Sources */,
5C8498032D5D150000F74FEB /* ZapExplainer.swift in Sources */,
504323A72A34915F006AE6DC /* RelayModel.swift in Sources */,
3A2BAC5C2DD7E4C400EBB4CC /* NIP05DomainTimelineHeaderView.swift in Sources */,
4CF0ABF62985CD5500D66079 /* UserSearch.swift in Sources */,
4C32B9542A9AD44700DC3548 /* FlatBuffersUtils.swift in Sources */,
D7EDED1C2B1178FE0018B19C /* NoteContent.swift in Sources */,
@@ -4561,6 +4626,7 @@
4CB55EF5295E679D007FD187 /* UserRelaysView.swift in Sources */,
4C363AA228296A7E006E126D /* SearchView.swift in Sources */,
D798D2282B085CDA00234419 /* NdbNote+.swift in Sources */,
3ACF94422DA9FCAB00971A4E /* NIP05DomainTimelineView.swift in Sources */,
4CC7AAED297F0B9E00430951 /* Highlight.swift in Sources */,
4C1253662A76D0FF0004F4B8 /* OnlyZapsNotify.swift in Sources */,
4CA927652A290F1A0098A105 /* TimeDot.swift in Sources */,
@@ -4603,7 +4669,7 @@
4C3D52B8298DB5C6001C5831 /* TextEvent.swift in Sources */,
4C216F362870A9A700040376 /* InputDismissKeyboard.swift in Sources */,
D74AAFCF2B155D8C006CF0F4 /* ZapDataModel.swift in Sources */,
4C8D1A6F29F31E5000ACDF75 /* FriendsButton.swift in Sources */,
4C8D1A6F29F31E5000ACDF75 /* TrustedNetworkButton.swift in Sources */,
D7100C562B76F8E600C59298 /* PurpleViewPrimitives.swift in Sources */,
B57B4C642B312BFA00A232C0 /* RelayAuthenticationDetail.swift in Sources */,
D7EDED2E2B128E8A0018B19C /* CollectionExtension.swift in Sources */,
@@ -4689,6 +4755,7 @@
D7100C5A2B76FD5100C59298 /* LogoView.swift in Sources */,
4C0A3F8F280F640A000448DE /* ThreadModel.swift in Sources */,
4C3AC79F2833115300E1F516 /* FollowButtonView.swift in Sources */,
3A515C502DF4E100002D3B34 /* TrustedNetworkRepliesTip.swift in Sources */,
D7CB5D3B2B112FBB00AD4105 /* NotificationFormatter.swift in Sources */,
4C4E137B2A76D5FB00BDD832 /* MuteThreadNotify.swift in Sources */,
4CC7AAE7297EFA7B00430951 /* Zap.swift in Sources */,
@@ -4757,6 +4824,7 @@
4C12535E2A76CA870004F4B8 /* SwitchedTimelineNotify.swift in Sources */,
D74F430A2B23F0BE00425B75 /* DamusPurple.swift in Sources */,
9CA876E229A00CEA0003B9A3 /* AttachMediaUtility.swift in Sources */,
3ACF94462DAA006500971A4E /* NIP05DomainEventsModel.swift in Sources */,
D734B1452CCC19B1000B5C97 /* DamusFullScreenCover.swift in Sources */,
4C4E137D2A76D63600BDD832 /* UnmuteThreadNotify.swift in Sources */,
D706C5B72D602A110027C627 /* QueueableNotify.swift in Sources */,
@@ -4782,6 +4850,7 @@
4CA352A22A76AEC5003BB08B /* LikedNotify.swift in Sources */,
5CC8529F2BD744F60039FFC5 /* HighlightView.swift in Sources */,
BA37598D2ABCCE500018D73B /* PhotoCaptureProcessor.swift in Sources */,
3A515C562DF5371D002D3B34 /* TrustedNetworkButtonTipViewStyle.swift in Sources */,
5CC8529D2BD741CD0039FFC5 /* HighlightEvent.swift in Sources */,
4C9146FD2A2A87C200DDEA40 /* wasm.c in Sources */,
4C75EFAF28049D350006080F /* NostrFilter.swift in Sources */,
@@ -4828,6 +4897,7 @@
4C1A9A2729DDE31900516EAC /* TranslationSettingsView.swift in Sources */,
BA3759942ABCCEBA0018D73B /* CameraService.swift in Sources */,
4CB8838629656C8B00DC99E7 /* NIP05.swift in Sources */,
3AA2F4E82DF1467A00B18606 /* TrustedNetworkButtonTip.swift in Sources */,
4CF0ABD82981980C00D66079 /* Lists.swift in Sources */,
F71694EA2A662232001F4053 /* OnboardingSuggestionsView.swift in Sources */,
4C12536A2A76D3850004F4B8 /* RelaysChangedNotify.swift in Sources */,
@@ -4916,6 +4986,7 @@
4CE4F0F229D4FCFA005914DB /* DebouncedOnChange.swift in Sources */,
4C32B9592A9AD44700DC3548 /* Table.swift in Sources */,
4C5D5C9D2A6B2CB40024563C /* AsciiCharacter.swift in Sources */,
3A2BAC5E2DE02E8600EBB4CC /* NIP05DomainPubkeysView.swift in Sources */,
4CF0ABEC29844B4700D66079 /* AnyDecodable.swift in Sources */,
4C9146FE2A2A87C200DDEA40 /* nostrscript.c in Sources */,
4C5F9118283D88E40052CD1C /* FollowingModel.swift in Sources */,
@@ -4963,6 +5034,7 @@
4C32B95A2A9AD44700DC3548 /* Verifiable.swift in Sources */,
4C73C5142A4437C10062CAC0 /* ZapUserView.swift in Sources */,
501F8C802A0220E1001AFC1D /* KeychainStorage.swift in Sources */,
3A92C0FE2DE16E9800CEEBAC /* FaviconCache.swift in Sources */,
4C1A9A1D29DDCF9B00516EAC /* NotificationSettingsView.swift in Sources */,
5CC868DD2AA29B3200FB22BA /* NeutralButtonStyle.swift in Sources */,
4C75EFB528049D790006080F /* Relay.swift in Sources */,
@@ -5002,6 +5074,7 @@
4C9B0DEE2A65A75F00CBDA21 /* AttrStringTestExtensions.swift in Sources */,
4C19AE552A5D977400C90DB7 /* HashtagTests.swift in Sources */,
D72927AD2BAB515C00F93E90 /* RelayURLTests.swift in Sources */,
4C0ED07F2D7A1E260020D8A2 /* Benchmarking.swift in Sources */,
3A3040ED29A5CB86008A0F29 /* ReplyDescriptionTests.swift in Sources */,
D71DC1EC2A9129C3006E207C /* PostViewTests.swift in Sources */,
3AAC7A022A60FE72002B50DF /* LocalizationUtilTests.swift in Sources */,
@@ -5045,6 +5118,7 @@
4CF0ABDC2981A19E00D66079 /* ListTests.swift in Sources */,
4C684A552A7E91FE005E6031 /* LargeEventTests.swift in Sources */,
E02B54182B4DFADA0077FF42 /* Bech32ObjectTests.swift in Sources */,
3A92C1022DE17ACA00CEEBAC /* NIP05DomainTimelineHeaderViewTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -5077,6 +5151,7 @@
82D6FAB42CD99F7900C925F4 /* Verifiable.swift in Sources */,
82D6FAB52CD99F7900C925F4 /* NativeObject.swift in Sources */,
82D6FAB62CD99F7900C925F4 /* String+extension.swift in Sources */,
3A515C552DF5371D002D3B34 /* TrustedNetworkButtonTipViewStyle.swift in Sources */,
82D6FAB72CD99F7900C925F4 /* FlatBufferObject.swift in Sources */,
82D6FAB82CD99F7900C925F4 /* Enum.swift in Sources */,
82D6FAB92CD99F7900C925F4 /* builder.c in Sources */,
@@ -5130,6 +5205,7 @@
82D6FAE72CD99F7900C925F4 /* LoginNotify.swift in Sources */,
82D6FAE82CD99F7900C925F4 /* LogoutNotify.swift in Sources */,
D706C5B12D5D31C20027C627 /* AutoSaveIndicatorView.swift in Sources */,
3ACF94482DAA006500971A4E /* NIP05DomainEventsModel.swift in Sources */,
82D6FAE92CD99F7900C925F4 /* NewMutesNotify.swift in Sources */,
82D6FAEA2CD99F7900C925F4 /* NewUnmutesNotify.swift in Sources */,
82D6FAEB2CD99F7900C925F4 /* Notify.swift in Sources */,
@@ -5148,9 +5224,11 @@
82D6FAF62CD99F7900C925F4 /* ZappingNotify.swift in Sources */,
82D6FAF72CD99F7900C925F4 /* MuteNotify.swift in Sources */,
82D6FAF82CD99F7900C925F4 /* RelaysChangedNotify.swift in Sources */,
3A2BAC5B2DD7E4C400EBB4CC /* NIP05DomainTimelineHeaderView.swift in Sources */,
82D6FAF92CD99F7900C925F4 /* MuteThreadNotify.swift in Sources */,
82D6FAFA2CD99F7900C925F4 /* UnmuteThreadNotify.swift in Sources */,
82D6FAFB2CD99F7900C925F4 /* ReconnectRelaysNotify.swift in Sources */,
3ACF94432DA9FCAB00971A4E /* NIP05DomainTimelineView.swift in Sources */,
82D6FAFC2CD99F7900C925F4 /* PurpleAccountUpdateNotify.swift in Sources */,
82D6FAFD2CD99F7900C925F4 /* IdType.swift in Sources */,
82D6FAFE2CD99F7900C925F4 /* Pubkey.swift in Sources */,
@@ -5323,6 +5401,7 @@
82D6FB9C2CD99F7900C925F4 /* WalletModel.swift in Sources */,
82D6FB9D2CD99F7900C925F4 /* ZapButtonModel.swift in Sources */,
82D6FB9E2CD99F7900C925F4 /* ContentFilters.swift in Sources */,
3A515C512DF4E100002D3B34 /* TrustedNetworkRepliesTip.swift in Sources */,
82D6FB9F2CD99F7900C925F4 /* DamusCacheManager.swift in Sources */,
82D6FBA02CD99F7900C925F4 /* NotificationsManager.swift in Sources */,
D755B28E2D3E7D8800BBEEFA /* NIP37Draft.swift in Sources */,
@@ -5373,13 +5452,14 @@
82D6FBCC2CD99F7900C925F4 /* CameraPreview.swift in Sources */,
82D6FBCD2CD99F7900C925F4 /* CameraController.swift in Sources */,
82D6FBCE2CD99F7900C925F4 /* OnboardingSuggestionsView.swift in Sources */,
3AA2F4EA2DF1467A00B18606 /* TrustedNetworkButtonTip.swift in Sources */,
82D6FBCF2CD99F7900C925F4 /* SuggestedUserView.swift in Sources */,
82D6FBD02CD99F7900C925F4 /* SuggestedUsersViewModel.swift in Sources */,
82D6FBD12CD99F7900C925F4 /* LoadScript.swift in Sources */,
82D6FBD52CD99F7900C925F4 /* ConnectWalletView.swift in Sources */,
82D6FBD62CD99F7900C925F4 /* WalletView.swift in Sources */,
82D6FBD72CD99F7900C925F4 /* NWCScannerView.swift in Sources */,
82D6FBD82CD99F7900C925F4 /* FriendsButton.swift in Sources */,
82D6FBD82CD99F7900C925F4 /* TrustedNetworkButton.swift in Sources */,
82D6FBD92CD99F7900C925F4 /* GradientFollowButton.swift in Sources */,
82D6FBDA2CD99F7900C925F4 /* AlbyButton.swift in Sources */,
82D6FBDC2CD99F7900C925F4 /* DamusVideoPlayerView.swift in Sources */,
@@ -5403,6 +5483,7 @@
82D6FBED2CD99F7900C925F4 /* MediaView.swift in Sources */,
82D6FBEE2CD99F7900C925F4 /* PurpleViewPrimitives.swift in Sources */,
82D6FBEF2CD99F7900C925F4 /* MarketingContentView.swift in Sources */,
3A2BAC602DE02E8600EBB4CC /* NIP05DomainPubkeysView.swift in Sources */,
82D6FBF02CD99F7900C925F4 /* LogoView.swift in Sources */,
82D6FBF12CD99F7900C925F4 /* IAPProductStateView.swift in Sources */,
82D6FBF22CD99F7900C925F4 /* PurpleBackdrop.swift in Sources */,
@@ -5421,6 +5502,7 @@
82D6FBFF2CD99F7900C925F4 /* NotificationItemView.swift in Sources */,
82D6FC002CD99F7900C925F4 /* ProfilePicturesView.swift in Sources */,
82D6FC012CD99F7900C925F4 /* DamusAppNotificationView.swift in Sources */,
3A92C1002DE16E9800CEEBAC /* FaviconCache.swift in Sources */,
82D6FC022CD99F7900C925F4 /* InnerTimelineView.swift in Sources */,
82D6FC032CD99F7900C925F4 /* PostingTimelineView.swift in Sources */,
82D6FC042CD99F7900C925F4 /* ZapsView.swift in Sources */,
@@ -5575,6 +5657,7 @@
D73E5E2B2C6A97F4007EB227 /* PostNotify.swift in Sources */,
D73E5E2C2C6A97F4007EB227 /* PresentSheetNotify.swift in Sources */,
D73E5E2D2C6A97F4007EB227 /* ProfileUpdatedNotify.swift in Sources */,
3A515C522DF4E100002D3B34 /* TrustedNetworkRepliesTip.swift in Sources */,
D73E5E2E2C6A97F4007EB227 /* ReportNotify.swift in Sources */,
D73E5E2F2C6A97F4007EB227 /* ScrollToTopNotify.swift in Sources */,
D73E5E302C6A97F4007EB227 /* SwitchedTimelineNotify.swift in Sources */,
@@ -5636,11 +5719,13 @@
D73E5E682C6A97F4007EB227 /* VectorMath.swift in Sources */,
D73E5E692C6A97F4007EB227 /* RelayBootstrap.swift in Sources */,
D73E5E6A2C6A97F4007EB227 /* RelayModel.swift in Sources */,
3A2BAC5A2DD7E4C400EBB4CC /* NIP05DomainTimelineHeaderView.swift in Sources */,
D73E5E6B2C6A97F4007EB227 /* AnyCodable.swift in Sources */,
D73E5E6C2C6A97F4007EB227 /* AnyDecodable.swift in Sources */,
D73E5E6D2C6A97F4007EB227 /* AnyEncodable.swift in Sources */,
D73E5F782C6A9A5C007EB227 /* NdbNote+.swift in Sources */,
D73E5E6E2C6A97F4007EB227 /* NIPURLBuilder.swift in Sources */,
3ACF94472DAA006500971A4E /* NIP05DomainEventsModel.swift in Sources */,
D73E5E6F2C6A97F4007EB227 /* TimeAgo.swift in Sources */,
D73E5E702C6A97F4007EB227 /* Parser.swift in Sources */,
D73E5E722C6A97F4007EB227 /* LinkView.swift in Sources */,
@@ -5679,6 +5764,7 @@
D73E5E922C6A97F4007EB227 /* EventGroup.swift in Sources */,
D73E5E932C6A97F4007EB227 /* ZapGroup.swift in Sources */,
D73E5E942C6A97F4007EB227 /* NotificationStatusModel.swift in Sources */,
3A515C542DF5371D002D3B34 /* TrustedNetworkButtonTipViewStyle.swift in Sources */,
D73E5E952C6A97F4007EB227 /* ThreadModel.swift in Sources */,
D73E5E962C6A97F4007EB227 /* ReplyMap.swift in Sources */,
D73E5E972C6A97F4007EB227 /* ProfileModel.swift in Sources */,
@@ -5727,6 +5813,7 @@
D73E5EB92C6A97F4007EB227 /* RelayLog.swift in Sources */,
D73E5EBA2C6A97F4007EB227 /* NostrFilter.swift in Sources */,
D73E5EBB2C6A97F4007EB227 /* Nip98HTTPAuth.swift in Sources */,
3A92C0FF2DE16E9800CEEBAC /* FaviconCache.swift in Sources */,
D73E5EBC2C6A97F4007EB227 /* Relay.swift in Sources */,
D73E5EBD2C6A97F4007EB227 /* NostrRequest.swift in Sources */,
5CB017222D2D985E00A9ED05 /* CoinosButton.swift in Sources */,
@@ -5736,6 +5823,7 @@
D73E5EC02C6A97F4007EB227 /* NostrEvent+.swift in Sources */,
D73E5EC12C6A97F4007EB227 /* NIP98AuthenticatedRequest.swift in Sources */,
D73E5EC22C6A97F4007EB227 /* NostrAuth.swift in Sources */,
3AA2F4E92DF1467A00B18606 /* TrustedNetworkButtonTip.swift in Sources */,
D73E5EC42C6A97F4007EB227 /* ReplyQuoteView.swift in Sources */,
D73E5EC62C6A97F4007EB227 /* ChatBubbleView.swift in Sources */,
D73E5EC72C6A97F4007EB227 /* VisibilityTracker.swift in Sources */,
@@ -5747,7 +5835,7 @@
D73E5ED22C6A97F4007EB227 /* WalletView.swift in Sources */,
D73E5ED32C6A97F4007EB227 /* NWCScannerView.swift in Sources */,
D74E64132DC95CC7004C7892 /* HumanReadableErrors.swift in Sources */,
D73E5ED42C6A97F4007EB227 /* FriendsButton.swift in Sources */,
D73E5ED42C6A97F4007EB227 /* TrustedNetworkButton.swift in Sources */,
D73E5ED52C6A97F4007EB227 /* GradientFollowButton.swift in Sources */,
D73E5ED62C6A97F4007EB227 /* AlbyButton.swift in Sources */,
D73E5ED82C6A97F4007EB227 /* DamusVideoPlayerView.swift in Sources */,
@@ -5825,6 +5913,7 @@
D73E5F192C6A97F4007EB227 /* RelayToggle.swift in Sources */,
D73E5F1A2C6A97F4007EB227 /* RelayStatusView.swift in Sources */,
D73E5F1B2C6A97F4007EB227 /* RelayType.swift in Sources */,
3A2BAC5F2DE02E8600EBB4CC /* NIP05DomainPubkeysView.swift in Sources */,
D73E5F1C2C6A97F4007EB227 /* SignalView.swift in Sources */,
D73E5F1D2C6A97F4007EB227 /* RelayPicView.swift in Sources */,
D73E5F1E2C6A97F4007EB227 /* UserSearch.swift in Sources */,
@@ -5957,6 +6046,7 @@
D73E5E1B2C6A9672007EB227 /* LikeCounter.swift in Sources */,
D703D7A92C670E5A00A400EA /* refmap.c in Sources */,
D703D77B2C670BF000A400EA /* TableVerifier.swift in Sources */,
3ACF94442DA9FCAB00971A4E /* NIP05DomainTimelineView.swift in Sources */,
D703D76D2C670B4500A400EA /* ZapDataModel.swift in Sources */,
D703D79D2C670E0700A400EA /* node_id.c in Sources */,
D703D79B2C670E0000A400EA /* bech32_util.c in Sources */,
@@ -6939,6 +7029,14 @@
minimumVersion = 0.2.0;
};
};
3ACF94362DA9A52F00971A4E /* XCRemoteSwiftPackageReference "FaviconFinder" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/will-lumley/FaviconFinder.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 5.1.4;
};
};
4C06670228FC7EC500038D2A /* XCRemoteSwiftPackageReference "Kingfisher" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/onevcat/Kingfisher";
@@ -7019,6 +7117,21 @@
package = 3A0A30B92C21397A00F8C9BC /* XCRemoteSwiftPackageReference "EmojiPicker" */;
productName = EmojiPicker;
};
3ACF94372DA9A52F00971A4E /* FaviconFinder */ = {
isa = XCSwiftPackageProductDependency;
package = 3ACF94362DA9A52F00971A4E /* XCRemoteSwiftPackageReference "FaviconFinder" */;
productName = FaviconFinder;
};
3ACF943D2DA9B10800971A4E /* FaviconFinder */ = {
isa = XCSwiftPackageProductDependency;
package = 3ACF94362DA9A52F00971A4E /* XCRemoteSwiftPackageReference "FaviconFinder" */;
productName = FaviconFinder;
};
3ACF943F2DA9B11200971A4E /* FaviconFinder */ = {
isa = XCSwiftPackageProductDependency;
package = 3ACF94362DA9A52F00971A4E /* XCRemoteSwiftPackageReference "FaviconFinder" */;
productName = FaviconFinder;
};
4C06670328FC7EC500038D2A /* Kingfisher */ = {
isa = XCSwiftPackageProductDependency;
package = 4C06670228FC7EC500038D2A /* XCRemoteSwiftPackageReference "Kingfisher" */;

View File

@@ -1,5 +1,5 @@
{
"originHash" : "06318d35ee2e6bd681b95591e67da33a9461b48a3c652e58bd9d1a6f0d82bdac",
"originHash" : "1fc7e0b44329ba72cd285eeb022b5b92582cd01586b920d243cb0485c2e69dcc",
"pins" : [
{
"identity" : "codescanner",
@@ -35,6 +35,15 @@
"version" : "0.2.0"
}
},
{
"identity" : "faviconfinder",
"kind" : "remoteSourceControl",
"location" : "https://github.com/will-lumley/FaviconFinder.git",
"state" : {
"revision" : "9279f4371f4877ca302ba3bf1015f3f58ae4a56c",
"version" : "5.1.4"
}
},
{
"identity" : "gsplayer",
"kind" : "remoteSourceControl",
@@ -105,6 +114,15 @@
"version" : "0.1.2"
}
},
{
"identity" : "swiftsoup",
"kind" : "remoteSourceControl",
"location" : "https://github.com/scinfu/SwiftSoup.git",
"state" : {
"revision" : "bba848db50462894e7fc0891d018dfecad4ef11e",
"version" : "2.8.7"
}
},
{
"identity" : "swiftycrop",
"kind" : "remoteSourceControl",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "bbw.jpg",
"filename" : "blink.png",
"idiom" : "universal"
}
],

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

View File

@@ -5,27 +5,27 @@
// Created by William Casarin on 2023-01-11.
//
import FaviconFinder
import Kingfisher
import SwiftUI
struct NIP05Badge: View {
let nip05: NIP05
let pubkey: Pubkey
let contacts: Contacts
let damus_state: DamusState
let show_domain: Bool
let profiles: Profiles
let nip05_domain_favicon: FaviconURL?
@Environment(\.openURL) var openURL
init(nip05: NIP05, pubkey: Pubkey, contacts: Contacts, show_domain: Bool, profiles: Profiles) {
init(nip05: NIP05, pubkey: Pubkey, damus_state: DamusState, show_domain: Bool, nip05_domain_favicon: FaviconURL?) {
self.nip05 = nip05
self.pubkey = pubkey
self.contacts = contacts
self.damus_state = damus_state
self.show_domain = show_domain
self.profiles = profiles
self.nip05_domain_favicon = nip05_domain_favicon
}
var nip05_color: Bool {
return use_nip05_color(pubkey: pubkey, contacts: contacts)
return use_nip05_color(pubkey: pubkey, contacts: damus_state.contacts)
}
var Seal: some View {
@@ -44,8 +44,23 @@ struct NIP05Badge: View {
}
}
var domainBadge: some View {
Group {
if let nip05_domain_favicon {
KFImage(nip05_domain_favicon.source)
.imageContext(.favicon, disable_animation: true)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 18, height: 18)
.clipped()
} else {
EmptyView()
}
}
}
var username_matches_nip05: Bool {
guard let name = profiles.lookup(id: pubkey)?.map({ p in p?.name }).value
guard let name = damus_state.profiles.lookup(id: pubkey)?.map({ p in p?.name }).value
else {
return false
}
@@ -65,14 +80,18 @@ struct NIP05Badge: View {
HStack(spacing: 2) {
Seal
if show_domain {
Text(nip05_string)
.nip05_colorized(gradient: nip05_color)
.onTapGesture {
if let nip5url = nip05.siteUrl {
openURL(nip5url)
}
}
Group {
if show_domain {
Text(nip05_string)
.nip05_colorized(gradient: nip05_color)
}
if nip05_domain_favicon != nil {
domainBadge
}
}
.onTapGesture {
damus_state.nav.push(route: Route.NIP05DomainEvents(events: NIP05DomainEventsModel(state: damus_state, domain: nip05.host), nip05_domain_favicon: nip05_domain_favicon))
}
}
@@ -98,13 +117,9 @@ struct NIP05Badge_Previews: PreviewProvider {
static var previews: some View {
let test_state = test_damus_state
VStack {
NIP05Badge(nip05: NIP05(username: "jb55", host: "jb55.com"), pubkey: test_state.pubkey, contacts: test_state.contacts, show_domain: true, profiles: test_state.profiles)
NIP05Badge(nip05: NIP05(username: "jb55", host: "jb55.com"), pubkey: test_state.pubkey, damus_state: test_state, show_domain: true, nip05_domain_favicon: nil)
NIP05Badge(nip05: NIP05(username: "_", host: "jb55.com"), pubkey: test_state.pubkey, contacts: test_state.contacts, show_domain: true, profiles: test_state.profiles)
NIP05Badge(nip05: NIP05(username: "jb55", host: "jb55.com"), pubkey: test_state.pubkey, contacts: test_state.contacts, show_domain: true, profiles: test_state.profiles)
NIP05Badge(nip05: NIP05(username: "jb55", host: "jb55.com"), pubkey: test_state.pubkey, contacts: Contacts(our_pubkey: test_pubkey), show_domain: true, profiles: test_state.profiles)
NIP05Badge(nip05: NIP05(username: "_", host: "jb55.com"), pubkey: test_state.pubkey, damus_state: test_state, show_domain: true, nip05_domain_favicon: nil)
}
}
}

View File

@@ -9,6 +9,7 @@ import SwiftUI
import AVKit
import MediaPlayer
import EmojiPicker
import TipKit
struct ZapSheet {
let target: ZapTarget
@@ -178,7 +179,7 @@ struct ContentView: View {
NotificationsView(state: damus, notifications: home.notifications, subtitle: $menu_subtitle)
case .dms:
DirectMessagesView(damus_state: damus_state!, model: damus_state!.dms, settings: damus_state!.settings)
DirectMessagesView(damus_state: damus_state!, model: damus_state!.dms, settings: damus_state!.settings, subtitle: $menu_subtitle)
}
}
.background(DamusColors.adaptableWhite)
@@ -686,7 +687,8 @@ struct ContentView: View {
video: DamusVideoCoordinator(),
ndb: ndb,
quote_reposts: .init(our_pubkey: pubkey),
emoji_provider: DefaultEmojiProvider(showAllVariations: true)
emoji_provider: DefaultEmojiProvider(showAllVariations: true),
favicon_cache: FaviconCache()
)
home.damus_state = self.damus_state!
@@ -704,6 +706,21 @@ struct ContentView: View {
damus_state.nostrNetwork.pool.register_handler(sub_id: sub_id, handler: home.handle_event)
damus_state.nostrNetwork.connect()
if #available(iOS 17, *) {
if damus_state.settings.developer_mode && damus_state.settings.reset_tips_on_launch {
do {
try Tips.resetDatastore()
} catch {
Log.error("Failed to reset tips datastore: %s", for: .tips, error.localizedDescription)
}
}
do {
try Tips.configure()
} catch {
Log.error("Failed to configure tips: %s", for: .tips, error.localizedDescription)
}
}
}
func music_changed(_ state: MusicState) {

View File

@@ -38,6 +38,10 @@ class Contacts {
return friends
}
func get_friend_of_friends_list() -> Set<Pubkey> {
return friend_of_friends
}
func get_followed_hashtags() -> Set<String> {
guard let ev = self.event else { return Set() }
return Set(ev.referenced_hashtags.map({ $0.hashtag }))

View File

@@ -36,9 +36,10 @@ class DamusState: HeadlessDamusState {
var purple: DamusPurple
var push_notification_client: PushNotificationClient
let emoji_provider: EmojiProvider
let favicon_cache: FaviconCache
private(set) var nostrNetwork: NostrNetworkManager
init(keypair: Keypair, likes: EventCounter, boosts: EventCounter, contacts: Contacts, mutelist_manager: MutelistManager, profiles: Profiles, dms: DirectMessagesModel, previews: PreviewCache, zaps: Zaps, lnurls: LNUrls, settings: UserSettingsStore, relay_filters: RelayFilters, relay_model_cache: RelayModelCache, drafts: Drafts, events: EventCache, bookmarks: BookmarksManager, replies: ReplyCounter, wallet: WalletModel, nav: NavigationCoordinator, music: MusicController?, video: DamusVideoCoordinator, ndb: Ndb, purple: DamusPurple? = nil, quote_reposts: EventCounter, emoji_provider: EmojiProvider) {
init(keypair: Keypair, likes: EventCounter, boosts: EventCounter, contacts: Contacts, mutelist_manager: MutelistManager, profiles: Profiles, dms: DirectMessagesModel, previews: PreviewCache, zaps: Zaps, lnurls: LNUrls, settings: UserSettingsStore, relay_filters: RelayFilters, relay_model_cache: RelayModelCache, drafts: Drafts, events: EventCache, bookmarks: BookmarksManager, replies: ReplyCounter, wallet: WalletModel, nav: NavigationCoordinator, music: MusicController?, video: DamusVideoCoordinator, ndb: Ndb, purple: DamusPurple? = nil, quote_reposts: EventCounter, emoji_provider: EmojiProvider, favicon_cache: FaviconCache) {
self.keypair = keypair
self.likes = likes
self.boosts = boosts
@@ -68,7 +69,8 @@ class DamusState: HeadlessDamusState {
self.quote_reposts = quote_reposts
self.push_notification_client = PushNotificationClient(keypair: keypair, settings: settings)
self.emoji_provider = emoji_provider
self.favicon_cache = FaviconCache()
let networkManagerDelegate = NostrNetworkManagerDelegate(settings: settings, contacts: contacts, ndb: ndb, keypair: keypair, relayModelCache: relay_model_cache, relayFilters: relay_filters)
self.nostrNetwork = NostrNetworkManager(delegate: networkManagerDelegate)
}
@@ -126,7 +128,8 @@ class DamusState: HeadlessDamusState {
video: DamusVideoCoordinator(),
ndb: ndb,
quote_reposts: .init(our_pubkey: pubkey),
emoji_provider: DefaultEmojiProvider(showAllVariations: true)
emoji_provider: DefaultEmojiProvider(showAllVariations: true),
favicon_cache: FaviconCache()
)
}
@@ -194,7 +197,8 @@ class DamusState: HeadlessDamusState {
video: DamusVideoCoordinator(),
ndb: .empty,
quote_reposts: .init(our_pubkey: empty_pub),
emoji_provider: DefaultEmojiProvider(showAllVariations: true)
emoji_provider: DefaultEmojiProvider(showAllVariations: true),
favicon_cache: FaviconCache()
)
}
}

View File

@@ -35,9 +35,9 @@ enum FriendFilter: String, StringCodable {
func description() -> String {
switch self {
case .all:
return NSLocalizedString("All", comment: "Human-readable short description of the 'friends filter' when it is set to 'all'")
return NSLocalizedString("All", comment: "Human-readable short description of the 'trusted network filter' when it is disabled, and therefore is showing all content.")
case .friends_of_friends:
return NSLocalizedString("Friends of friends", comment: "Human-readable short description of the 'friends filter' when it is set to 'friends-of-friends'")
return NSLocalizedString("Trusted Network", comment: "Human-readable short description of the 'trusted network filter' when it is enabled, and therefore showing content from only the trusted network.")
}
}
}

View File

@@ -0,0 +1,97 @@
//
// NIP05DomainEventsModel.swift
// damus
//
// Created by Terry Yiu on 4/11/25.
//
import FaviconFinder
import Foundation
class NIP05DomainEventsModel: ObservableObject {
let state: DamusState
var events: EventHolder
@Published var loading: Bool = false
let domain: String
var filter: NostrFilter
let sub_id = UUID().description
let profiles_subid = UUID().description
let limit: UInt32 = 500
init(state: DamusState, domain: String) {
self.state = state
self.domain = domain
self.events = EventHolder(on_queue: { ev in
preload_events(state: state, events: [ev])
})
self.filter = NostrFilter()
}
@MainActor func subscribe() {
filter.limit = self.limit
filter.kinds = [.text, .longform, .highlight]
var authors = Set<Pubkey>()
for pubkey in state.contacts.get_friend_of_friends_list() {
let profile_txn = state.profiles.lookup(id: pubkey)
guard let profile = profile_txn?.unsafeUnownedValue,
let nip05_str = profile.nip05,
let nip05 = NIP05.parse(nip05_str),
nip05.host.caseInsensitiveCompare(domain) == .orderedSame else {
continue
}
authors.insert(pubkey)
}
if authors.isEmpty {
return
}
filter.authors = Array(authors)
print("subscribing to notes from friends of friends with '\(domain)' NIP-05 domain with sub_id \(sub_id)")
state.nostrNetwork.pool.register_handler(sub_id: sub_id, handler: handle_event)
loading = true
state.nostrNetwork.pool.send(.subscribe(.init(filters: [filter], sub_id: sub_id)))
}
func unsubscribe() {
state.nostrNetwork.pool.unsubscribe(sub_id: sub_id)
loading = false
print("unsubscribing from notes from friends of friends with '\(domain)' NIP-05 domain with sub_id \(sub_id)")
}
func add_event(_ ev: NostrEvent) {
if !event_matches_filter(ev, filter: filter) {
return
}
guard should_show_event(state: state, ev: ev) else {
return
}
if self.events.insert(ev) {
objectWillChange.send()
}
}
func handle_event(relay_id: RelayURL, ev: NostrConnectionEvent) {
let (sub_id, done) = handle_subid_event(pool: state.nostrNetwork.pool, relay_id: relay_id, ev: ev) { sub_id, ev in
if sub_id == self.sub_id && ev.is_textlike && ev.should_show_event {
self.add_event(ev)
}
}
guard done else {
return
}
self.loading = false
if sub_id == self.sub_id {
guard let txn = NdbTxn(ndb: state.ndb) else { return }
load_profiles(context: "search", profiles_subid: self.profiles_subid, relay_id: relay_id, load: .from_events(self.events.all_events), damus_state: state, txn: txn)
}
}
}

View File

@@ -117,6 +117,10 @@ func render_blocks(blocks bs: Blocks, profiles: Profiles, can_hide_last_previewa
}
hide_text_index = i
} else if case .text(let txt) = block, txt.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
// We should hide whitespace at the end sequence.
hide_text_index = i
} else if case .hashtag = block {
// We should keep hashtags at the end sequence but hide all the other previewables around it.
hide_text_index = i
} else {
break
@@ -149,7 +153,16 @@ func render_blocks(blocks bs: Blocks, profiles: Profiles, can_hide_last_previewa
// No need to show the text representation of the block if the only previewables are the sequence of them
// found at the end of the content.
// This is to save unnecessary use of screen space.
// The only exception is that if there are hashtags embedded in the end sequence, which is not uncommon,
// then we still want to show those hashtags but hide everything else that is previewable in the end sequence.
if ind >= hide_text_index {
if case .text(let txt) = block, txt.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
if case .hashtag = blocks[safe: ind+1] {
return str + CompatibleText(stringLiteral: reduce_text_block(ind: ind, hide_text_index: -1, txt: txt))
}
} else if case .hashtag(let htag) = block {
return str + hashtag_str(htag)
}
return str
}
}
@@ -257,12 +270,20 @@ func mention_str(_ m: Mention<MentionRef>, profiles: Profiles) -> CompatibleText
// trim suffix whitespace and newlines
func trim_suffix(_ str: String) -> String {
return str.replacingOccurrences(of: "\\s+$", with: "", options: .regularExpression)
var result = str
while result.last?.isWhitespace == true {
result.removeLast()
}
return result
}
// trim prefix whitespace and newlines
func trim_prefix(_ str: String) -> String {
return str.replacingOccurrences(of: "^\\s+", with: "", options: .regularExpression)
var result = str
while result.first?.isWhitespace == true {
result.removeFirst()
}
return result
}
struct LongformContent {

View File

@@ -115,7 +115,10 @@ class UserSettingsStore: ObservableObject {
@Setting(key: "dismiss_wallet_high_balance_warning", default_value: false)
var dismiss_wallet_high_balance_warning: Bool
@Setting(key: "hide_wallet_balance", default_value: false)
var hide_wallet_balance: Bool
@Setting(key: "left_handed", default_value: false)
var left_handed: Bool
@@ -124,7 +127,13 @@ class UserSettingsStore: ObservableObject {
@Setting(key: "media_previews", default_value: true)
var media_previews: Bool
@Setting(key: "show_trusted_replies_first", default_value: true)
var show_trusted_replies_first: Bool
@Setting(key: "reset_tips_on_launch", default_value: false)
var reset_tips_on_launch: Bool
@Setting(key: "hide_nsfw_tagged_content", default_value: false)
var hide_nsfw_tagged_content: Bool

View File

@@ -83,8 +83,10 @@ enum Wallet: String, CaseIterable, Identifiable, StringCodable {
return .init(index: 9, tag: "breez", displayName: "Breez", link: "breez:",
appStoreLink: "https://apps.apple.com/us/app/breez-lightning-client-pos/id1463604142", image: "breez")
case .bitcoinbeach:
return .init(index: 10, tag: "bitcoinbeach", displayName: "Bitcoin Beach", link: "bitcoinbeach://",
appStoreLink: "https://apps.apple.com/sv/app/bitcoin-beach-wallet/id1531383905", image: "bbw")
// Blink used to be called Bitcoin Beach.
// We have to keep the tag called "bitcoinbeach" for backwards compatibility.
return .init(index: 10, tag: "bitcoinbeach", displayName: "Blink", link: "blink://",
appStoreLink: "https://apps.apple.com/app/blink-bitcoin-wallet/id1531383905", image: "blink")
case .blixtwallet:
return .init(index: 11, tag: "blixtwallet", displayName: "Blixt Wallet", link: "blixtwallet:lightning:",
appStoreLink: "https://testflight.apple.com/join/EXvGhRzS", image: "blixt-wallet")

View File

@@ -35,6 +35,7 @@ class Profiles {
@MainActor
private var profiles: [Pubkey: ProfileData] = [:]
// Map of validated NIP-05 address to pubkey.
@MainActor
var nip05_pubkey: [String: Pubkey] = [:]

View File

@@ -106,7 +106,8 @@ var test_damus_state: DamusState = ({
video: .init(),
ndb: ndb,
quote_reposts: .init(our_pubkey: our_pubkey),
emoji_provider: DefaultEmojiProvider(showAllVariations: true)
emoji_provider: DefaultEmojiProvider(showAllVariations: true),
favicon_cache: .init()
)
/*

View File

@@ -29,15 +29,15 @@ extension KFOptionSetter {
options.onlyLoadFirstFrame = disable_animation
switch imageContext {
case .pfp:
options.diskCacheExpiration = .days(60)
break
case .banner:
options.diskCacheExpiration = .days(5)
break
case .note:
options.diskCacheExpiration = .days(1)
break
case .pfp, .favicon:
options.diskCacheExpiration = .days(60)
break
case .banner:
options.diskCacheExpiration = .days(5)
break
case .note:
options.diskCacheExpiration = .days(1)
break
}
return self
@@ -82,11 +82,14 @@ enum ImageContext {
case pfp
case banner
case note
case favicon
func maxMebibyteSize() -> Int {
switch self {
case .favicon:
return 512_000 // 500KiB
case .pfp:
return 5_242_880 // 5Mib
return 5_242_880 // 5MiB
case .banner, .note:
return 20_971_520 // 20MiB
}
@@ -94,6 +97,8 @@ enum ImageContext {
func downsampleSize() -> CGSize {
switch self {
case .favicon:
return CGSize(width: 18, height: 18)
case .pfp:
return CGSize(width: 200, height: 200)
case .banner:

View File

@@ -0,0 +1,41 @@
//
// FaviconCache.swift
// damus
//
// Created by Terry Yiu on 5/23/25.
//
import Foundation
import FaviconFinder
class FaviconCache {
private var nip05DomainFavicons: [String: [FaviconURL]] = [:]
@MainActor
func lookup(_ domain: String) async -> [FaviconURL] {
let lowercasedDomain = domain.lowercased()
if let faviconURLs = nip05DomainFavicons[lowercasedDomain] {
return faviconURLs
}
guard let siteURL = URL(string: "https://\(lowercasedDomain)"),
let faviconURLs = try? await FaviconFinder(
url: siteURL,
configuration: .init(
preferredSource: .ico, // Prefer using common favicon .ico filenames at root level to avoid scraping HTML when possible.
preferences: [
.html: FaviconFormatType.appleTouchIcon.rawValue,
.ico: "favicon.ico",
.webApplicationManifestFile: FaviconFormatType.launcherIcon4x.rawValue
]
)
).fetchFaviconURLs()
else {
return []
}
nip05DomainFavicons[lowercasedDomain] = faviconURLs
return faviconURLs
}
}

View File

@@ -21,6 +21,7 @@ enum LogCategory: String {
case damus_purple
case image_uploading
case video_coordination
case tips
}
/// Damus structured logger

View File

@@ -5,6 +5,7 @@
// Created by Scott Penrose on 5/7/23.
//
import FaviconFinder
import SwiftUI
enum Route: Hashable {
@@ -46,6 +47,8 @@ enum Route: Hashable {
case Wallet(wallet: WalletModel)
case WalletScanner(result: Binding<WalletScanResult>)
case FollowersYouKnow(friendedFollowers: [Pubkey], followers: FollowersModel)
case NIP05DomainEvents(events: NIP05DomainEventsModel, nip05_domain_favicon: FaviconURL?)
case NIP05DomainPubkeys(domain: String, nip05_domain_favicon: FaviconURL?, pubkeys: [Pubkey])
@ViewBuilder
func view(navigationCoordinator: NavigationCoordinator, damusState: DamusState) -> some View {
@@ -127,6 +130,10 @@ enum Route: Hashable {
FollowersYouKnowView(damus_state: damusState, friended_followers: friendedFollowers, followers: followers)
case .Script(let load_model):
LoadScript(pool: damusState.nostrNetwork.pool, model: load_model)
case .NIP05DomainEvents(let events, let nip05_domain_favicon):
NIP05DomainTimelineView(damus_state: damusState, model: events, nip05_domain_favicon: nip05_domain_favicon)
case .NIP05DomainPubkeys(let domain, let nip05_domain_favicon, let pubkeys):
NIP05DomainPubkeysView(damus_state: damusState, domain: domain, nip05_domain_favicon: nip05_domain_favicon, pubkeys: pubkeys)
}
}
@@ -231,6 +238,12 @@ enum Route: Hashable {
case .Script(let model):
hasher.combine("script")
hasher.combine(model.data.count)
case .NIP05DomainEvents(let events, _):
hasher.combine("nip05DomainEvents")
hasher.combine(events.domain)
case .NIP05DomainPubkeys(let domain, _, _):
hasher.combine("nip05DomainPubkeys")
hasher.combine(domain)
}
}
}

View File

@@ -1,44 +0,0 @@
//
// FriendsButton.swift
// damus
//
// Created by William Casarin on 2023-04-21.
//
import SwiftUI
struct FriendsButton: View {
@Binding var filter: FriendFilter
var body: some View {
Button(action: {
switch self.filter {
case .all:
self.filter = .friends_of_friends
case .friends_of_friends:
self.filter = .all
}
}) {
if filter == .friends_of_friends {
LINEAR_GRADIENT
.mask(Image("user-added")
.resizable()
).frame(width: 28, height: 28)
} else {
Image("user-added")
.resizable()
.frame(width: 28, height: 28)
.foregroundColor(.gray)
}
}
.buttonStyle(.plain)
}
}
struct FriendsButton_Previews: PreviewProvider {
@State static var enabled: FriendFilter = .all
static var previews: some View {
FriendsButton(filter: $enabled)
}
}

View File

@@ -0,0 +1,54 @@
//
// TrustedNetworkButton.swift
// damus
//
// Created by William Casarin on 2023-04-21.
//
import SwiftUI
struct TrustedNetworkButton: View {
@Binding var filter: FriendFilter
var action: (@MainActor () -> Void)? = nil
var MainButton: some View {
Button(action: {
switch self.filter {
case .all:
self.filter = .friends_of_friends
case .friends_of_friends:
self.filter = .all
}
if let action {
action()
}
}) {
if filter == .friends_of_friends {
LINEAR_GRADIENT
.mask(Image(systemName: "network.badge.shield.half.filled")
.frame(width: 24, height: 24)
)
.scaledToFit()
.frame(width: 24, height: 24)
} else {
Image(systemName: "network.slash")
.frame(width: 24, height: 24)
.foregroundColor(.gray)
}
}
.buttonStyle(.plain)
}
var body: some View {
MainButton
}
}
struct TrustedNetworkButton_Previews: PreviewProvider {
@State static var enabled: FriendFilter = .all
static var previews: some View {
TrustedNetworkButton(filter: $enabled)
}
}

View File

@@ -337,12 +337,6 @@ struct ChatEventView: View {
}
}
extension Notification.Name {
static var toggle_thread_view: Notification.Name {
return Notification.Name("convert_to_thread")
}
}
#Preview {
let bar = make_actionbar_model(ev: test_note.id, damus: test_damus_state)
return ChatEventView(event: test_note, selected_event: test_note, prev_ev: nil, next_ev: nil, damus_state: test_damus_state, thread: ThreadModel(event: test_note, damus_state: test_damus_state), scroll_to_event: nil, focus_event: nil, highlight_bubble: false, bar: bar)

View File

@@ -7,6 +7,7 @@
import SwiftUI
import SwipeActions
import TipKit
struct ChatroomThreadView: View {
@Environment(\.dismiss) var dismiss
@@ -15,11 +16,20 @@ struct ChatroomThreadView: View {
@ObservedObject var thread: ThreadModel
@State var highlighted_note_id: NoteId? = nil
@State var user_just_posted_flag: Bool = false
@State var untrusted_network_expanded: Bool = true
@Namespace private var animation
// Add state for sticky header
@State var showStickyHeader: Bool = false
@State var untrustedSectionOffset: CGFloat = 0
private static let untrusted_network_section_id = "untrusted-network-section"
private static let sticky_header_adjusted_anchor = UnitPoint(x: UnitPoint.top.x, y: 0.2)
func go_to_event(scroller: ScrollViewProxy, note_id: NoteId) {
scroll_to_event(scroller: scroller, id: note_id, delay: 0, animate: true, anchor: .top)
let adjustedAnchor: UnitPoint = showStickyHeader ? ChatroomThreadView.sticky_header_adjusted_anchor : .top
scroll_to_event(scroller: scroller, id: note_id, delay: 0, animate: true, anchor: adjustedAnchor)
highlighted_note_id = note_id
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
withAnimation {
@@ -27,7 +37,7 @@ struct ChatroomThreadView: View {
}
})
}
func set_active_event(scroller: ScrollViewProxy, ev: NdbNote) {
withAnimation {
self.thread.select(event: ev)
@@ -35,93 +45,202 @@ struct ChatroomThreadView: View {
}
}
func trusted_event_filter(_ event: NostrEvent) -> Bool {
!damus.settings.show_trusted_replies_first || damus.contacts.is_in_friendosphere(event.pubkey)
}
func ThreadedSwipeViewGroup(scroller: ScrollViewProxy, events: [NostrEvent]) -> some View {
SwipeViewGroup {
ForEach(Array(zip(events, events.indices)), id: \.0.id) { (ev, ind) in
ChatEventView(event: events[ind],
selected_event: self.thread.selected_event,
prev_ev: ind > 0 ? events[ind-1] : nil,
next_ev: ind == events.count-1 ? nil : events[ind+1],
damus_state: damus,
thread: thread,
scroll_to_event: { note_id in
self.go_to_event(scroller: scroller, note_id: note_id)
},
focus_event: {
self.set_active_event(scroller: scroller, ev: ev)
},
highlight_bubble: highlighted_note_id == ev.id,
bar: make_actionbar_model(ev: ev.id, damus: damus)
)
.id(ev.id)
.matchedGeometryEffect(id: ev.id.hex(), in: animation, anchor: .center)
.padding(.horizontal)
}
}
}
var OutsideTrustedNetworkLabel: some View {
HStack {
Label(
NSLocalizedString(
"Replies outside your trusted network",
comment: "Section title in thread for replies from outside of the current user's trusted network, which is their follows and follows of follows."),
systemImage: "network.slash"
)
Spacer()
Image(systemName: "chevron.right")
.rotationEffect(.degrees(untrusted_network_expanded ? 90 : 0))
.animation(.easeInOut(duration: 0.1), value: untrusted_network_expanded)
}
.foregroundColor(.secondary)
}
var StickyHeaderView: some View {
OutsideTrustedNetworkLabel
.padding(.horizontal)
.padding(.vertical, 12)
.background(
Color(UIColor.systemBackground)
.shadow(color: .black.opacity(0.15), radius: 3, x: 0, y: 2)
)
}
var body: some View {
ScrollViewReader { scroller in
ScrollView(.vertical) {
LazyVStack(alignment: .leading, spacing: 8) {
// MARK: - Parents events view
ForEach(thread.parent_events, id: \.id) { parent_event in
EventMutingContainerView(damus_state: damus, event: parent_event) {
EventView(damus: damus, event: parent_event)
.matchedGeometryEffect(id: parent_event.id.hex(), in: animation, anchor: .center)
}
.padding(.horizontal)
.onTapGesture {
self.set_active_event(scroller: scroller, ev: parent_event)
}
.id(parent_event.id)
Divider()
.padding(.top, 4)
.padding(.leading, 25 * 2)
}.background(GeometryReader { geometry in
// get the height and width of the EventView view
let eventHeight = geometry.frame(in: .global).height
// let eventWidth = geometry.frame(in: .global).width
// vertical gray line in the background
Rectangle()
.fill(Color.gray.opacity(0.25))
.frame(width: 2, height: eventHeight)
.offset(x: 40, y: 40)
})
// MARK: - Actual event view
EventMutingContainerView(
damus_state: damus,
event: self.thread.selected_event,
muteBox: { event_shown, muted_reason in
AnyView(
EventMutedBoxView(shown: event_shown, reason: muted_reason)
.padding(5)
)
}
) {
SelectedEventView(damus: damus, event: self.thread.selected_event, size: .selected)
.matchedGeometryEffect(id: self.thread.selected_event.id.hex(), in: animation, anchor: .center)
}
.id(self.thread.selected_event.id)
// MARK: - Children view
let events = thread.sorted_child_events
let count = events.count
SwipeViewGroup {
ForEach(Array(zip(events, events.indices)), id: \.0.id) { (ev, ind) in
ChatEventView(event: events[ind],
selected_event: self.thread.selected_event,
prev_ev: ind > 0 ? events[ind-1] : nil,
next_ev: ind == count-1 ? nil : events[ind+1],
damus_state: damus,
thread: thread,
scroll_to_event: { note_id in
self.go_to_event(scroller: scroller, note_id: note_id)
},
focus_event: {
self.set_active_event(scroller: scroller, ev: ev)
},
highlight_bubble: highlighted_note_id == ev.id,
bar: make_actionbar_model(ev: ev.id, damus: damus)
)
let sorted_child_events = thread.sorted_child_events
let untrusted_events = sorted_child_events.filter { !trusted_event_filter($0) }
let trusted_events = sorted_child_events.filter { trusted_event_filter($0) }
ZStack(alignment: .top) {
ScrollView(.vertical) {
LazyVStack(alignment: .leading, spacing: 8) {
// MARK: - Parents events view
ForEach(thread.parent_events, id: \.id) { parent_event in
EventMutingContainerView(damus_state: damus, event: parent_event) {
EventView(damus: damus, event: parent_event)
.matchedGeometryEffect(id: parent_event.id.hex(), in: animation, anchor: .center)
}
.padding(.horizontal)
.id(ev.id)
.matchedGeometryEffect(id: ev.id.hex(), in: animation, anchor: .center)
.onTapGesture {
self.set_active_event(scroller: scroller, ev: parent_event)
}
.id(parent_event.id)
Divider()
.padding(.top, 4)
.padding(.leading, 25 * 2)
}.background(GeometryReader { geometry in
let eventHeight = geometry.frame(in: .global).height
Rectangle()
.fill(Color.gray.opacity(0.25))
.frame(width: 2, height: eventHeight)
.offset(x: 40, y: 40)
})
// MARK: - Actual event view
EventMutingContainerView(
damus_state: damus,
event: self.thread.selected_event,
muteBox: { event_shown, muted_reason in
AnyView(
EventMutedBoxView(shown: event_shown, reason: muted_reason)
.padding(5)
)
}
) {
SelectedEventView(damus: damus, event: self.thread.selected_event, size: .selected)
.matchedGeometryEffect(id: self.thread.selected_event.id.hex(), in: animation, anchor: .center)
}
.id(self.thread.selected_event.id)
// MARK: - Children view - inside trusted network
if !trusted_events.isEmpty {
ThreadedSwipeViewGroup(scroller: scroller, events: trusted_events)
}
}
.padding(.top)
// MARK: - Children view - outside trusted network
if !untrusted_events.isEmpty {
if #available(iOS 17, *) {
TipView(TrustedNetworkRepliesTip.shared, arrowEdge: .bottom)
.padding(.top, 10)
.padding(.horizontal)
}
VStack(alignment: .leading, spacing: 0) {
// Track this section's position
Color.clear
.frame(height: 1)
.background(
GeometryReader { proxy in
Color.clear
.onAppear {
untrustedSectionOffset = proxy.frame(in: .global).minY
}
.onChange(of: proxy.frame(in: .global).minY) { newY in
let shouldShow = newY <= 100 // Adjust this threshold as needed
if shouldShow != showStickyHeader {
withAnimation(.easeInOut(duration: 0.3)) {
showStickyHeader = shouldShow
}
}
}
}
)
Button(action: {
withAnimation {
untrusted_network_expanded.toggle()
if #available(iOS 17, *) {
TrustedNetworkRepliesTip.shared.invalidate(reason: .actionPerformed)
}
scroll_to_event(scroller: scroller, id: ChatroomThreadView.untrusted_network_section_id, delay: 0.1, animate: true, anchor: ChatroomThreadView.sticky_header_adjusted_anchor)
}
}) {
OutsideTrustedNetworkLabel
}
.id(ChatroomThreadView.untrusted_network_section_id)
.buttonStyle(PlainButtonStyle())
.padding(.horizontal)
if untrusted_network_expanded {
withAnimation {
LazyVStack(alignment: .leading, spacing: 8) {
ThreadedSwipeViewGroup(scroller: scroller, events: untrusted_events)
}
.padding(.top, 10)
}
}
}
}
EndBlock()
HStack {}
.frame(height: tabHeight + getSafeAreaBottom())
}
if showStickyHeader && !untrusted_events.isEmpty {
VStack {
StickyHeaderView
.onTapGesture {
withAnimation {
untrusted_network_expanded.toggle()
}
}
Spacer()
}
.transition(.move(edge: .top).combined(with: .opacity))
.zIndex(1)
}
.padding(.top)
EndBlock()
HStack {}
.frame(height: tabHeight + getSafeAreaBottom())
}
.onReceive(handle_notify(.post), perform: { notify in
switch notify {
case .post(_):
user_just_posted_flag = true
case .cancel:
return
case .post(_):
user_just_posted_flag = true
case .cancel:
return
}
})
.onReceive(thread.objectWillChange) {
@@ -139,15 +258,8 @@ struct ChatroomThreadView: View {
}
}
}
func toggle_thread_view() {
NotificationCenter.default.post(name: .toggle_thread_view, object: nil)
}
}
struct ChatroomView_Previews: PreviewProvider {
static var previews: some View {
Group {
@@ -167,8 +279,3 @@ struct ChatroomView_Previews: PreviewProvider {
}
}
}
@MainActor
func scroll_after_load(thread: ThreadModel, proxy: ScrollViewProxy) {
scroll_to_event(scroller: proxy, id: thread.selected_event.id, delay: 0.1, animate: false)
}

View File

@@ -6,6 +6,7 @@
//
import SwiftUI
import TipKit
enum DMType: Hashable {
case rando
@@ -18,6 +19,7 @@ struct DirectMessagesView: View {
@State var dm_type: DMType = .friend
@ObservedObject var model: DirectMessagesModel
@ObservedObject var settings: UserSettingsStore
@Binding var subtitle: String?
func MainContent(requests: Bool) -> some View {
ScrollView {
@@ -72,7 +74,15 @@ struct DirectMessagesView: View {
}
var body: some View {
let showTrustedButton = would_filter_non_friends_from_dms(contacts: damus_state.contacts, dms: self.model.dms)
VStack(spacing: 0) {
if #available(iOS 17, *), showTrustedButton {
TipView(TrustedNetworkButtonTip.shared)
.tipBackground(.clear)
.tipViewStyle(TrustedNetworkButtonTipViewStyle())
.padding(.horizontal)
}
CustomPicker(tabs: [
(NSLocalizedString("DMs", comment: "Picker option for DM selector for seeing only DMs that have been responded to. DM is the English abbreviation for Direct Message."), DMType.friend),
(NSLocalizedString("Requests", comment: "Picker option for DM selector for seeing only message requests (DMs that someone else sent the user which has not been responded to yet"), DMType.rando),
@@ -92,12 +102,22 @@ struct DirectMessagesView: View {
}
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
if would_filter_non_friends_from_dms(contacts: damus_state.contacts, dms: self.model.dms) {
FriendsButton(filter: $settings.friend_filter)
if showTrustedButton {
TrustedNetworkButton(filter: $settings.friend_filter) {
if #available(iOS 17, *) {
TrustedNetworkButtonTip.shared.invalidate(reason: .actionPerformed)
}
}
}
}
}
.onAppear {
self.subtitle = settings.friend_filter.description()
}
.onChange(of: settings.friend_filter) { val in
self.subtitle = val.description()
}
.navigationTitle(NSLocalizedString("DMs", comment: "Navigation title for view of DMs, where DM is an English abbreviation for Direct Message."))
}
}
@@ -115,6 +135,6 @@ func would_filter_non_friends_from_dms(contacts: Contacts, dms: [DirectMessageMo
struct DirectMessagesView_Previews: PreviewProvider {
static var previews: some View {
let ds = test_damus_state
DirectMessagesView(damus_state: ds, model: ds.dms, settings: ds.settings)
DirectMessagesView(damus_state: ds, model: ds.dms, settings: ds.settings, subtitle: .constant(nil))
}
}

View File

@@ -0,0 +1,51 @@
//
// NIP05DomainPubkeysView.swift
// damus
//
// Created by Terry Yiu on 5/23/25.
//
import FaviconFinder
import Kingfisher
import SwiftUI
struct NIP05DomainPubkeysView: View {
let damus_state: DamusState
let domain: String
let nip05_domain_favicon: FaviconURL?
let pubkeys: [Pubkey]
var body: some View {
ScrollView {
LazyVStack(alignment: .leading) {
ForEach(pubkeys, id: \.self) { pk in
FollowUserView(target: .pubkey(pk), damus_state: damus_state)
}
}
.padding(.horizontal)
}
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .principal) {
HStack {
if let nip05_domain_favicon {
KFImage(nip05_domain_favicon.source)
.imageContext(.favicon, disable_animation: true)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 18, height: 18)
.clipped()
}
Text(domain)
.font(.headline)
}
}
}
}
}
#Preview {
let nip05_domain_favicon = FaviconURL(source: URL(string: "https://damus.io/favicon.ico")!, format: .ico, sourceType: .ico)
let pubkeys = [test_pubkey, test_pubkey_2]
NIP05DomainPubkeysView(damus_state: test_damus_state, domain: "damus.io", nip05_domain_favicon: nip05_domain_favicon, pubkeys: pubkeys)
}

View File

@@ -0,0 +1,111 @@
//
// NIP05DomainTimelineHeaderView.swift
// damus
//
// Created by Terry Yiu on 5/16/25.
//
import FaviconFinder
import Kingfisher
import SwiftUI
struct NIP05DomainTimelineHeaderView: View {
let damus_state: DamusState
@ObservedObject var model: NIP05DomainEventsModel
let nip05_domain_favicon: FaviconURL?
@Environment(\.openURL) var openURL
var Icon: some View {
ZStack {
if let nip05_domain_favicon {
KFImage(nip05_domain_favicon.source)
.imageContext(.favicon, disable_animation: true)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 18, height: 18)
.clipped()
} else {
EmptyView()
}
}
}
var friendsOfFriends: [Pubkey] {
// Order it such that the pubkeys that have events come first in the array so that their profile pictures
// show first.
let pubkeys = model.events.all_events.map { $0.pubkey } + (model.filter.authors ?? [])
// Filter out duplicates but retain order, and filter out any that do not have a validated NIP-05.
return (NSMutableOrderedSet(array: pubkeys).array as? [Pubkey] ?? [])
.filter {
damus_state.contacts.is_in_friendosphere($0) && damus_state.profiles.is_validated($0) != nil
}
}
var body: some View {
VStack(alignment: .leading) {
HStack {
if nip05_domain_favicon != nil {
Icon
}
Text(model.domain)
.foregroundStyle(DamusLogoGradient.gradient)
.font(.title.bold())
.onTapGesture {
if let url = URL(string: "https://\(model.domain)") {
openURL(url)
}
}
}
let friendsOfFriends = friendsOfFriends
HStack {
CondensedProfilePicturesView(state: damus_state, pubkeys: friendsOfFriends, maxPictures: 3)
let friendsOfFriendsString = friendsOfFriendsString(friendsOfFriends, ndb: damus_state.ndb)
Text(friendsOfFriendsString)
.font(.subheadline)
.foregroundColor(.gray)
.multilineTextAlignment(.leading)
}
.onTapGesture {
if !friendsOfFriends.isEmpty {
damus_state.nav.push(route: Route.NIP05DomainPubkeys(domain: model.domain, nip05_domain_favicon: nip05_domain_favicon, pubkeys: friendsOfFriends))
}
}
}
}
}
func friendsOfFriendsString(_ friendsOfFriends: [Pubkey], ndb: Ndb, locale: Locale = Locale.current) -> String {
let bundle = bundleForLocale(locale: locale)
let names: [String] = friendsOfFriends.prefix(3).map { pk in
let profile = ndb.lookup_profile(pk)?.unsafeUnownedValue?.profile
return Profile.displayName(profile: profile, pubkey: pk).username.truncate(maxLength: 20)
}
switch friendsOfFriends.count {
case 0:
return "No one in your trusted network is associated with this domain."
case 1:
let format = NSLocalizedString("Notes from %@", bundle: bundle, comment: "Text to indicate that notes from one pubkey in our trusted network are shown below.")
return String(format: format, locale: locale, names[0])
case 2:
let format = NSLocalizedString("Notes from %@ & %@", bundle: bundle, comment: "Text to indicate that notes from two pubkeys in our trusted network are shown below.")
return String(format: format, locale: locale, names[0], names[1])
case 3:
let format = NSLocalizedString("Notes from %@, %@ & %@", bundle: bundle, comment: "Text to indicate that notes from three pubkeys in our trusted network are shown below.")
return String(format: format, locale: locale, names[0], names[1], names[2])
default:
let format = localizedStringFormat(key: "notes_from_three_and_others", locale: locale)
return String(format: format, locale: locale, friendsOfFriends.count - 3, names[0], names[1], names[2])
}
}
#Preview {
let model = NIP05DomainEventsModel(state: test_damus_state, domain: "damus.io")
let nip05_domain_favicon = FaviconURL(source: URL(string: "https://damus.io/favicon.ico")!, format: .ico, sourceType: .ico)
NIP05DomainTimelineHeaderView(damus_state: test_damus_state, model: model, nip05_domain_favicon: nip05_domain_favicon)
}

View File

@@ -0,0 +1,64 @@
//
// NIP05DomainTimelineView.swift
// damus
//
// Created by Terry Yiu on 4/11/25.
//
import FaviconFinder
import Kingfisher
import SwiftUI
struct NIP05DomainTimelineView: View {
let damus_state: DamusState
@ObservedObject var model: NIP05DomainEventsModel
let nip05_domain_favicon: FaviconURL?
func nip05_filter(ev: NostrEvent) -> Bool {
damus_state.contacts.is_in_friendosphere(ev.pubkey) && damus_state.profiles.is_validated(ev.pubkey) != nil
}
var contentFilters: ContentFilters {
var filters = Array<(NostrEvent) -> Bool>()
filters.append(contentsOf: ContentFilters.defaults(damus_state: damus_state))
filters.append(nip05_filter)
return ContentFilters(filters: filters)
}
var body: some View {
let height: CGFloat = 250.0
TimelineView(events: model.events, loading: $model.loading, damus: damus_state, show_friend_icon: true, filter: contentFilters.filter(ev:)) {
ZStack(alignment: .leading) {
DamusBackground(maxHeight: height)
.mask(LinearGradient(gradient: Gradient(colors: [.black, .black, .black, .clear]), startPoint: .top, endPoint: .bottom))
NIP05DomainTimelineHeaderView(damus_state: damus_state, model: model, nip05_domain_favicon: nip05_domain_favicon)
.padding(.leading, 30)
.padding(.top, 30)
}
}
.ignoresSafeArea()
.padding(.bottom, tabHeight)
.onAppear {
guard model.events.all_events.isEmpty else { return }
model.subscribe()
if let pubkeys = model.filter.authors {
for pubkey in pubkeys {
check_nip05_validity(pubkey: pubkey, profiles: damus_state.profiles)
}
}
}
.onDisappear {
model.unsubscribe()
}
}
}
#Preview {
let damus_state = test_damus_state
let model = NIP05DomainEventsModel(state: damus_state, domain: "damus.io")
let nip05_domain_favicon = FaviconURL(source: URL(string: "https://damus.io/favicon.ico")!, format: .ico, sourceType: .ico)
NIP05DomainTimelineView(damus_state: test_damus_state, model: model, nip05_domain_favicon: nip05_domain_favicon)
}

View File

@@ -6,6 +6,7 @@
//
import SwiftUI
import TipKit
class NotificationFilter: ObservableObject, Equatable {
@Published var state: NotificationFilterState
@@ -75,10 +76,11 @@ struct NotificationsView: View {
@StateObject var filter = NotificationFilter()
@SceneStorage("NotificationsView.filter_state") var filter_state: NotificationFilterState = .all
@Binding var subtitle: String?
@Environment(\.colorScheme) var colorScheme
var body: some View {
let showTrustedButton = would_filter_non_friends_from_notifications(contacts: state.contacts, state: filter_state, items: self.notifications.notifications)
TabView(selection: $filter_state) {
NotificationTab(
NotificationFilter(
@@ -115,14 +117,19 @@ struct NotificationsView: View {
Button(
action: { state.nav.push(route: Route.NotificationSettings(settings: state.settings)) },
label: {
Image("settings")
Image(systemName: "gearshape")
.frame(width: 24, height: 24)
.foregroundColor(.gray)
}
)
}
ToolbarItem(placement: .navigationBarTrailing) {
if would_filter_non_friends_from_notifications(contacts: state.contacts, state: filter_state, items: self.notifications.notifications) {
FriendsButton(filter: $filter.friend_filter)
if showTrustedButton {
TrustedNetworkButton(filter: $filter.friend_filter) {
if #available(iOS 17, *) {
TrustedNetworkButtonTip.shared.invalidate(reason: .actionPerformed)
}
}
}
}
}
@@ -140,6 +147,13 @@ struct NotificationsView: View {
}
.safeAreaInset(edge: .top, spacing: 0) {
VStack(spacing: 0) {
if #available(iOS 17, *), showTrustedButton {
TipView(TrustedNetworkButtonTip.shared)
.tipBackground(.clear)
.tipViewStyle(TrustedNetworkButtonTipViewStyle())
.padding(.horizontal)
}
CustomPicker(tabs: [
(NSLocalizedString("All", comment: "Label for filter for all notifications."), NotificationFilterState.all),
(NSLocalizedString("Zaps", comment: "Label for filter for zap notifications."), NotificationFilterState.zaps),

View File

@@ -35,7 +35,6 @@ struct SuggestedUserView: View {
let target = FollowTarget.pubkey(user.pubkey)
InnerProfilePicView(url: user.pfp,
fallbackUrl: nil,
pubkey: target.pubkey,
size: 50,
highlight: .none,
disable_animation: false)

View File

@@ -5,6 +5,7 @@
// Created by William Casarin on 2022-04-16.
//
import FaviconFinder
import SwiftUI
enum FriendType {
@@ -43,6 +44,7 @@ struct ProfileName: View {
@State var nip05: NIP05?
@State var donation: Int?
@State var purple_account: DamusPurple.Account?
@State var nip05_domain_favicon: FaviconURL?
init(pubkey: Pubkey, prefix: String = "", damus: DamusState, show_nip5_domain: Bool = true, supporterBadgeStyle: SupporterBadge.Style = .compact) {
self.pubkey = pubkey
@@ -61,7 +63,7 @@ struct ProfileName: View {
var current_nip05: NIP05? {
nip05 ?? damus_state.profiles.is_validated(pubkey)
}
func current_display_name(profile: Profile?) -> DisplayName {
return display_name ?? Profile.displayName(profile: profile, pubkey: pubkey)
}
@@ -101,7 +103,7 @@ struct ProfileName: View {
.fontWeight(prefix == "@" ? .none : .bold)
if let nip05 = current_nip05 {
NIP05Badge(nip05: nip05, pubkey: pubkey, contacts: damus_state.contacts, show_domain: show_nip5_domain, profiles: damus_state.profiles)
NIP05Badge(nip05: nip05, pubkey: pubkey, damus_state: damus_state, show_domain: show_nip5_domain, nip05_domain_favicon: nip05_domain_favicon)
}
if let friend = friend_type, current_nip05 == nil {
@@ -118,9 +120,15 @@ struct ProfileName: View {
}
.task {
if damus_state.purple.enable_purple {
self.purple_account = try? await damus_state.purple.get_maybe_cached_account(pubkey: pubkey)
}
if damus_state.purple.enable_purple {
self.purple_account = try? await damus_state.purple.get_maybe_cached_account(pubkey: pubkey)
}
}
.task {
if let domain = current_nip05?.host {
self.nip05_domain_favicon = try? await damus_state.favicon_cache.lookup(domain)
.largest()
}
}
.onReceive(handle_notify(.profile_updated)) { update in
if update.pubkey != pubkey {
@@ -151,6 +159,24 @@ struct ProfileName: View {
let nip05 = damus_state.profiles.is_validated(pubkey)
if nip05 != self.nip05 {
self.nip05 = nip05
if let domain = nip05?.host {
Task {
let favicon = try? await damus_state.favicon_cache.lookup(domain)
.filter {
if let size = $0.size {
return size.width <= 128 && size.height <= 128
} else {
return true
}
}
.largest()
await MainActor.run {
self.nip05_domain_favicon = favicon
}
}
}
}
if donation != profile.damus_donation {

View File

@@ -31,7 +31,6 @@ func pfp_line_width(_ h: Highlight) -> CGFloat {
struct InnerProfilePicView: View {
let url: URL?
let fallbackUrl: URL?
let pubkey: Pubkey
let size: CGFloat
let highlight: Highlight
let disable_animation: Bool
@@ -65,16 +64,19 @@ struct InnerProfilePicView: View {
struct ProfilePicView: View {
@Environment(\.redactionReasons) var redactionReasons
let pubkey: Pubkey
let size: CGFloat
let highlight: Highlight
let profiles: Profiles
let disable_animation: Bool
let zappability_indicator: Bool
let privacy_sensitive: Bool
@State var picture: String?
init(pubkey: Pubkey, size: CGFloat, highlight: Highlight, profiles: Profiles, disable_animation: Bool, picture: String? = nil, show_zappability: Bool? = nil) {
init(pubkey: Pubkey, size: CGFloat, highlight: Highlight, profiles: Profiles, disable_animation: Bool, picture: String? = nil, show_zappability: Bool? = nil, privacy_sensitive: Bool = false) {
self.pubkey = pubkey
self.profiles = profiles
self.size = size
@@ -82,15 +84,24 @@ struct ProfilePicView: View {
self._picture = State(initialValue: picture)
self.disable_animation = disable_animation
self.zappability_indicator = show_zappability ?? false
self.privacy_sensitive = privacy_sensitive
}
var privacy_sensitive_pubkey: Pubkey {
if privacy_sensitive && redactionReasons.contains(.privacy) {
ANON_PUBKEY
} else {
pubkey
}
}
func get_lnurl() -> String? {
return profiles.lookup_with_timestamp(pubkey)?.unsafeUnownedValue?.lnurl
}
var body: some View {
ZStack (alignment: Alignment(horizontal: .trailing, vertical: .bottom)) {
InnerProfilePicView(url: get_profile_url(picture: picture, pubkey: pubkey, profiles: profiles), fallbackUrl: URL(string: robohash(pubkey)), pubkey: pubkey, size: size, highlight: highlight, disable_animation: disable_animation)
InnerProfilePicView(url: get_profile_url(picture: picture, pubkey: privacy_sensitive_pubkey, profiles: profiles), fallbackUrl: URL(string: robohash(privacy_sensitive_pubkey)), size: size, highlight: highlight, disable_animation: disable_animation)
.onReceive(handle_notify(.profile_updated)) { updated in
guard updated.pubkey == self.pubkey else {
return

View File

@@ -100,6 +100,8 @@ struct AppearanceSettingsView: View {
header: Text("Content filters", comment: "Section title for content filtering/moderation configuration."),
footer: Text("Notes with the #nsfw tag usually contains adult content or other \"Not safe for work\" content", comment: "Section footer clarifying what #nsfw (not safe for work) tags mean")
) {
Toggle(NSLocalizedString("Show replies from your trusted network first", comment: "Setting to show replies in threads from the current user's trusted network first."), isOn: $settings.show_trusted_replies_first)
.toggleStyle(.switch)
Toggle(NSLocalizedString("Hide notes with #nsfw tags", comment: "Setting to hide notes with the #nsfw (not safe for work) tags"), isOn: $settings.hide_nsfw_tagged_content)
.toggleStyle(.switch)
}

View File

@@ -96,6 +96,11 @@ struct DeveloperSettingsView: View {
Toggle(NSLocalizedString("Enable experimental Purple In-app purchase support", comment: "Developer mode setting to enable experimental Purple In-app purchase support."), isOn: $settings.enable_experimental_purple_iap_support)
.toggleStyle(.switch)
if #available(iOS 17, *) {
Toggle(NSLocalizedString("Reset tips on launch", comment: "Developer mode setting to reset tips upon app first launch. Tips are visual contextual hints that highlight new, interesting, or unused features users have not discovered yet."), isOn: $settings.reset_tips_on_launch)
.toggleStyle(.switch)
}
}
}
}

View File

@@ -89,6 +89,7 @@ struct KeySettingsView: View {
.disabled(true)
} else {
Text(sec)
.privacySensitive()
.clipShape(RoundedRectangle(cornerRadius: 5))
}

View File

@@ -67,6 +67,8 @@ struct ZapSettingsView: View {
Section(NSLocalizedString("NWC wallet", comment: "Title for section in zap settings that controls general NWC wallet settings.")) {
Toggle(NSLocalizedString("Disable high balance warning", comment: "Setting to disable high balance warnings on the user's wallet"), isOn: $settings.dismiss_wallet_high_balance_warning)
.toggleStyle(.switch)
Toggle(NSLocalizedString("Hide balance", comment: "Setting to hide wallet balance."), isOn: $settings.hide_wallet_balance)
.toggleStyle(.switch)
}
}
.navigationTitle(NSLocalizedString("Zaps", comment: "Navigation title for zap settings."))

View File

@@ -0,0 +1,25 @@
//
// TrustedNetworkButtonTip.swift
// damus
//
// Created by Terry Yiu on 6/4/25.
//
import TipKit
@available(iOS 17, *)
struct TrustedNetworkButtonTip: Tip {
static let shared = TrustedNetworkButtonTip()
var title: Text {
Text("Toggle visibility of content from outside your trusted network", comment: "Title of tip that informs users what trusted network means and that they can toggle the visibility of content from outside their trusted network.")
}
var message: Text? {
Text("Your trusted network is comprised of profiles you follow and profiles that they follow.", comment: "Description of the tip that informs users what trusted network means.")
}
var image: Image? {
Image(systemName: "network.badge.shield.half.filled")
}
}

View File

@@ -0,0 +1,79 @@
//
// TrustedNetworkButtonTipViewStyle.swift
// damus
//
// Created by Terry Yiu on 6/7/25.
//
import TipKit
// (tyiu): Apple's native popover tips have a lot of rendering and race condition issues --
// text being rendered in the wrong locations or not at all, or the tip gets opened in full screen.
//
// Instead, we are introducing this custom popover tip view style to emulate a similar look and feel.
// The main thing needed from this view style is really just an arrow on the top right corner
// to point to the TrustedNetworkButton on the NotificationsView and DirectMessagesview.
@available(iOS 17, *)
struct TrustedNetworkButtonTipViewStyle: TipViewStyle {
func makeBody(configuration: Configuration) -> some View {
VStack(spacing: 0) {
// Arrow pointing up to the button (positioned at top right)
HStack {
Spacer()
Triangle()
.fill(Color(.secondarySystemBackground))
.frame(width: 24, height: 14)
}
HStack(alignment: .top, spacing: 12) {
// Icon
configuration.image
.foregroundStyle(.tint)
.font(.title2)
VStack(alignment: .leading, spacing: 4) {
configuration.title
.font(.headline)
.fontWeight(.semibold)
.foregroundStyle(.primary)
configuration.message
.font(.subheadline)
.foregroundStyle(.secondary)
}
Spacer()
Button(action: { configuration.tip.invalidate(reason: .tipClosed) }) {
Image(systemName: "xmark")
.fontWeight(.semibold)
.foregroundStyle(Color(.tertiaryLabel))
}
.buttonStyle(PlainButtonStyle())
}
.padding(.horizontal, 14)
.padding(.vertical, 14)
.background(Color(.secondarySystemBackground))
.clipShape(
.rect(
topLeadingRadius: 20,
bottomLeadingRadius: 20,
bottomTrailingRadius: 20,
topTrailingRadius: 0
)
)
}
}
}
// Custom triangle shape for the popover arrow
struct Triangle: Shape {
func path(in rect: CGRect) -> Path {
var path = Path()
path.move(to: CGPoint(x: rect.midX, y: rect.minY))
path.addLine(to: CGPoint(x: rect.minX, y: rect.maxY))
path.addLine(to: CGPoint(x: rect.maxX, y: rect.maxY))
path.addLine(to: CGPoint(x: rect.midX, y: rect.minY))
return path
}
}

View File

@@ -0,0 +1,26 @@
//
// TrustedNetworkRepliesTip.swift
// damus
//
// Created by Terry Yiu on 6/7/25.
//
import Foundation
import TipKit
@available(iOS 17, *)
struct TrustedNetworkRepliesTip: Tip {
static let shared = TrustedNetworkRepliesTip()
var title: Text {
Text("Toggle visibility of replies from outside your trusted network", comment: "Title of tip that informs users what trusted network means and that they can toggle the visibility of threaded replies from outside their trusted network.")
}
var message: Text? {
Text("Your trusted network is comprised of profiles you follow and profiles that they follow.", comment: "Description of the tip that informs users what trusted network means.")
}
var image: Image? {
Image(systemName: "network.badge.shield.half.filled")
}
}

View File

@@ -9,7 +9,9 @@ import SwiftUI
struct BalanceView: View {
var balance: Int64?
@Binding var hide_balance: Bool
var body: some View {
VStack(spacing: 5) {
Text("Current balance", comment: "Label for displaying current wallet balance")
@@ -28,29 +30,46 @@ struct BalanceView: View {
}
func numericalBalanceView(text: String) -> some View {
HStack {
Text(verbatim: text)
.lineLimit(1)
.minimumScaleFactor(0.70)
.font(.veryVeryLargeTitle)
.fontWeight(.heavy)
.foregroundStyle(PinkGradient)
HStack(alignment: .top) {
Text("SATS", comment: "Abbreviation for Satoshis, smallest bitcoin unit")
.font(.caption)
Group {
if hide_balance {
Text(verbatim: "*****")
.lineLimit(1)
.minimumScaleFactor(0.70)
.font(.veryVeryLargeTitle)
.fontWeight(.heavy)
.foregroundStyle(PinkGradient)
} else {
HStack {
Text(verbatim: text)
.lineLimit(1)
.minimumScaleFactor(0.70)
.font(.veryVeryLargeTitle)
.fontWeight(.heavy)
.foregroundStyle(PinkGradient)
HStack(alignment: .top) {
Text("SATS", comment: "Abbreviation for Satoshis, smallest bitcoin unit")
.font(.caption)
.fontWeight(.heavy)
.foregroundStyle(PinkGradient)
}
}
}
}
.privacySensitive()
.padding(.bottom)
.onTapGesture {
hide_balance.toggle()
}
}
}
struct BalanceView_Previews: PreviewProvider {
@State private static var hide_balance: Bool = false
static var previews: some View {
BalanceView(balance: 100000000)
BalanceView(balance: nil)
BalanceView(balance: 100000000, hide_balance: $hide_balance)
BalanceView(balance: nil, hide_balance: $hide_balance)
}
}

View File

@@ -138,7 +138,10 @@ struct NWCSettings: View {
Toggle(NSLocalizedString("Disable high balance warning", comment: "Setting to disable high balance warnings on the user's wallet"), isOn: $settings.dismiss_wallet_high_balance_warning)
.toggleStyle(.switch)
Toggle(NSLocalizedString("Hide balance", comment: "Setting to hide wallet balance."), isOn: $settings.hide_wallet_balance)
.toggleStyle(.switch)
Button(action: {
self.model.disconnect()
dismiss()

View File

@@ -8,39 +8,47 @@
import SwiftUI
struct TransactionView: View {
@Environment(\.redactionReasons) var redactionReasons
let damus_state: DamusState
var transaction: WalletConnect.Transaction
@Binding var hide_balance: Bool
var body: some View {
let redactedForPrivacy = redactionReasons.contains(.privacy)
let isIncomingTransaction = transaction.type == "incoming"
let txType = isIncomingTransaction ? "arrow-bottom-left" : "arrow-top-right"
let txColor = isIncomingTransaction ? DamusColors.success : Color.gray
let txColor = (isIncomingTransaction && !hide_balance && !redactedForPrivacy) ? DamusColors.success : Color.gray
let txOp = isIncomingTransaction ? "+" : "-"
let created_at = Date.init(timeIntervalSince1970: TimeInterval(transaction.created_at))
let formatter = RelativeDateTimeFormatter()
let relativeDate = formatter.localizedString(for: created_at, relativeTo: Date.now)
let event = decode_nostr_event_json(transaction.description ?? "") ?? transaction.metadata?.nostr
let pubkey = self.pubkeyToDisplay(for: event, isIncomingTransaction: isIncomingTransaction) ?? ANON_PUBKEY
let pubkey = self.pubkeyToDisplay(for: event, isIncomingTransaction: isIncomingTransaction)
VStack(alignment: .leading) {
HStack(alignment: .center) {
ZStack {
ProfilePicView(pubkey: pubkey, size: 45, highlight: .custom(.damusAdaptableBlack, 0.1), profiles: damus_state.profiles, disable_animation: damus_state.settings.disable_animation)
ProfilePicView(pubkey: pubkey ?? ANON_PUBKEY, size: 45, highlight: .custom(.damusAdaptableBlack, 0.1), profiles: damus_state.profiles, disable_animation: damus_state.settings.disable_animation, privacy_sensitive: true)
.onTapGesture {
damus_state.nav.push(route: Route.ProfileByKey(pubkey: pubkey))
if let pubkey {
damus_state.nav.push(route: Route.ProfileByKey(pubkey: pubkey))
}
}
Image(txType)
.resizable()
.frame(width: 18, height: 18)
.foregroundColor(.white)
.padding(2)
.background(txColor)
.clipShape(Circle())
.overlay(Circle().stroke(Color.damusAdaptableWhite, lineWidth: 1.0))
.padding(.top, 25)
.padding(.leading, 35)
if !hide_balance && !redactedForPrivacy {
Image(txType)
.resizable()
.frame(width: 18, height: 18)
.foregroundColor(.white)
.padding(2)
.background(txColor)
.clipShape(Circle())
.overlay(Circle().stroke(Color.damusAdaptableWhite, lineWidth: 1.0))
.padding(.top, 25)
.padding(.leading, 35)
}
}
VStack(alignment: .leading, spacing: 10) {
@@ -58,10 +66,17 @@ struct TransactionView: View {
Spacer()
Text(verbatim: "\(txOp) \(format_msats(transaction.amount))")
.font(.headline)
.foregroundColor(txColor)
.bold()
if hide_balance {
Text(verbatim: "*****")
.font(.headline)
.foregroundColor(txColor)
.bold()
} else {
Text(verbatim: "\(txOp) \(format_msats(transaction.amount))")
.font(.headline)
.foregroundColor(txColor)
.bold()
}
}
.frame(maxWidth: .infinity, minHeight: 75, alignment: .center)
.padding(.horizontal, 10)
@@ -84,17 +99,15 @@ struct TransactionView: View {
}
}
func userDisplayName(pubkey: Pubkey) -> String {
let profile_txn = damus_state.profiles.lookup(id: pubkey, txn_name: "txview-profile")
let profile = profile_txn?.unsafeUnownedValue
if let display_name = profile?.display_name {
return display_name
} else if let name = profile?.name {
return "@" + name
} else {
func userDisplayName(pubkey: Pubkey?) -> String {
guard let pubkey else {
return NSLocalizedString("Unknown", comment: "A name label for an unknown user")
}
let profile_txn = damus_state.profiles.lookup(id: pubkey, txn_name: "txview-profile")
let profile = profile_txn?.unsafeUnownedValue
return Profile.displayName(profile: profile, pubkey: pubkey).displayName
}
}
@@ -107,27 +120,32 @@ struct TransactionsView: View {
transactions?.sorted(by: { $0.created_at > $1.created_at })
}
@Binding var hide_balance: Bool
var body: some View {
VStack(alignment: .leading, spacing: 10) {
Text("Latest transactions", comment: "Heading for latest wallet transactions list")
.foregroundStyle(DamusColors.neutral6)
if let sortedTransactions {
if sortedTransactions.isEmpty {
emptyTransactions
} else {
ForEach(sortedTransactions, id: \.self) { transaction in
TransactionView(damus_state: damus_state, transaction: transaction)
Group {
if let sortedTransactions {
if sortedTransactions.isEmpty {
emptyTransactions
} else {
ForEach(sortedTransactions, id: \.self) { transaction in
TransactionView(damus_state: damus_state, transaction: transaction, hide_balance: $hide_balance)
}
}
}
else {
// Make sure we do not show "No transactions yet" to the user when still loading (or when failed to load)
// This is important because if we show that when things are not loaded properly, we risk scaring the user into thinking that they have lost funds.
emptyTransactions
.redacted(reason: .placeholder)
.shimmer(true)
}
}
else {
// Make sure we do not show "No transactions yet" to the user when still loading (or when failed to load)
// This is important because if we show that when things are not loaded properly, we risk scaring the user into thinking that they have lost funds.
emptyTransactions
.redacted(reason: .placeholder)
.shimmer(true)
}
.privacySensitive()
}
}
@@ -154,8 +172,10 @@ struct TransactionsView_Previews: PreviewProvider {
static let transaction3: WalletConnect.Transaction = WalletConnect.Transaction(type: "outgoing", invoice: "", description: "", description_hash: "", preimage: "", payment_hash: "123456789042", amount: 303000, fees_paid: 0, created_at: 1737590101, expires_at: 0, settled_at: 0, metadata: nil)
static let transaction4: WalletConnect.Transaction = WalletConnect.Transaction(type: "incoming", invoice: "", description: "", description_hash: "", preimage: "", payment_hash: "1234567890662", amount: 720000, fees_paid: 0, created_at: 1737090300, expires_at: 0, settled_at: 0, metadata: nil)
static var test_transactions: [WalletConnect.Transaction] = [transaction1, transaction2, transaction3, transaction4]
@State private static var hide_balance: Bool = false
static var previews: some View {
TransactionsView(damus_state: tds, transactions: test_transactions)
TransactionsView(damus_state: tds, transactions: test_transactions, hide_balance: $hide_balance)
}
}

View File

@@ -14,7 +14,8 @@ struct WalletView: View {
@State var show_settings: Bool = false
@ObservedObject var model: WalletModel
@ObservedObject var settings: UserSettingsStore
@State private var showBalance: Bool = false
init(damus_state: DamusState, model: WalletModel? = nil) {
self.damus_state = damus_state
self._model = ObservedObject(wrappedValue: model ?? damus_state.wallet)
@@ -47,6 +48,7 @@ struct WalletView: View {
.bold()
.foregroundStyle(.damusWarningTertiary)
}
.privacySensitive()
.padding()
.overlay(
RoundedRectangle(cornerRadius: 20)
@@ -56,9 +58,9 @@ struct WalletView: View {
VStack(spacing: 5) {
BalanceView(balance: model.balance)
TransactionsView(damus_state: damus_state, transactions: model.transactions)
BalanceView(balance: model.balance, hide_balance: $settings.hide_wallet_balance)
TransactionsView(damus_state: damus_state, transactions: model.transactions, hide_balance: $settings.hide_wallet_balance)
}
}
.navigationTitle(NSLocalizedString("Wallet", comment: "Navigation title for Wallet view"))

Binary file not shown.

View File

@@ -50,6 +50,22 @@
<string>Folge ich</string>
</dict>
</dict>
<key>hellthread_notifications_disabled</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@HELLTHREAD_PROFILES@</string>
<key>HELLTHREAD_PROFILES</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>Benachrichtigungen ausblenden, die mehr als %d Profil markieren</string>
<key>other</key>
<string>Benachrichtigungen ausblenden, die mehr als %d Profile markieren.</string>
</dict>
</dict>
<key>imports_count</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
@@ -82,6 +98,22 @@
<string>%2$@ und %1$d weitere teilten</string>
</dict>
</dict>
<key>quoted_reposts_count</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@QUOTE_REPOSTS@</string>
<key>QUOTE_REPOSTS</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>Zitate</string>
<key>other</key>
<string>Zitat</string>
</dict>
</dict>
<key>reacted_tagged_in_3</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
@@ -242,22 +274,6 @@
<string>geteilte Beiträge</string>
</dict>
</dict>
<key>quoted_reposts_count</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@QUOTE_REPOSTS@</string>
<key>QUOTE_REPOSTS</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>Zitate</string>
<key>other</key>
<string>Zitat</string>
</dict>
</dict>
<key>sats</key>
<dict>
<key>NSStringLocalizedFormatKey</key>

View File

@@ -82,6 +82,22 @@
<string>Imports</string>
</dict>
</dict>
<key>notes_from_three_and_others</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@OTHERS@</string>
<key>OTHERS</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>Notes from %2$@, %3$@, %4$@ &amp; %1$d other in your trusted network</string>
<key>other</key>
<string>Notes from %2$@, %3$@, %4$@ &amp; %1$d others in your trusted network</string>
</dict>
</dict>
<key>people_reposted_count</key>
<dict>
<key>NSStringLocalizedFormatKey</key>

View File

@@ -308,6 +308,11 @@ Label for filter for all notifications.</note>
<target>An additional percentage of each zap will be sent to support Damus development</target>
<note>Text indicating that they can contribute zaps to support Damus development.</note>
</trans-unit>
<trans-unit id="An internal error occurred in your wallet." xml:space="preserve">
<source>An internal error occurred in your wallet.</source>
<target>An internal error occurred in your wallet.</target>
<note>Error description for an internal error</note>
</trans-unit>
<trans-unit id="An unexpected error happened while trying to perform this action. Please contact support." xml:space="preserve">
<source>An unexpected error happened while trying to perform this action. Please contact support.</source>
<target>An unexpected error happened while trying to perform this action. Please contact support.</target>
@@ -323,6 +328,11 @@ Label for filter for all notifications.</note>
<target>An unknown error occurred while adding a relay.</target>
<note>Title of an unknown relay error message.</note>
</trans-unit>
<trans-unit id="An unspecified error occurred in your wallet." xml:space="preserve">
<source>An unspecified error occurred in your wallet.</source>
<target>An unspecified error occurred in your wallet.</target>
<note>Error description for an unspecified error</note>
</trans-unit>
<trans-unit id="Animations" xml:space="preserve">
<source>Animations</source>
<target>Animations</target>
@@ -511,6 +521,11 @@ Text for button to cancel out of connecting Nostr Wallet Connect lightning walle
<target>Check the address and/or the relay list.</target>
<note>Human readable tip for error</note>
</trans-unit>
<trans-unit id="Check your account permissions or contact support." xml:space="preserve">
<source>Check your account permissions or contact support.</source>
<target>Check your account permissions or contact support.</target>
<note>Tip for restricted operation</note>
</trans-unit>
<trans-unit id="Check your internet connection and try again. If the error persists, contact support." xml:space="preserve">
<source>Check your internet connection and try again. If the error persists, contact support.</source>
<target>Check your internet connection and try again. If the error persists, contact support.</target>
@@ -557,9 +572,9 @@ Text for button to cancel out of connecting Nostr Wallet Connect lightning walle
<note>Button label giving the user the option to close the sheet from which they posted a highlight
Button label giving the user the option to close the sheet from which they were trying to post a highlight</note>
</trans-unit>
<trans-unit id="Coinos is a service operated by a third-party. We have no access to your Coinos wallet." xml:space="preserve">
<source>Coinos is a service operated by a third-party. We have no access to your Coinos wallet.</source>
<target>Coinos is a service operated by a third-party. We have no access to your Coinos wallet.</target>
<trans-unit id="Coinos is a service operated by a third-party. The Damus team has no access to your wallet." xml:space="preserve">
<source>Coinos is a service operated by a third-party. The Damus team has no access to your wallet.</source>
<target>Coinos is a service operated by a third-party. The Damus team has no access to your wallet.</target>
<note>Small caption with a disclaimer that Damus does not own or have access to Coinos wallets, Coinos is a third-party service.</note>
</trans-unit>
<trans-unit id="Coming soon" xml:space="preserve">
@@ -652,6 +667,11 @@ Prompt to user to continue</note>
<target>Copied</target>
<note>Label indicating that a user's key was copied.</note>
</trans-unit>
<trans-unit id="Copied!" xml:space="preserve">
<source>Copied!</source>
<target>Copied!</target>
<note>Label indicating that the error technical information was successfully copied to the clipboard, which shows up as soon as the user clicks the copy button.</note>
</trans-unit>
<trans-unit id="Copy" xml:space="preserve">
<source>Copy</source>
<target>Copy</target>
@@ -709,6 +729,11 @@ Context menu option for copying the version of damus.</note>
<target>Copy note JSON</target>
<note>Context menu option for copying the JSON text from the note.</note>
</trans-unit>
<trans-unit id="Copy technical information" xml:space="preserve">
<source>Copy technical information</source>
<target>Copy technical information</target>
<note>Button label to allow user to copy technical information from an error screen (usually to provide our support team for further troubleshooting)</note>
</trans-unit>
<trans-unit id="Copy text" xml:space="preserve">
<source>Copy text</source>
<target>Copy text</target>
@@ -855,6 +880,11 @@ Section header for developer settings</note>
<target>Developer Mode enables features and options that may help developers diagnose issues and improve this app. Most users will not need Developer Mode.</target>
<note>Section header for Developer Settings view</note>
</trans-unit>
<trans-unit id="Disable high balance warning" xml:space="preserve">
<source>Disable high balance warning</source>
<target>Disable high balance warning</target>
<note>Setting to disable high balance warnings on the user's wallet</note>
</trans-unit>
<trans-unit id="Discard changes?" xml:space="preserve">
<source>Discard changes?</source>
<target>Discard changes?</target>
@@ -874,7 +904,8 @@ Button to disconnect from the relay.</note>
<trans-unit id="Dismiss" xml:space="preserve">
<source>Dismiss</source>
<target>Dismiss</target>
<note>Button to dismiss alert
<note>Button label to dismiss the safety reminder that the user's wallet has a high balance
Button to dismiss alert
Button to dismiss error</note>
</trans-unit>
<trans-unit id="Done" xml:space="preserve">
@@ -926,6 +957,11 @@ Edit Button for editing profile</note>
<target>Edit profile picture</target>
<note>Accessibility label for a button that edits a profile picture</note>
</trans-unit>
<trans-unit id="Empty error message" xml:space="preserve">
<source>Empty error message</source>
<target>Empty error message</target>
<note>A human readable placeholder to indicate that the error message is empty</note>
</trans-unit>
<trans-unit id="Enable Purple auto-translations" xml:space="preserve">
<source>Enable Purple auto-translations</source>
<target>Enable Purple auto-translations</target>
@@ -1620,6 +1656,11 @@ Text label indicating that there is no NIP-11 relay description information foun
Text label indicating that there is no NIP-11 relay software information found. In English, N/A stands for not applicable.
Text label indicating that there is no NIP-11 relay software version information found. In English, N/A stands for not applicable.</note>
</trans-unit>
<trans-unit id="NWC wallet" xml:space="preserve">
<source>NWC wallet</source>
<target>NWC wallet</target>
<note>Title for section in zap settings that controls general NWC wallet settings.</note>
</trans-unit>
<trans-unit id="Name" xml:space="preserve">
<source>Name</source>
<target>Name</target>
@@ -1942,6 +1983,11 @@ Section title for deleting the user</note>
<target>Plan</target>
<note>Prompt selection of DeepL subscription plan to perform machine translations on notes</note>
</trans-unit>
<trans-unit id="Please check for updates or contact your wallet provider." xml:space="preserve">
<source>Please check for updates or contact your wallet provider.</source>
<target>Please check for updates or contact your wallet provider.</target>
<note>Tip for not implemented error</note>
</trans-unit>
<trans-unit id="Please check the address and try again" xml:space="preserve">
<source>Please check the address and try again</source>
<target>Please check the address and try again</target>
@@ -1962,11 +2008,26 @@ Section title for deleting the user</note>
<target>Please contact support.</target>
<note>Tip for an unknown relay error message.</note>
</trans-unit>
<trans-unit id="Please contact the developer of your wallet provider for help." xml:space="preserve">
<source>Please contact the developer of your wallet provider for help.</source>
<target>Please contact the developer of your wallet provider for help.</target>
<note>Human readable error description for an unknown error raised by a wallet provider.</note>
</trans-unit>
<trans-unit id="Please contact the person who provided the link, and ask for another link." xml:space="preserve">
<source>Please contact the person who provided the link, and ask for another link.</source>
<target>Please contact the person who provided the link, and ask for another link.</target>
<note>User-visible tip on what to do if a link contains a deprecated "nrelay" reference.</note>
</trans-unit>
<trans-unit id="Please copy the technical info and send it to our support team." xml:space="preserve">
<source>Please copy the technical info and send it to our support team.</source>
<target>Please copy the technical info and send it to our support team.</target>
<note>Tip on how to resolve issue when wallet returns an invalid response</note>
</trans-unit>
<trans-unit id="Please deposit more funds and try again." xml:space="preserve">
<source>Please deposit more funds and try again.</source>
<target>Please deposit more funds and try again.</target>
<note>Tip for insufficient balance errors</note>
</trans-unit>
<trans-unit id="Please double-check the checkout web page, or go to the Side Menu → &quot;Purple&quot; to check your account status. If you have already paid, but still don't see your account active, please save the URL of the checkout page where you came from, contact our support, and give us the URL to help you with this issue." xml:space="preserve">
<source>Please double-check the checkout web page, or go to the Side Menu → "Purple" to check your account status. If you have already paid, but still don't see your account active, please save the URL of the checkout page where you came from, contact our support, and give us the URL to help you with this issue.</source>
<target>Please double-check the checkout web page, or go to the Side Menu → "Purple" to check your account status. If you have already paid, but still don't see your account active, please save the URL of the checkout page where you came from, contact our support, and give us the URL to help you with this issue.</target>
@@ -1987,6 +2048,11 @@ Section title for deleting the user</note>
<target>Please try again later or contact support if the issue persists.</target>
<note>Human readable tip for error</note>
</trans-unit>
<trans-unit id="Please try again or contact your wallet provider for further assistance." xml:space="preserve">
<source>Please try again or contact your wallet provider for further assistance.</source>
<target>Please try again or contact your wallet provider for further assistance.</target>
<note>Tip for unspecified error</note>
</trans-unit>
<trans-unit id="Please try again, check the URL for typos, or contact support for further help." xml:space="preserve">
<source>Please try again, check the URL for typos, or contact support for further help.</source>
<target>Please try again, check the URL for typos, or contact support for further help.</target>
@@ -1997,6 +2063,11 @@ Section title for deleting the user</note>
<target>Please try opening this content on another Nostr app that supports this type of content.</target>
<note>User-visible advice on what to do if they see the error indicating a note has an unknown kind or is unsupported for viewing.</note>
</trans-unit>
<trans-unit id="Please verify your credentials or permissions." xml:space="preserve">
<source>Please verify your credentials or permissions.</source>
<target>Please verify your credentials or permissions.</target>
<note>Tip for unauthorized access</note>
</trans-unit>
<trans-unit id="Point your camera to a QR code…" xml:space="preserve">
<source>Point your camera to a QR code…</source>
<target>Point your camera to a QR code…</target>
@@ -2810,6 +2881,11 @@ Enjoy!</target>
<target>This device's in-app purchase is registered to a different Nostr account. Unable to manage this Purple account. If you believe this was a mistake, please contact us via support@damus.io.</target>
<note>Notice label that user cannot manage their In-App purchases</note>
</trans-unit>
<trans-unit id="This feature is not implemented by your wallet." xml:space="preserve">
<source>This feature is not implemented by your wallet.</source>
<target>This feature is not implemented by your wallet.</target>
<note>Error description for not implemented feature</note>
</trans-unit>
<trans-unit id="This is a public key, you will not be able to make notes or interact in any way. This is used for viewing accounts from their perspective." xml:space="preserve">
<source>This is a public key, you will not be able to make notes or interact in any way. This is used for viewing accounts from their perspective.</source>
<target>This is a public key, you will not be able to make notes or interact in any way. This is used for viewing accounts from their perspective.</target>
@@ -2839,6 +2915,11 @@ Nice to meet you all! #introductions #plebchain </target>
<target>This note contains too many items and cannot be rendered</target>
<note>Error message indicating that a note is too big and cannot be rendered</note>
</trans-unit>
<trans-unit id="This operation is restricted by your wallet." xml:space="preserve">
<source>This operation is restricted by your wallet.</source>
<target>This operation is restricted by your wallet.</target>
<note>Error description for restricted operation</note>
</trans-unit>
<trans-unit id="This relay is already in your list." xml:space="preserve">
<source>This relay is already in your list.</source>
<target>This relay is already in your list.</target>
@@ -2915,6 +2996,11 @@ Section header for text and appearance settings</note>
<target>Try checking the link again, your internet connection, or contact the person who provided you the link for help.</target>
<note>Tips on what to do if a note cannot be found.</note>
</trans-unit>
<trans-unit id="Try restarting your wallet or contacting support if the problem persists." xml:space="preserve">
<source>Try restarting your wallet or contacting support if the problem persists.</source>
<target>Try restarting your wallet or contacting support if the problem persists.</target>
<note>Tip for internal error</note>
</trans-unit>
<trans-unit id="Type %@ to delete" xml:space="preserve">
<source>Type %@ to delete</source>
<target>Type %@ to delete</target>
@@ -3107,6 +3193,16 @@ This will reset your contact list, including the list of everyone you follow and
This will reset your contact list, including the list of everyone you follow and potentially the list of all relays you usually connect to. ONLY PROCEED IF YOU ARE SURE YOU HAVE LOST YOUR CONTACT LIST BEYOND RECOVERABILITY.</target>
<note>Alert for resetting the user's contact list.</note>
</trans-unit>
<trans-unit id="Wait a few moments, and then try again." xml:space="preserve">
<source>Wait a few moments, and then try again.</source>
<target>Wait a few moments, and then try again.</target>
<note>Tip for rate limit error</note>
</trans-unit>
<trans-unit id="Wait for the quota to reset, or configure your wallet provider to allow a higher limit." xml:space="preserve">
<source>Wait for the quota to reset, or configure your wallet provider to allow a higher limit.</source>
<target>Wait for the quota to reset, or configure your wallet provider to allow a higher limit.</target>
<note>Tip for quota exceeded</note>
</trans-unit>
<trans-unit id="Wallet" xml:space="preserve">
<source>Wallet</source>
<target>Wallet</target>
@@ -3115,6 +3211,21 @@ Navigation title for attaching Nostr Wallet Connect lightning wallet.
Sidebar menu label for Wallet view.
Title for section in zap settings that controls the Lightning wallet selection.</note>
</trans-unit>
<trans-unit id="Wallet provider returned a response that we could not decrypt." xml:space="preserve">
<source>Wallet provider returned a response that we could not decrypt.</source>
<target>Wallet provider returned a response that we could not decrypt.</target>
<note>Error description shown to the user when a response from the wallet provider contains data the app could not decrypt.</note>
</trans-unit>
<trans-unit id="Wallet provider returned a response that we do not understand." xml:space="preserve">
<source>Wallet provider returned a response that we do not understand.</source>
<target>Wallet provider returned a response that we do not understand.</target>
<note>Error description shown to the user when a response from the wallet provider contains data the app does not understand</note>
</trans-unit>
<trans-unit id="Wallet provider returned an invalid response." xml:space="preserve">
<source>Wallet provider returned an invalid response.</source>
<target>Wallet provider returned an invalid response.</target>
<note>Error description shown to the user when a response from the wallet provider is invalid</note>
</trans-unit>
<trans-unit id="We did not detect any issues that we can automatically fix for you. If you are having issues, please contact Damus support: [support@damus.io](mailto:support@damus.io)" xml:space="preserve">
<source>We did not detect any issues that we can automatically fix for you. If you are having issues, please contact Damus support: [support@damus.io](mailto:support@damus.io)</source>
<target>We did not detect any issues that we can automatically fix for you. If you are having issues, please contact Damus support: [support@damus.io](mailto:support@damus.io)</target>
@@ -3206,6 +3317,11 @@ User confirm Yes</note>
<target>Yes, Overwrite</target>
<note>Text of button that confirms to overwrite the existing mutelist.</note>
</trans-unit>
<trans-unit id="You are not authorized to perform this action with your wallet." xml:space="preserve">
<source>You are not authorized to perform this action with your wallet.</source>
<target>You are not authorized to perform this action with your wallet.</target>
<note>Error description for unauthorized access</note>
</trans-unit>
<trans-unit id="You cannot post a highlight because you are not logged in with a private key! Please close this, login with a private key (or nsec), and try again." xml:space="preserve">
<source>You cannot post a highlight because you are not logged in with a private key! Please close this, login with a private key (or nsec), and try again.</source>
<target>You cannot post a highlight because you are not logged in with a private key! Please close this, login with a private key (or nsec), and try again.</target>
@@ -3276,6 +3392,11 @@ User confirm Yes</note>
<target>Your Purple subscription has expired. Renew?</target>
<note>A notification message explaining to the user that their Damus Purple Subscription has expired, prompting them to renew.</note>
</trans-unit>
<trans-unit id="Your connected wallet raised an unknown error. Message: %s" xml:space="preserve">
<source>Your connected wallet raised an unknown error. Message: %s</source>
<target>Your connected wallet raised an unknown error. Message: %s</target>
<note>Human readable error description for unknown error</note>
</trans-unit>
<trans-unit id="Your draft has been saved to storage." xml:space="preserve">
<source>Your draft has been saved to storage.</source>
<target>Your draft has been saved to storage.</target>
@@ -3301,6 +3422,21 @@ User confirm Yes</note>
<target>Your report will be sent to the relays you are connected to</target>
<note>Footer text to inform user what will happen when the report is submitted.</note>
</trans-unit>
<trans-unit id="Your transaction quota has been exceeded." xml:space="preserve">
<source>Your transaction quota has been exceeded.</source>
<target>Your transaction quota has been exceeded.</target>
<note>Error description for quota exceeded</note>
</trans-unit>
<trans-unit id="Your wallet does not have sufficient balance for this transaction." xml:space="preserve">
<source>Your wallet does not have sufficient balance for this transaction.</source>
<target>Your wallet does not have sufficient balance for this transaction.</target>
<note>Error description for insufficient balance</note>
</trans-unit>
<trans-unit id="Your wallet is temporarily being rate limited." xml:space="preserve">
<source>Your wallet is temporarily being rate limited.</source>
<target>Your wallet is temporarily being rate limited.</target>
<note>Error description for rate limit error</note>
</trans-unit>
<trans-unit id="Zap" xml:space="preserve">
<source>Zap</source>
<target>Zap</target>
@@ -4287,6 +4423,11 @@ Label for filter for all notifications.</note>
<target state="new">An additional percentage of each zap will be sent to support Damus development</target>
<note>Text indicating that they can contribute zaps to support Damus development.</note>
</trans-unit>
<trans-unit id="An internal error occurred in your wallet." xml:space="preserve">
<source>An internal error occurred in your wallet.</source>
<target state="new">An internal error occurred in your wallet.</target>
<note>Error description for an internal error</note>
</trans-unit>
<trans-unit id="An unexpected error happened while trying to perform this action. Please contact support." xml:space="preserve">
<source>An unexpected error happened while trying to perform this action. Please contact support.</source>
<target state="new">An unexpected error happened while trying to perform this action. Please contact support.</target>
@@ -4302,6 +4443,11 @@ Label for filter for all notifications.</note>
<target state="new">An unknown error occurred while adding a relay.</target>
<note>Title of an unknown relay error message.</note>
</trans-unit>
<trans-unit id="An unspecified error occurred in your wallet." xml:space="preserve">
<source>An unspecified error occurred in your wallet.</source>
<target state="new">An unspecified error occurred in your wallet.</target>
<note>Error description for an unspecified error</note>
</trans-unit>
<trans-unit id="Animations" xml:space="preserve">
<source>Animations</source>
<target state="new">Animations</target>
@@ -4490,6 +4636,11 @@ Text for button to cancel out of connecting Nostr Wallet Connect lightning walle
<target state="new">Check the address and/or the relay list.</target>
<note>Human readable tip for error</note>
</trans-unit>
<trans-unit id="Check your account permissions or contact support." xml:space="preserve">
<source>Check your account permissions or contact support.</source>
<target state="new">Check your account permissions or contact support.</target>
<note>Tip for restricted operation</note>
</trans-unit>
<trans-unit id="Check your internet connection and try again. If the error persists, contact support." xml:space="preserve">
<source>Check your internet connection and try again. If the error persists, contact support.</source>
<target state="new">Check your internet connection and try again. If the error persists, contact support.</target>
@@ -4539,9 +4690,9 @@ Button label giving the user the option to close the sheet from which they were
Button label giving the user the option to close the sheet from which they were trying to share.
Button label giving the user the option to close the view when no content is available to share</note>
</trans-unit>
<trans-unit id="Coinos is a service operated by a third-party. We have no access to your Coinos wallet." xml:space="preserve">
<source>Coinos is a service operated by a third-party. We have no access to your Coinos wallet.</source>
<target state="new">Coinos is a service operated by a third-party. We have no access to your Coinos wallet.</target>
<trans-unit id="Coinos is a service operated by a third-party. The Damus team has no access to your wallet." xml:space="preserve">
<source>Coinos is a service operated by a third-party. The Damus team has no access to your wallet.</source>
<target state="new">Coinos is a service operated by a third-party. The Damus team has no access to your wallet.</target>
<note>Small caption with a disclaimer that Damus does not own or have access to Coinos wallets, Coinos is a third-party service.</note>
</trans-unit>
<trans-unit id="Coming soon" xml:space="preserve">
@@ -4634,6 +4785,11 @@ Prompt to user to continue</note>
<target state="new">Copied</target>
<note>Label indicating that a user's key was copied.</note>
</trans-unit>
<trans-unit id="Copied!" xml:space="preserve">
<source>Copied!</source>
<target state="new">Copied!</target>
<note>Label indicating that the error technical information was successfully copied to the clipboard, which shows up as soon as the user clicks the copy button.</note>
</trans-unit>
<trans-unit id="Copy" xml:space="preserve">
<source>Copy</source>
<target state="new">Copy</target>
@@ -4691,6 +4847,11 @@ Context menu option for copying the version of damus.</note>
<target state="new">Copy note JSON</target>
<note>Context menu option for copying the JSON text from the note.</note>
</trans-unit>
<trans-unit id="Copy technical information" xml:space="preserve">
<source>Copy technical information</source>
<target state="new">Copy technical information</target>
<note>Button label to allow user to copy technical information from an error screen (usually to provide our support team for further troubleshooting)</note>
</trans-unit>
<trans-unit id="Copy text" xml:space="preserve">
<source>Copy text</source>
<target state="new">Copy text</target>
@@ -4837,6 +4998,11 @@ Section header for developer settings</note>
<target state="new">Developer Mode enables features and options that may help developers diagnose issues and improve this app. Most users will not need Developer Mode.</target>
<note>Section header for Developer Settings view</note>
</trans-unit>
<trans-unit id="Disable high balance warning" xml:space="preserve">
<source>Disable high balance warning</source>
<target state="new">Disable high balance warning</target>
<note>Setting to disable high balance warnings on the user's wallet</note>
</trans-unit>
<trans-unit id="Discard changes?" xml:space="preserve">
<source>Discard changes?</source>
<target state="new">Discard changes?</target>
@@ -4856,7 +5022,8 @@ Button to disconnect from the relay.</note>
<trans-unit id="Dismiss" xml:space="preserve">
<source>Dismiss</source>
<target state="new">Dismiss</target>
<note>Button to dismiss alert
<note>Button label to dismiss the safety reminder that the user's wallet has a high balance
Button to dismiss alert
Button to dismiss error</note>
</trans-unit>
<trans-unit id="Done" xml:space="preserve">
@@ -4908,6 +5075,11 @@ Edit Button for editing profile</note>
<target state="new">Edit profile picture</target>
<note>Accessibility label for a button that edits a profile picture</note>
</trans-unit>
<trans-unit id="Empty error message" xml:space="preserve">
<source>Empty error message</source>
<target state="new">Empty error message</target>
<note>A human readable placeholder to indicate that the error message is empty</note>
</trans-unit>
<trans-unit id="Enable Purple auto-translations" xml:space="preserve">
<source>Enable Purple auto-translations</source>
<target state="new">Enable Purple auto-translations</target>
@@ -5597,6 +5769,11 @@ Text label indicating that there is no NIP-11 relay description information foun
Text label indicating that there is no NIP-11 relay software information found. In English, N/A stands for not applicable.
Text label indicating that there is no NIP-11 relay software version information found. In English, N/A stands for not applicable.</note>
</trans-unit>
<trans-unit id="NWC wallet" xml:space="preserve">
<source>NWC wallet</source>
<target state="new">NWC wallet</target>
<note>Title for section in zap settings that controls general NWC wallet settings.</note>
</trans-unit>
<trans-unit id="Name" xml:space="preserve">
<source>Name</source>
<target state="new">Name</target>
@@ -5919,6 +6096,11 @@ Section title for deleting the user</note>
<target state="new">Plan</target>
<note>Prompt selection of DeepL subscription plan to perform machine translations on notes</note>
</trans-unit>
<trans-unit id="Please check for updates or contact your wallet provider." xml:space="preserve">
<source>Please check for updates or contact your wallet provider.</source>
<target state="new">Please check for updates or contact your wallet provider.</target>
<note>Tip for not implemented error</note>
</trans-unit>
<trans-unit id="Please check the address and try again" xml:space="preserve">
<source>Please check the address and try again</source>
<target state="new">Please check the address and try again</target>
@@ -5939,11 +6121,26 @@ Section title for deleting the user</note>
<target state="new">Please contact support.</target>
<note>Tip for an unknown relay error message.</note>
</trans-unit>
<trans-unit id="Please contact the developer of your wallet provider for help." xml:space="preserve">
<source>Please contact the developer of your wallet provider for help.</source>
<target state="new">Please contact the developer of your wallet provider for help.</target>
<note>Human readable error description for an unknown error raised by a wallet provider.</note>
</trans-unit>
<trans-unit id="Please contact the person who provided the link, and ask for another link." xml:space="preserve">
<source>Please contact the person who provided the link, and ask for another link.</source>
<target state="new">Please contact the person who provided the link, and ask for another link.</target>
<note>User-visible tip on what to do if a link contains a deprecated "nrelay" reference.</note>
</trans-unit>
<trans-unit id="Please copy the technical info and send it to our support team." xml:space="preserve">
<source>Please copy the technical info and send it to our support team.</source>
<target state="new">Please copy the technical info and send it to our support team.</target>
<note>Tip on how to resolve issue when wallet returns an invalid response</note>
</trans-unit>
<trans-unit id="Please deposit more funds and try again." xml:space="preserve">
<source>Please deposit more funds and try again.</source>
<target state="new">Please deposit more funds and try again.</target>
<note>Tip for insufficient balance errors</note>
</trans-unit>
<trans-unit id="Please double-check the checkout web page, or go to the Side Menu → &quot;Purple&quot; to check your account status. If you have already paid, but still don't see your account active, please save the URL of the checkout page where you came from, contact our support, and give us the URL to help you with this issue." xml:space="preserve">
<source>Please double-check the checkout web page, or go to the Side Menu → "Purple" to check your account status. If you have already paid, but still don't see your account active, please save the URL of the checkout page where you came from, contact our support, and give us the URL to help you with this issue.</source>
<target state="new">Please double-check the checkout web page, or go to the Side Menu → "Purple" to check your account status. If you have already paid, but still don't see your account active, please save the URL of the checkout page where you came from, contact our support, and give us the URL to help you with this issue.</target>
@@ -5964,6 +6161,11 @@ Section title for deleting the user</note>
<target state="new">Please try again later or contact support if the issue persists.</target>
<note>Human readable tip for error</note>
</trans-unit>
<trans-unit id="Please try again or contact your wallet provider for further assistance." xml:space="preserve">
<source>Please try again or contact your wallet provider for further assistance.</source>
<target state="new">Please try again or contact your wallet provider for further assistance.</target>
<note>Tip for unspecified error</note>
</trans-unit>
<trans-unit id="Please try again, check the URL for typos, or contact support for further help." xml:space="preserve">
<source>Please try again, check the URL for typos, or contact support for further help.</source>
<target state="new">Please try again, check the URL for typos, or contact support for further help.</target>
@@ -5974,6 +6176,11 @@ Section title for deleting the user</note>
<target state="new">Please try opening this content on another Nostr app that supports this type of content.</target>
<note>User-visible advice on what to do if they see the error indicating a note has an unknown kind or is unsupported for viewing.</note>
</trans-unit>
<trans-unit id="Please verify your credentials or permissions." xml:space="preserve">
<source>Please verify your credentials or permissions.</source>
<target state="new">Please verify your credentials or permissions.</target>
<note>Tip for unauthorized access</note>
</trans-unit>
<trans-unit id="Point your camera to a QR code…" xml:space="preserve">
<source>Point your camera to a QR code…</source>
<target state="new">Point your camera to a QR code…</target>
@@ -6792,6 +6999,11 @@ Enjoy!</target>
<target state="new">This device's in-app purchase is registered to a different Nostr account. Unable to manage this Purple account. If you believe this was a mistake, please contact us via support@damus.io.</target>
<note>Notice label that user cannot manage their In-App purchases</note>
</trans-unit>
<trans-unit id="This feature is not implemented by your wallet." xml:space="preserve">
<source>This feature is not implemented by your wallet.</source>
<target state="new">This feature is not implemented by your wallet.</target>
<note>Error description for not implemented feature</note>
</trans-unit>
<trans-unit id="This is a public key, you will not be able to make notes or interact in any way. This is used for viewing accounts from their perspective." xml:space="preserve">
<source>This is a public key, you will not be able to make notes or interact in any way. This is used for viewing accounts from their perspective.</source>
<target state="new">This is a public key, you will not be able to make notes or interact in any way. This is used for viewing accounts from their perspective.</target>
@@ -6816,6 +7028,11 @@ Nice to meet you all! #introductions #plebchain </target>
<target state="new">This note contains too many items and cannot be rendered</target>
<note>Error message indicating that a note is too big and cannot be rendered</note>
</trans-unit>
<trans-unit id="This operation is restricted by your wallet." xml:space="preserve">
<source>This operation is restricted by your wallet.</source>
<target state="new">This operation is restricted by your wallet.</target>
<note>Error description for restricted operation</note>
</trans-unit>
<trans-unit id="This relay is already in your list." xml:space="preserve">
<source>This relay is already in your list.</source>
<target state="new">This relay is already in your list.</target>
@@ -6892,6 +7109,11 @@ Section header for text and appearance settings</note>
<target state="new">Try checking the link again, your internet connection, or contact the person who provided you the link for help.</target>
<note>Tips on what to do if a note cannot be found.</note>
</trans-unit>
<trans-unit id="Try restarting your wallet or contacting support if the problem persists." xml:space="preserve">
<source>Try restarting your wallet or contacting support if the problem persists.</source>
<target state="new">Try restarting your wallet or contacting support if the problem persists.</target>
<note>Tip for internal error</note>
</trans-unit>
<trans-unit id="Type %@ to delete" xml:space="preserve">
<source>Type %@ to delete</source>
<target state="new">Type %@ to delete</target>
@@ -7084,6 +7306,16 @@ This will reset your contact list, including the list of everyone you follow and
This will reset your contact list, including the list of everyone you follow and potentially the list of all relays you usually connect to. ONLY PROCEED IF YOU ARE SURE YOU HAVE LOST YOUR CONTACT LIST BEYOND RECOVERABILITY.</target>
<note>Alert for resetting the user's contact list.</note>
</trans-unit>
<trans-unit id="Wait a few moments, and then try again." xml:space="preserve">
<source>Wait a few moments, and then try again.</source>
<target state="new">Wait a few moments, and then try again.</target>
<note>Tip for rate limit error</note>
</trans-unit>
<trans-unit id="Wait for the quota to reset, or configure your wallet provider to allow a higher limit." xml:space="preserve">
<source>Wait for the quota to reset, or configure your wallet provider to allow a higher limit.</source>
<target state="new">Wait for the quota to reset, or configure your wallet provider to allow a higher limit.</target>
<note>Tip for quota exceeded</note>
</trans-unit>
<trans-unit id="Wallet" xml:space="preserve">
<source>Wallet</source>
<target state="new">Wallet</target>
@@ -7092,6 +7324,21 @@ Navigation title for attaching Nostr Wallet Connect lightning wallet.
Sidebar menu label for Wallet view.
Title for section in zap settings that controls the Lightning wallet selection.</note>
</trans-unit>
<trans-unit id="Wallet provider returned a response that we could not decrypt." xml:space="preserve">
<source>Wallet provider returned a response that we could not decrypt.</source>
<target state="new">Wallet provider returned a response that we could not decrypt.</target>
<note>Error description shown to the user when a response from the wallet provider contains data the app could not decrypt.</note>
</trans-unit>
<trans-unit id="Wallet provider returned a response that we do not understand." xml:space="preserve">
<source>Wallet provider returned a response that we do not understand.</source>
<target state="new">Wallet provider returned a response that we do not understand.</target>
<note>Error description shown to the user when a response from the wallet provider contains data the app does not understand</note>
</trans-unit>
<trans-unit id="Wallet provider returned an invalid response." xml:space="preserve">
<source>Wallet provider returned an invalid response.</source>
<target state="new">Wallet provider returned an invalid response.</target>
<note>Error description shown to the user when a response from the wallet provider is invalid</note>
</trans-unit>
<trans-unit id="We did not detect any issues that we can automatically fix for you. If you are having issues, please contact Damus support: [support@damus.io](mailto:support@damus.io)" xml:space="preserve">
<source>We did not detect any issues that we can automatically fix for you. If you are having issues, please contact Damus support: [support@damus.io](mailto:support@damus.io)</source>
<target state="new">We did not detect any issues that we can automatically fix for you. If you are having issues, please contact Damus support: [support@damus.io](mailto:support@damus.io)</target>
@@ -7183,6 +7430,11 @@ User confirm Yes</note>
<target state="new">Yes, Overwrite</target>
<note>Text of button that confirms to overwrite the existing mutelist.</note>
</trans-unit>
<trans-unit id="You are not authorized to perform this action with your wallet." xml:space="preserve">
<source>You are not authorized to perform this action with your wallet.</source>
<target state="new">You are not authorized to perform this action with your wallet.</target>
<note>Error description for unauthorized access</note>
</trans-unit>
<trans-unit id="You cannot share content because you are not logged in. Please close this view, log in to your account, and try again." xml:space="preserve">
<source>You cannot share content because you are not logged in. Please close this view, log in to your account, and try again.</source>
<target state="new">You cannot share content because you are not logged in. Please close this view, log in to your account, and try again.</target>
@@ -7248,6 +7500,11 @@ User confirm Yes</note>
<target state="new">Your Purple subscription has expired. Renew?</target>
<note>A notification message explaining to the user that their Damus Purple Subscription has expired, prompting them to renew.</note>
</trans-unit>
<trans-unit id="Your connected wallet raised an unknown error. Message: %s" xml:space="preserve">
<source>Your connected wallet raised an unknown error. Message: %s</source>
<target state="new">Your connected wallet raised an unknown error. Message: %s</target>
<note>Human readable error description for unknown error</note>
</trans-unit>
<trans-unit id="Your content is being broadcasted to the network. Please wait." xml:space="preserve">
<source>Your content is being broadcasted to the network. Please wait.</source>
<target state="new">Your content is being broadcasted to the network. Please wait.</target>
@@ -7273,6 +7530,21 @@ User confirm Yes</note>
<target state="new">Your report will be sent to the relays you are connected to</target>
<note>Footer text to inform user what will happen when the report is submitted.</note>
</trans-unit>
<trans-unit id="Your transaction quota has been exceeded." xml:space="preserve">
<source>Your transaction quota has been exceeded.</source>
<target state="new">Your transaction quota has been exceeded.</target>
<note>Error description for quota exceeded</note>
</trans-unit>
<trans-unit id="Your wallet does not have sufficient balance for this transaction." xml:space="preserve">
<source>Your wallet does not have sufficient balance for this transaction.</source>
<target state="new">Your wallet does not have sufficient balance for this transaction.</target>
<note>Error description for insufficient balance</note>
</trans-unit>
<trans-unit id="Your wallet is temporarily being rate limited." xml:space="preserve">
<source>Your wallet is temporarily being rate limited.</source>
<target state="new">Your wallet is temporarily being rate limited.</target>
<note>Error description for rate limit error</note>
</trans-unit>
<trans-unit id="Zap" xml:space="preserve">
<source>Zap</source>
<target state="new">Zap</target>

View File

@@ -177,6 +177,9 @@
"An additional percentage of each zap will be sent to support Damus development" : {
"comment" : "Text indicating that they can contribute zaps to support Damus development."
},
"An internal error occurred in your wallet." : {
"comment" : "Error description for an internal error"
},
"An unexpected error happened while trying to perform this action. Please contact support." : {
"comment" : "Error message for a failed reset/repair operation"
},
@@ -186,6 +189,9 @@
"An unknown error occurred while adding a relay." : {
"comment" : "Title of an unknown relay error message."
},
"An unspecified error occurred in your wallet." : {
"comment" : "Error description for an unspecified error"
},
"Animations" : {
"comment" : "Toggle to enable or disable image animation"
},
@@ -303,6 +309,9 @@
"Check the address and/or the relay list." : {
"comment" : "Human readable tip for error"
},
"Check your account permissions or contact support." : {
"comment" : "Tip for restricted operation"
},
"Check your internet connection and try again. If the error persists, contact support." : {
"comment" : "Error tip when user tries to create the one-click Coinos wallet setup but fails for a generic reason."
},
@@ -330,7 +339,7 @@
"Close" : {
"comment" : "Button label giving the user the option to close the sheet due to not being logged in.\nButton label giving the user the option to close the sheet from which they shared content\nButton label giving the user the option to close the sheet from which they were trying share.\nButton label giving the user the option to close the sheet from which they were trying to share.\nButton label giving the user the option to close the view when no content is available to share"
},
"Coinos is a service operated by a third-party. We have no access to your Coinos wallet." : {
"Coinos is a service operated by a third-party. The Damus team has no access to your wallet." : {
"comment" : "Small caption with a disclaimer that Damus does not own or have access to Coinos wallets, Coinos is a third-party service."
},
"Coming soon" : {
@@ -387,6 +396,9 @@
"Copied" : {
"comment" : "Label indicating that a user's key was copied."
},
"Copied!" : {
"comment" : "Label indicating that the error technical information was successfully copied to the clipboard, which shows up as soon as the user clicks the copy button."
},
"Copy" : {
"comment" : "Button to copy a relay server address.\nButton to copy the value found.\nContext menu option for copying the version of damus."
},
@@ -417,6 +429,9 @@
"Copy Report ID" : {
"comment" : "Button to copy report ID."
},
"Copy technical information" : {
"comment" : "Button label to allow user to copy technical information from an error screen (usually to provide our support team for further troubleshooting)"
},
"Copy text" : {
"comment" : "Context menu option for copying the text from an note."
},
@@ -501,6 +516,9 @@
"Developer Mode enables features and options that may help developers diagnose issues and improve this app. Most users will not need Developer Mode." : {
"comment" : "Section header for Developer Settings view"
},
"Disable high balance warning" : {
"comment" : "Setting to disable high balance warnings on the user's wallet"
},
"Discard changes?" : {
"comment" : "Alert user that changes have been made."
},
@@ -511,7 +529,7 @@
"comment" : "Text for button to disconnect from Nostr Wallet Connect lightning wallet."
},
"Dismiss" : {
"comment" : "Button to dismiss alert\nButton to dismiss error"
"comment" : "Button label to dismiss the safety reminder that the user's wallet has a high balance\nButton to dismiss alert\nButton to dismiss error"
},
"DMs" : {
"comment" : "Navigation title for DMs view, where DM is the English abbreviation for Direct Message.\nNavigation title for view of DMs, where DM is an English abbreviation for Direct Message.\nPicker option for DM selector for seeing only DMs that have been responded to. DM is the English abbreviation for Direct Message.\nSetting to enable DM Local Notification\nToolbar label for DMs view, where DM is the English abbreviation for Direct Message."
@@ -540,6 +558,9 @@
"Edit profile picture" : {
"comment" : "Accessibility label for a button that edits a profile picture"
},
"Empty error message" : {
"comment" : "A human readable placeholder to indicate that the error message is empty"
},
"Enable experimental Purple API support" : {
"comment" : "Developer mode setting to enable experimental Purple API support."
},
@@ -1099,6 +1120,9 @@
"Nudity" : {
"comment" : "Description of report type for nudity."
},
"NWC wallet" : {
"comment" : "Title for section in zap settings that controls general NWC wallet settings."
},
"Ok" : {
"comment" : "Button to dismiss the alert."
},
@@ -1171,6 +1195,9 @@
"Plan" : {
"comment" : "Prompt selection of DeepL subscription plan to perform machine translations on notes"
},
"Please check for updates or contact your wallet provider." : {
"comment" : "Tip for not implemented error"
},
"Please check the address and try again" : {
"comment" : "Tip for an error where the relay address being added is invalid"
},
@@ -1183,9 +1210,18 @@
"Please contact support." : {
"comment" : "Tip for an unknown relay error message."
},
"Please contact the developer of your wallet provider for help." : {
"comment" : "Human readable error description for an unknown error raised by a wallet provider."
},
"Please contact the person who provided the link, and ask for another link." : {
"comment" : "User-visible tip on what to do if a link contains a deprecated \"nrelay\" reference."
},
"Please copy the technical info and send it to our support team." : {
"comment" : "Tip on how to resolve issue when wallet returns an invalid response"
},
"Please deposit more funds and try again." : {
"comment" : "Tip for insufficient balance errors"
},
"Please double-check the checkout web page, or go to the Side Menu → \"Purple\" to check your account status. If you have already paid, but still don't see your account active, please save the URL of the checkout page where you came from, contact our support, and give us the URL to help you with this issue." : {
"comment" : "User-facing tips on what to do if a Purple welcome link doesn't work"
},
@@ -1198,12 +1234,18 @@
"Please try again later or contact support if the issue persists." : {
"comment" : "Human readable tip for error"
},
"Please try again or contact your wallet provider for further assistance." : {
"comment" : "Tip for unspecified error"
},
"Please try again, check the URL for typos, or contact support for further help." : {
"comment" : "User visible error tips"
},
"Please try opening this content on another Nostr app that supports this type of content." : {
"comment" : "User-visible advice on what to do if they see the error indicating a note has an unknown kind or is unsupported for viewing."
},
"Please verify your credentials or permissions." : {
"comment" : "Tip for unauthorized access"
},
"Point your camera to a QR code…" : {
"comment" : "Text on QR code camera view instructing user to point to QR code"
},
@@ -1701,6 +1743,9 @@
"This device's in-app purchase is registered to a different Nostr account. Unable to manage this Purple account. If you believe this was a mistake, please contact us via support@damus.io." : {
"comment" : "Notice label that user cannot manage their In-App purchases"
},
"This feature is not implemented by your wallet." : {
"comment" : "Error description for not implemented feature"
},
"This is a public key, you will not be able to make notes or interact in any way. This is used for viewing accounts from their perspective." : {
"comment" : "Warning that the inputted account key is a public key and the result of what happens because of it."
},
@@ -1713,6 +1758,9 @@
"This note contains too many items and cannot be rendered" : {
"comment" : "Error message indicating that a note is too big and cannot be rendered"
},
"This operation is restricted by your wallet." : {
"comment" : "Error description for restricted operation"
},
"This relay is already in your list." : {
"comment" : "Human readable tip for error"
},
@@ -1761,6 +1809,9 @@
"Try checking the link again, your internet connection, or contact the person who provided you the link for help." : {
"comment" : "Tips on what to do if a note cannot be found."
},
"Try restarting your wallet or contacting support if the problem persists." : {
"comment" : "Tip for internal error"
},
"Type %@ to delete" : {
"comment" : "Text field prompt asking user to type DELETE in all caps to confirm that they want to proceed with deleting their account."
},
@@ -1854,9 +1905,24 @@
"Visit the Damus website on a web browser to manage billing" : {
"comment" : "Instruction on how to manage billing externally"
},
"Wait a few moments, and then try again." : {
"comment" : "Tip for rate limit error"
},
"Wait for the quota to reset, or configure your wallet provider to allow a higher limit." : {
"comment" : "Tip for quota exceeded"
},
"Wallet" : {
"comment" : "Navigation title for Wallet view\nNavigation title for attaching Nostr Wallet Connect lightning wallet.\nSidebar menu label for Wallet view.\nTitle for section in zap settings that controls the Lightning wallet selection."
},
"Wallet provider returned a response that we could not decrypt." : {
"comment" : "Error description shown to the user when a response from the wallet provider contains data the app could not decrypt."
},
"Wallet provider returned a response that we do not understand." : {
"comment" : "Error description shown to the user when a response from the wallet provider contains data the app does not understand"
},
"Wallet provider returned an invalid response." : {
"comment" : "Error description shown to the user when a response from the wallet provider is invalid"
},
"WARNING:\n\nThis will attempt to repair your relay list based on other information we have. You may lose any relays you have added manually. Only proceed if you have lost your relay list beyond recoverability or if you are ok with losing any manually added relays." : {
"comment" : "Alert for repairing the user's relay list."
},
@@ -1926,6 +1992,9 @@
"you" : {
"comment" : "You, in this context, is the person who controls their own social network. You is used in the context of a larger sentence that welcomes the reader to the social network that they control themself."
},
"You are not authorized to perform this action with your wallet." : {
"comment" : "Error description for unauthorized access"
},
"You cannot share content because you are not logged in. Please close this view, log in to your account, and try again." : {
"comment" : "Label explaining that sharing cannot proceed because the user is not logged in."
},
@@ -1953,6 +2022,9 @@
"You unlocked" : {
"comment" : "Part 1 of 2 in message 'You unlocked automatic translations' the user gets when they sign up for Damus Purple"
},
"Your connected wallet raised an unknown error. Message: %s" : {
"comment" : "Human readable error description for unknown error"
},
"Your content is being broadcasted to the network. Please wait." : {
"comment" : "Label explaining that their content sharing action is in progress"
},
@@ -1980,6 +2052,15 @@
"Your report will be sent to the relays you are connected to" : {
"comment" : "Footer text to inform user what will happen when the report is submitted."
},
"Your transaction quota has been exceeded." : {
"comment" : "Error description for quota exceeded"
},
"Your wallet does not have sufficient balance for this transaction." : {
"comment" : "Error description for insufficient balance"
},
"Your wallet is temporarily being rate limited." : {
"comment" : "Error description for rate limit error"
},
"Zap" : {
"comment" : "Accessibility label for zap button\nButton label that allows the user to zap (i.e. send a Bitcoin tip via the lightning network) the user shown on-screen\nText underneath the number of sats indicating that it's the amount used for zaps.\nTitle of notification when a non-private zap is received."
},

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,72 @@
//
// Benchmarking.swift
// damusTests
//
// Created by William Casarin on 3/6/25.
//
import Testing
import XCTest
@testable import damus
class BenchmarkingTests: XCTestCase {
// Old regex-based implementations for comparison
func trim_suffix_regex(_ str: String) -> String {
return str.replacingOccurrences(of: "\\s+$", with: "", options: .regularExpression)
}
func trim_prefix_regex(_ str: String) -> String {
return str.replacingOccurrences(of: "^\\s+", with: "", options: .regularExpression)
}
// Test strings with different characteristics
lazy var testStrings: [String] = [
" Hello World ", // Simple whitespace
" \n\t Hello World \n\t ", // Mixed whitespace
String(repeating: " ", count: 1000) + "Hello", // Large prefix
"Hello" + String(repeating: " ", count: 1000), // Large suffix
String(repeating: " ", count: 500) + "Hello" + String(repeating: " ", count: 500) // Both
]
func testTrimSuffixRegexPerformance() throws {
measure {
for str in testStrings {
_ = trim_suffix_regex(str)
}
}
}
func testTrimSuffixNewPerformance() throws {
measure {
for str in testStrings {
_ = trim_suffix(str)
}
}
}
func testTrimPrefixRegexPerformance() throws {
measure {
for str in testStrings {
_ = trim_prefix_regex(str)
}
}
}
func testTrimPrefixNewPerformance() throws {
measure {
for str in testStrings {
_ = trim_prefix(str)
}
}
}
func testTrimFunctionCorrectness() throws {
// Verify that both implementations produce the same results
for str in testStrings {
XCTAssertEqual(trim_suffix(str), trim_suffix_regex(str), "New trim_suffix implementation produces different results")
XCTAssertEqual(trim_prefix(str), trim_prefix_regex(str), "New trim_prefix implementation produces different results")
}
}
}

View File

@@ -49,7 +49,8 @@ func generate_test_damus_state(
video: .init(),
ndb: ndb,
quote_reposts: .init(our_pubkey: our_pubkey),
emoji_provider: DefaultEmojiProvider(showAllVariations: false)
emoji_provider: DefaultEmojiProvider(showAllVariations: false),
favicon_cache: .init()
)
return damus

View File

@@ -0,0 +1,39 @@
//
// NIP05DomainTimelineHeaderViewTests.swift
// damusTests
//
// Created by Terry Yiu on 5/23/25.
//
import XCTest
@testable import damus
final class NIP05DomainTimelineHeaderViewTests: XCTestCase {
let enUsLocale = Locale(identifier: "en-US")
func testFriendsOfFriendsString() throws {
let pk1 = test_pubkey
let pk2 = test_pubkey_2
let pk3 = Pubkey(hex: "b42e44b555013239a0d5dcdb09ebde0857cd8a5a57efbba5a2b6ac78833cb9f0")!
let pk4 = Pubkey(hex: "cc590e46363d0fa66bb27081368d01f169b8ffc7c614629d4e9eef6c88b38670")!
let pk5 = Pubkey(hex: "f2aa579bb998627e04a8f553842a09446360c9d708c6141dd119c479f6ab9d29")!
let ndb = Ndb(path: Ndb.db_path)!
let damus_name = "17ldvg64:nq5mhr77"
XCTAssertEqual(friendsOfFriendsString([pk1], ndb: ndb, locale: enUsLocale), "Notes from \(damus_name)")
XCTAssertEqual(friendsOfFriendsString([pk1, pk2], ndb: ndb, locale: enUsLocale), "Notes from \(damus_name) & 1rppft3m:4qxhsgnj")
XCTAssertEqual(friendsOfFriendsString([pk1, pk2, pk3], ndb: ndb, locale: enUsLocale), "Notes from \(damus_name), 1rppft3m:4qxhsgnj & 1kshyfd2:cq04aze0")
XCTAssertEqual(friendsOfFriendsString([pk1, pk2, pk3, pk4,], ndb: ndb, locale: enUsLocale), "Notes from \(damus_name), 1rppft3m:4qxhsgnj, 1kshyfd2:cq04aze0 & 1 other in your trusted network")
XCTAssertEqual(friendsOfFriendsString([pk1, pk2, pk3, pk4, pk5], ndb: ndb, locale: enUsLocale), "Notes from \(damus_name), 1rppft3m:4qxhsgnj, 1kshyfd2:cq04aze0 & 2 others in your trusted network")
let pubkeys = [pk1, pk2, pk3, pk4, pk5, pk1, pk2, pk3, pk4, pk5]
Bundle.main.localizations.map { Locale(identifier: $0) }.forEach {
for count in 1...10 {
XCTAssertNoThrow(friendsOfFriendsString(pubkeys.prefix(count).map { $0 }, ndb: ndb, locale: $0))
}
}
}
}

View File

@@ -291,6 +291,45 @@ class NoteContentViewTests: XCTestCase {
XCTAssertEqual(noteArtifactsSeparated.images[0].absoluteString, "https://damus.io/nothidden.png")
}
func testRenderBlocksWithPreviewableBlocksAtEndAreHiddenWhenHashtagsAreEmbedded() throws {
let noteId = test_note.id.bech32
let invoiceString = "lnbc100n1p357sl0sp5t9n56wdztun39lgdqlr30xqwksg3k69q4q2rkr52aplujw0esn0qpp5mrqgljk62z20q4nvgr6lzcyn6fhylzccwdvu4k77apg3zmrkujjqdpzw35xjueqd9ejqcfqv3jhxcmjd9c8g6t0dcxqyjw5qcqpjrzjqt56h4gvp5yx36u2uzqa6qwcsk3e2duunfxppzj9vhypc3wfe2wswz607uqq3xqqqsqqqqqqqqqqqlqqyg9qyysgqagx5h20aeulj3gdwx3kxs8u9f4mcakdkwuakasamm9562ffyr9en8yg20lg0ygnr9zpwp68524kmda0t5xp2wytex35pu8hapyjajxqpsql29r"
let content = " Check this out. \nhttps://hidden.tld/\nhttps://damus.io/hidden1.png\n\(invoiceString)\nhttps://damus.io/hidden2.png\nnostr:\(noteId)#hashtag1 #hashtag2 "
let note = try XCTUnwrap(NostrEvent(content: content, keypair: test_keypair))
let parsed: Blocks = parse_note_content(content: .init(note: note, keypair: test_keypair))
let testState = test_damus_state
let noteArtifactsSeparated: NoteArtifactsSeparated = render_blocks(blocks: parsed, profiles: testState.profiles, can_hide_last_previewable_refs: true)
let attributedText: AttributedString = noteArtifactsSeparated.content.attributed
let runs: AttributedString.Runs = attributedText.runs
let runArray: [AttributedString.Runs.Run] = Array(runs)
XCTAssertEqual(runArray.count, 4)
XCTAssertTrue(runArray[0].description.contains("Check this out."))
XCTAssertFalse(runArray[0].description.contains("https://hidden.tld/"))
XCTAssertFalse(runArray[0].description.contains("https://damus.io/hidden1.png"))
XCTAssertFalse(runArray[0].description.contains("lnbc100n:qpsql29r"))
XCTAssertFalse(runArray[0].description.contains("https://damus.io/hidden2.png"))
XCTAssertFalse(runArray[0].description.contains("note1qqq:qqn2l0z3"))
XCTAssertTrue(runArray[1].description.contains("#hashtag1"))
XCTAssertTrue(runArray[3].description.contains("#hashtag2"))
XCTAssertEqual(noteArtifactsSeparated.images.count, 2)
XCTAssertEqual(noteArtifactsSeparated.images[0].absoluteString, "https://damus.io/hidden1.png")
XCTAssertEqual(noteArtifactsSeparated.images[1].absoluteString, "https://damus.io/hidden2.png")
XCTAssertEqual(noteArtifactsSeparated.media.count, 2)
XCTAssertEqual(noteArtifactsSeparated.media[0].url.absoluteString, "https://damus.io/hidden1.png")
XCTAssertEqual(noteArtifactsSeparated.media[1].url.absoluteString, "https://damus.io/hidden2.png")
XCTAssertEqual(noteArtifactsSeparated.links.count, 1)
XCTAssertEqual(noteArtifactsSeparated.links[0].absoluteString, "https://hidden.tld/")
XCTAssertEqual(noteArtifactsSeparated.invoices.count, 1)
XCTAssertEqual(noteArtifactsSeparated.invoices[0].string, invoiceString)
}
/// Based on https://github.com/damus-io/damus/issues/1468
/// Tests whether a note content view correctly parses an image block when url in JSON content contains optional escaped slashes
func testParseImageBlockInContentWithEscapedSlashes() throws {