Compare commits
1 Commits
tyiu/zaps-
...
tyiu/repos
| Author | SHA1 | Date | |
|---|---|---|---|
|
ae81575386
|
82
CHANGELOG.md
82
CHANGELOG.md
@@ -1,87 +1,10 @@
|
||||
## [1.0.0-13] - 2023-01-30
|
||||
|
||||
### Added
|
||||
|
||||
- LibreTranslate note translations (Terry Yiu)
|
||||
- Added support for account deletion (William Casarin)
|
||||
- User tagging and autocompletion in posts (Swift)
|
||||
|
||||
|
||||
### Changed
|
||||
|
||||
- Remove redundant logout button from settings (Jonathan Milligan)
|
||||
- Moved relay config to its own sidebar entry (William Casarin)
|
||||
- New stylized tabs (ericholguin)
|
||||
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix hidden profile action sheet when clicking ... (William Casarin)
|
||||
- Fixed height of DM input (Terry Yiu)
|
||||
- Fixed bug where copying pubkey from context menu only copied your own pubkey (Terry Yiu)
|
||||
|
||||
|
||||
|
||||
[1.0.0-13]: https://github.com/damus-io/damus/releases/tag/v1.0.0-13
|
||||
## [1.0.0-12] - 2023-01-28
|
||||
|
||||
### Added
|
||||
|
||||
- Added Arabic and Portuguese translations (Barodane, Antonio Chagas)
|
||||
- Add QRCode view for sharing your pubkey (ericholguin)
|
||||
- Added nostr: uri handling (William Casarin)
|
||||
|
||||
### Changed
|
||||
|
||||
- Remove markdown link support from posts (Joel Klabo)
|
||||
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed crash on some SVG profile pictures (OlegAba)
|
||||
- Localization fixes
|
||||
- Don't allow blocking yourself (Terry)
|
||||
- Hide muted users from global (William Casarin)
|
||||
- Fixed profiles sometimes not loading from other clients (William Casarin)
|
||||
- Fixed bug where `spam` was always the report type (William Casarin)
|
||||
|
||||
|
||||
|
||||
[1.0.0-12]: https://github.com/damus-io/damus/releases/tag/v1.0.0-12
|
||||
|
||||
## [1.0.0-11] - 2023-01-25
|
||||
|
||||
### Added
|
||||
|
||||
- Reposts view (Terry Yiu)
|
||||
- Translations for it_IT, it_CH, fr_FR, de_DE, de_AT and lv_LV (Nicolò Carcagnì, Solobalbo, Gregor, Peter Gerstbach, SYX)
|
||||
- Added ability to block users (William Casarin)
|
||||
- Added a way to report content (William Casarin)
|
||||
- Stretchable profile cover header (Swift)
|
||||
|
||||
|
||||
### Changed
|
||||
|
||||
- Bump pfp/banner animated fize size limit to 5MiB/20MiB (William Casarin)
|
||||
- Updated default boostrap relays (Ricardo Arturo Cabral Mejía)
|
||||
|
||||
|
||||
### Fixed
|
||||
|
||||
- allow ws:// relays again (Steven Briscoe)
|
||||
|
||||
|
||||
|
||||
[1.0.0-11]: https://github.com/damus-io/damus/releases/tag/v1.0.0-11
|
||||
|
||||
|
||||
## [1.0.0-8] - 2023-01-22
|
||||
|
||||
### Added
|
||||
|
||||
- Show website on profiles (William Casarin)
|
||||
- Add the ability to choose participants when replying (Joel Klabo)
|
||||
- Translations for de_AT, de_DE, tr_TR, fr_FR (Gregor, Peter Gerstbach, Taylan Benli, Solobalbo)
|
||||
- Translations for de_AT, de_DE, tr_TR, fr_FR (William Casarin)
|
||||
- Add DM Message Requests (William Casarin)
|
||||
|
||||
|
||||
@@ -101,7 +24,7 @@
|
||||
|
||||
- Drastically improved image viewer (OlegAba)
|
||||
- Added pinch to zoom on images (Swift)
|
||||
- Add Latin American Spanish translations (Nicolás Valencia)
|
||||
- Add Latin American Spanish translations (William Casarin)
|
||||
- Added SVG profile picture support (OlegAba)
|
||||
|
||||
|
||||
@@ -515,4 +438,3 @@
|
||||
[0.1.2]: https://github.com/damus-io/damus/releases/tag/v0.1.2
|
||||
|
||||
|
||||
|
||||
|
||||
43
README.md
43
README.md
@@ -1,4 +1,3 @@
|
||||
[](https://github.com/damus-io/damus/actions/workflows/run-tests.yaml)
|
||||
|
||||
# damus
|
||||
|
||||
@@ -26,7 +25,7 @@ damus implements the following [Nostr Implementation Possibilities][nips]
|
||||
## Getting Started on Damus
|
||||
|
||||
### Damus iOS
|
||||
1) Get the Damus app on the iOS App Store: https://apps.apple.com/ca/app/damus/id1628663131
|
||||
1) Get the Damus app on TestFlight: https://testflight.apple.com/join/CLwjLxWl
|
||||
|
||||
#### ⚙️ Settings (gear icon, top right)
|
||||
- Relays: You can add more relays to send your notes to by tapping the "+".
|
||||
@@ -49,7 +48,7 @@ damus implements the following [Nostr Implementation Possibilities][nips]
|
||||
4. Add @ direcly followed by the pubkey (e.g., `@npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s`)
|
||||
- You can also long-press a Note to grab their User ID aka pubkey or Note ID to link directly to a Note.
|
||||
- Currently you can't delete your Notes in the iOS app
|
||||
- Share images by pasting the image url which you can grab from imgbb, imgur, etc. (i.e., `https://i.ibb.co/2SHZbwm/alpha60.jpg`). Currently images only load for people you follow in the 🏠 Personal Feed. Images are not automatically loaded in 🔍 Global Feed
|
||||
- Share images by pasting the image url which you can grab from imgbb, imgur, etc. (i.e., `(https://i.ibb.co/2SHZbwm/alpha60.jpg)`). Currently images only load for people you follow in the 🏠 Personal Feed. Images are not automatically loaded in 🔍 Global Feed
|
||||
- Engaging with Notes
|
||||
- 💬 Replying to a Note: Tap the chat icon underneath the note. This will show up in the users’ notifications and in your 🏠 Personal and 🔍 Global Feeds
|
||||
- ♺ Reposts: Tap the repost icon which will show up in your 🏠 Personal and 🔍 Global Feeds
|
||||
@@ -92,41 +91,15 @@ damus implements the following [Nostr Implementation Possibilities][nips]
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributors welcome!
|
||||
|
||||
### Code
|
||||
|
||||
[Email patches][git-send-email] to jb55@jb55.com are preferred, but I accept PRs on GitHub as well.
|
||||
Contributors welcome! [Email patches][git-send-email] to jb55@jb55.com are preferred, but I accept PRs on github as well.
|
||||
|
||||
[git-send-email]: http://git-send-email.io
|
||||
|
||||
### Translations
|
||||
## git log bot
|
||||
|
||||
Translators welcome! Join the [Transifex][transifex] project.
|
||||
npub1fjtdwclt9lspjy8huu3qklr7eklp5uq90u6yh8mec290pqxraccqlufnas
|
||||
|
||||
All user-facing strings must have a comment in order to provide context to translators. If a SwiftUI component has a `comment` parameter, use that. Otherwise, wrap your string with `NSLocalizedString` with the `comment` field populated.
|
||||
|
||||
[transifex]: https://explore.transifex.com/damus/damus-ios/
|
||||
|
||||
#### Export Source Translations
|
||||
|
||||
If user-facing strings have been added or changed, please export them for translation as part of your pull request or commit by running:
|
||||
|
||||
```zsh
|
||||
./devtools/export-source-translation.sh
|
||||
```
|
||||
|
||||
This command will export source translations to `translations/en-US.xcloc/Localized Contents/en-US.xliff`, which the Transifex integration will read from the `master` branch and allow translators to translate those strings.
|
||||
|
||||
#### Import Translations
|
||||
|
||||
Once 100% of strings have been translated for a given locale, Transifex will open up a pull request with the `translations/<locale>.xliff` file changed. Currently, it must be manually imported into the project before merging the pull request by running:
|
||||
|
||||
```zsh
|
||||
./devtools/import-translation.sh <locale_code_in_snake_case>
|
||||
```
|
||||
|
||||
### Awards
|
||||
### Awards
|
||||
|
||||
There may be nostr badges awarded for contributors in the future... :)
|
||||
|
||||
@@ -134,7 +107,3 @@ First contributors:
|
||||
|
||||
1. @randymcmillan
|
||||
2. @jcarucci27
|
||||
|
||||
### git log bot
|
||||
|
||||
npub1fjtdwclt9lspjy8huu3qklr7eklp5uq90u6yh8mec290pqxraccqlufnas
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" ?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 http://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd">
|
||||
<file original="damus/en-US.lproj/InfoPlist.strings" source-language="en-US" target-language="de" datatype="plaintext">
|
||||
<file original="damus/en-US.lproj/InfoPlist.strings" source-language="en-US" target-language="de-DE" datatype="plaintext">
|
||||
<header>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="14.2" build-num="14C18"/>
|
||||
</header>
|
||||
@@ -18,13 +18,13 @@
|
||||
</trans-unit>
|
||||
<trans-unit id="NSPhotoLibraryAddUsageDescription" xml:space="preserve">
|
||||
<source>Granting Damus access to your photos allows you to save images.</source>
|
||||
<target>Zum Speichern von Bildern braucht Damus Zugriff auf deine Fotos.</target>
|
||||
<target>Damus Zugriff auf deine Fotos zu gewähren erlaubt dir Bilder zu sichern.</target>
|
||||
|
||||
<note>Privacy - Photo Library Additions Usage Description</note>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
<file original="damus/en-US.lproj/Localizable.strings" source-language="en-US" target-language="de" datatype="plaintext">
|
||||
<file original="damus/en-US.lproj/Localizable.strings" source-language="en-US" target-language="de-DE" datatype="plaintext">
|
||||
<header>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="14.2" build-num="14C18"/>
|
||||
</header>
|
||||
@@ -38,30 +38,25 @@
|
||||
<source>%@</source>
|
||||
<target>%@</target>
|
||||
|
||||
<note>Abbreviated version of a nostr public key.</note>
|
||||
<note>Amount of time that has passed since reply quote event occurred.
|
||||
Abbreviated version of a nostr public key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%@ %@" xml:space="preserve">
|
||||
<source>%@ %@</source>
|
||||
<target>%@ %@</target>
|
||||
|
||||
<note>Sentence composed of 2 variables to describe how many zap payments there are on a post. In source English, the first variable is the number of zap payments, and the second variable is 'Zap' or 'Zaps'.
|
||||
<note>Sentence composed of 2 variables to describe how many reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'.
|
||||
Sentence composed of 2 variables to describe how many profiles a user is following. In source English, the first variable is the number of profiles being followed, and the second variable is 'Following'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%@ has been blocked" xml:space="preserve">
|
||||
<source>%@ has been blocked</source>
|
||||
<target>%@ wurde blockiert</target>
|
||||
|
||||
<note>Alert message that informs a user was blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction." xml:space="preserve">
|
||||
<source>%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.</source>
|
||||
<target>%@. Du brauchst für ein Konto keine Telefonnummer, E-Mail-Adresse oder Namen. Fang ganz reibungslos einfach an.</target>
|
||||
<target>Für das Erstellen eines Accounts ist keine Telefonnumer, E-Mail-Adresse und kein Name notwendig. Lege direkt los!</target>
|
||||
|
||||
<note>Explanation of what is done to keep personally identifiable information private. There is a heading that precedes this explanation which is a variable to this string.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%@. End-to-End encrypted private messaging. Keep Big Tech out of your DMs" xml:space="preserve">
|
||||
<source>%@. End-to-End encrypted private messaging. Keep Big Tech out of your DMs</source>
|
||||
<target>%@. Ende-zu-Ende-verschlüsselter, privater Nachrichtenaustausch. Halte Big Tech aus deinen PNs heraus.</target>
|
||||
<target>%@. Ende-zu-Ende verschlüsselte private Nachrichten. Halte „Big Tech“ aus deinen Direktnachrichten heraus.</target>
|
||||
|
||||
<note>Explanation of what is done to keep private data encrypted. There is a heading that precedes this explanation which is a variable to this string.</note>
|
||||
</trans-unit>
|
||||
@@ -75,7 +70,7 @@ Sentence composed of 2 variables to describe how many profiles a user is followi
|
||||
<source>%lld</source>
|
||||
<target>%lld</target>
|
||||
|
||||
<note>Number of zap payments on a post.
|
||||
<note>Number of reposts.
|
||||
Number of profiles a user is following.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%lld/%lld" xml:space="preserve">
|
||||
@@ -90,15 +85,15 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Description of how the nip05 identifier would be used for verification.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="'%@' is an invalid NIP-05 identifier. It should look like an email." xml:space="preserve">
|
||||
<source>'%@' is an invalid NIP-05 identifier. It should look like an email.</source>
|
||||
<target>%@' ist kein gülter NIP-05 identifier. Dieser sollte wie eine email aussehen. </target>
|
||||
<trans-unit id="'%@' is an invalid nip05 identifier. It should look like an email." xml:space="preserve">
|
||||
<source>'%@' is an invalid nip05 identifier. It should look like an email.</source>
|
||||
<target>'%@' ist eine ungültige nip05 Kennzeichnung. Diese sollte wie eine Emailadresse aussehen. </target>
|
||||
|
||||
<note>Description of why the nip05 identifier is invalid.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="(Profile.displayName(profile: profile, pubkey: whos))'s Followers" xml:space="preserve">
|
||||
<source>(Profile.displayName(profile: profile, pubkey: whos))'s Followers</source>
|
||||
<target>(Profile.displayName(profile: profile, pubkey: whos)) Gefolgte</target>
|
||||
<target>(Profile.displayName(profile: profile, pubkey: whos)) Follower</target>
|
||||
|
||||
<note>Navigation bar title for view that shows who is following a user.</note>
|
||||
</trans-unit>
|
||||
@@ -120,12 +115,6 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Prefix character to username.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="API Key (optional)" xml:space="preserve">
|
||||
<source>API Key (optional)</source>
|
||||
<target>API Schlüssel (optional)</target>
|
||||
|
||||
<note>Example URL to LibreTranslate server</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="About" xml:space="preserve">
|
||||
<source>About</source>
|
||||
<target>Über</target>
|
||||
@@ -144,24 +133,12 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Placeholder text for About Me description.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Accept" xml:space="preserve">
|
||||
<source>Accept</source>
|
||||
<target>Zustimmen</target>
|
||||
|
||||
<note>Button to accept the end user license agreement before being allowed into the app.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Account ID" xml:space="preserve">
|
||||
<source>Account ID</source>
|
||||
<target>Konto-ID</target>
|
||||
|
||||
<note>Label to indicate the public ID of the account.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Actions" xml:space="preserve">
|
||||
<source>Actions</source>
|
||||
<target>Aktionen</target>
|
||||
|
||||
<note>Title for confirmation dialog to either share, report, or block a profile.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Add" xml:space="preserve">
|
||||
<source>Add</source>
|
||||
<target>Hinzufügen</target>
|
||||
@@ -175,33 +152,27 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Label for section for adding a relay server.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Add all" xml:space="preserve">
|
||||
<source>Add all</source>
|
||||
<target>Alle hinzufügen</target>
|
||||
|
||||
<note>Button label to re-add all original participants as profiles to reply to in a note</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Any" xml:space="preserve">
|
||||
<source>Any</source>
|
||||
<target>Beliebig</target>
|
||||
<target>beliebig</target>
|
||||
|
||||
<note>Any amount of sats</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Are you sure you want to repost this?" xml:space="preserve">
|
||||
<source>Are you sure you want to repost this?</source>
|
||||
<target>Bist du sicher, dass Du den Beitrag teilen möchtest?</target>
|
||||
<target>Bist du sicher dass Du den Beitrag auf deinem Profil teilen möchtest?</target>
|
||||
|
||||
<note>Alert message to ask if user wants to repost a post.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Banner Image" xml:space="preserve">
|
||||
<source>Banner Image</source>
|
||||
<target>Bannerbild</target>
|
||||
<target>Banner Bild</target>
|
||||
|
||||
<note>Label for Banner Image section of user profile form.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Before we get started, you'll need to save your account info, otherwise you won't be able to login in the future if you ever uninstall Damus." xml:space="preserve">
|
||||
<source>Before we get started, you'll need to save your account info, otherwise you won't be able to login in the future if you ever uninstall Damus.</source>
|
||||
<target>Bevor wir anfangen, musst du deine Kontodaten sichern, sonst kannst du dich in Zukunft nicht mehr anmelden, wenn du Damus einmal deinstallierst.</target>
|
||||
<target>Bevor wir anfangen, musst du deine Kontodaten sichern, sonst kannst du dich in Zukunft nicht mehr anmelden, wenn du Damus jemals deinstallierst.</target>
|
||||
|
||||
<note>Reminder to user that they should save their account information.</note>
|
||||
</trans-unit>
|
||||
@@ -223,38 +194,6 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Dropdown option label for Lightning wallet, Blixt Wallet</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Block" xml:space="preserve">
|
||||
<source>Block</source>
|
||||
<target>Blockieren</target>
|
||||
|
||||
<note>Alert button to block a user.
|
||||
Button to block a profile.
|
||||
Context menu option for blocking users.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Block %@?" xml:space="preserve">
|
||||
<source>Block %@?</source>
|
||||
<target>%@ blockieren?</target>
|
||||
|
||||
<note>Alert message prompt to ask if a user should be blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Block User" xml:space="preserve">
|
||||
<source>Block User</source>
|
||||
<target>Benutzer blockieren</target>
|
||||
|
||||
<note>Title of alert for blocking a user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Blocked" xml:space="preserve">
|
||||
<source>Blocked</source>
|
||||
<target>Blockiert</target>
|
||||
|
||||
<note>Sidebar menu label for Profile view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Blocked Users" xml:space="preserve">
|
||||
<source>Blocked Users</source>
|
||||
<target>Blockierte Benutzer</target>
|
||||
|
||||
<note>Navigation title of view to see list of blocked users.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Blue Wallet" xml:space="preserve">
|
||||
<source>Blue Wallet</source>
|
||||
<target>Blue Wallet</target>
|
||||
@@ -277,12 +216,9 @@ Number of profiles a user is following.</note>
|
||||
<source>Cancel</source>
|
||||
<target>Abbrechen</target>
|
||||
|
||||
<note>Alert button to cancel out of alert for blocking a user.
|
||||
Button to cancel out of alert that creates a new mutelist.
|
||||
Button to cancel out of posting a note.
|
||||
<note>Button to cancel out of posting a note.
|
||||
Button to cancel out of reposting a post.
|
||||
Button to cancel out of view adding user inputted relay.
|
||||
Cancel deleting the user.
|
||||
Cancel out of logging out the user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Cash App" xml:space="preserve">
|
||||
@@ -293,7 +229,7 @@ Number of profiles a user is following.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Chat" xml:space="preserve">
|
||||
<source>Chat</source>
|
||||
<target>Unterhaltungen</target>
|
||||
<target>Unterhaltung</target>
|
||||
|
||||
<note>Navigation bar title for Chatroom view.</note>
|
||||
</trans-unit>
|
||||
@@ -358,36 +294,24 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Context menu option for copying the JSON text from the note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Copy Report ID" xml:space="preserve">
|
||||
<source>Copy Report ID</source>
|
||||
<target>Meldungs-ID kopieren</target>
|
||||
|
||||
<note>Button to copy report ID.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Copy Text" xml:space="preserve">
|
||||
<source>Copy Text</source>
|
||||
<target>Text kopieren</target>
|
||||
|
||||
<note>Context menu option for copying the text from an note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Copy User Pubkey" xml:space="preserve">
|
||||
<source>Copy User Pubkey</source>
|
||||
<target>Öffentlichen Schlüssel des Benutzers kopieren</target>
|
||||
<trans-unit id="Copy User ID" xml:space="preserve">
|
||||
<source>Copy User ID</source>
|
||||
<target>Benutzer-ID kopieren</target>
|
||||
|
||||
<note>Context menu option for copying the ID of the user who created the note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Copy invoice" xml:space="preserve">
|
||||
<source>Copy invoice</source>
|
||||
<target>Zahlungsdaten kopieren</target>
|
||||
<target>Rechnung kopieren</target>
|
||||
|
||||
<note>Title of section for copying a Lightning invoice identifier.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Could not find user to block..." xml:space="preserve">
|
||||
<source>Could not find user to block...</source>
|
||||
<target>Der zu blockierende Benutzer konnte nicht gefunden werden...</target>
|
||||
|
||||
<note>Alert message to indicate that the blocked user could not be found.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Create" xml:space="preserve">
|
||||
<source>Create</source>
|
||||
<target>Erstellen</target>
|
||||
@@ -400,30 +324,29 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Button to create an account.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Create new mutelist" xml:space="preserve">
|
||||
<source>Create new mutelist</source>
|
||||
<target>Neue Stummschaltungsliste</target>
|
||||
|
||||
<note>Title of alert prompting the user to create a new mutelist.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Creator(s) of Bitcoin. Absolute legend." xml:space="preserve">
|
||||
<source>Creator(s) of Bitcoin. Absolute legend.</source>
|
||||
<target>Erfinder von Bitcoin. Absolute Legende(n).</target>
|
||||
|
||||
<note>Example description about Bitcoin creator(s), Satoshi Nakamoto.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Custom" xml:space="preserve">
|
||||
<source>Custom</source>
|
||||
<target>Anpassen</target>
|
||||
<trans-unit id="DM" xml:space="preserve">
|
||||
<source>DM</source>
|
||||
<target>PN</target>
|
||||
|
||||
<note>Dropdown option for selecting a custom translation server.</note>
|
||||
<note>Navigation title for DM view, which is the English abbreviation for Direct Message.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="DM Type" xml:space="preserve">
|
||||
<source>DM Type</source>
|
||||
<target>PN Art</target>
|
||||
|
||||
<note>DM selector for seeing either DMs or message requests, which are messages that have not been responded to yet.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="DMs" xml:space="preserve">
|
||||
<source>DMs</source>
|
||||
<target>PNs</target>
|
||||
|
||||
<note>Navigation title for DMs view, where DM is the English abbreviation for Direct Message.
|
||||
Navigation title for view of DMs, where DM is an English abbreviation for Direct Message.</note>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Damus" xml:space="preserve">
|
||||
<source>Damus</source>
|
||||
@@ -441,21 +364,7 @@ Number of profiles a user is following.</note>
|
||||
<source>Delete</source>
|
||||
<target>Löschen</target>
|
||||
|
||||
<note>Button for deleting the users account.
|
||||
Button to delete a relay server that the user connects to.
|
||||
Button to remove a user from their blocklist.
|
||||
Section title for deleting the user</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Delete Account" xml:space="preserve">
|
||||
<source>Delete Account</source>
|
||||
|
||||
<note>Alert for deleting the users account.
|
||||
Button to delete the user's account.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Deleted Account" xml:space="preserve">
|
||||
<source>Deleted Account</source>
|
||||
|
||||
<note>Alert message to indicate this is a deleted account</note>
|
||||
<note>Button to delete a relay server that the user connects to.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Dismiss" xml:space="preserve">
|
||||
<source>Dismiss</source>
|
||||
@@ -475,12 +384,6 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Button to dismiss wallet selection view for paying Lightning invoice.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="EULA" xml:space="preserve">
|
||||
<source>EULA</source>
|
||||
<target>Endbenutzer-Lizenzvereinbarung</target>
|
||||
|
||||
<note>Label indicating that the below text is the EULA, an acronym for End User License Agreement.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Earn Money" xml:space="preserve">
|
||||
<source>Earn Money</source>
|
||||
<target>Verdiene Geld</target>
|
||||
@@ -493,18 +396,18 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Button to edit user's profile.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Edit participants" xml:space="preserve">
|
||||
<source>Edit participants</source>
|
||||
<target>Teilnehmer editieren</target>
|
||||
|
||||
<note>Text indicating that the view is used for editing which participants are replied to in a note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Encrypted" xml:space="preserve">
|
||||
<source>Encrypted</source>
|
||||
<target>Verschlüsselt</target>
|
||||
|
||||
<note>Heading indicating that this application keeps private messaging end-to-end encrypted.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Encrypted DMs" xml:space="preserve">
|
||||
<source>Encrypted DMs</source>
|
||||
<target>Verschlüsselte PNs</target>
|
||||
|
||||
<note>Navigation title for view of encrypted DMs, where DM is an English abbreviation for Direct Message.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Enter your account key to login:" xml:space="preserve">
|
||||
<source>Enter your account key to login:</source>
|
||||
<target>Gib deinen Kontoschlüssel ein um dich anzumelden:</target>
|
||||
@@ -517,6 +420,12 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Error message indicating why saving keys failed.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Filter State" xml:space="preserve">
|
||||
<source>Filter State</source>
|
||||
<target>Filter Einstellung</target>
|
||||
|
||||
<note>Filter state for seeing either only posts, or posts & replies.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Follow" xml:space="preserve">
|
||||
<source>Follow</source>
|
||||
<target>Folgen</target>
|
||||
@@ -531,7 +440,7 @@ Number of profiles a user is following.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Following" xml:space="preserve">
|
||||
<source>Following</source>
|
||||
<target>Gefolgt</target>
|
||||
<target>Folgt</target>
|
||||
|
||||
<note>Text to indicate that the button next to it is in a state that indicates that it is in the process of following a profile.
|
||||
Part of a larger sentence to describe how many profiles a user is following.</note>
|
||||
@@ -550,7 +459,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="Global" xml:space="preserve">
|
||||
<source>Global</source>
|
||||
<target>Allgemein</target>
|
||||
<target>Weltweit</target>
|
||||
|
||||
<note>Navigation bar title for Global view where posts from all connected relay servers appear.</note>
|
||||
</trans-unit>
|
||||
@@ -566,42 +475,18 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Navigation link to go to profile.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Hide" xml:space="preserve">
|
||||
<source>Hide</source>
|
||||
<target>Verstecken</target>
|
||||
|
||||
<note>Button to hide a post from a user who has been blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Hide API Key" xml:space="preserve">
|
||||
<source>Hide API Key</source>
|
||||
<target>API Schlüssel verstecken</target>
|
||||
|
||||
<note>Button to hide the LibreTranslate server API key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Home" xml:space="preserve">
|
||||
<source>Home</source>
|
||||
<target>Heim</target>
|
||||
|
||||
<note>Navigation bar title for Home view where posts and replies appear from those who the user is following.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Illegal content" xml:space="preserve">
|
||||
<source>Illegal content</source>
|
||||
<target>Illegaler Inhalt</target>
|
||||
|
||||
<note>Button for user to report that the account or content has illegal content.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Invalid key" xml:space="preserve">
|
||||
<source>Invalid key</source>
|
||||
<target>Ungültiger Schlüssel</target>
|
||||
|
||||
<note>Error message indicating that an invalid account key was entered for login.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="It's spam" xml:space="preserve">
|
||||
<source>It's spam</source>
|
||||
<target>Das ist Spam</target>
|
||||
|
||||
<note>Button for user to report that the account or content has spam.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="LNLink" xml:space="preserve">
|
||||
<source>LNLink</source>
|
||||
<target>LNLink</target>
|
||||
@@ -616,16 +501,10 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="Let's go!" xml:space="preserve">
|
||||
<source>Let's go!</source>
|
||||
<target>Los geht’s!</target>
|
||||
<target>Los gehts!</target>
|
||||
|
||||
<note>Button to complete account creation and start using the app.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="LibreTranslate Translations" xml:space="preserve">
|
||||
<source>LibreTranslate Translations</source>
|
||||
<target>LibreTranslate Übersetzungen</target>
|
||||
|
||||
<note>Section title for selecting the server that hosts the LibreTranslate machine translation API.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Lightning Address or LNURL" xml:space="preserve">
|
||||
<source>Lightning Address or LNURL</source>
|
||||
<target>Lightning-Adresse oder LNURL</target>
|
||||
@@ -653,15 +532,15 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="Logout" xml:space="preserve">
|
||||
<source>Logout</source>
|
||||
<target>Ausloggen</target>
|
||||
<target>Abmelden</target>
|
||||
|
||||
<note>Alert for logging out the user.
|
||||
Button for logging out the user.
|
||||
Button to close the alert that informs that the current account has been deleted.</note>
|
||||
Button to logout the user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Make sure your nsec account key is saved before you logout or you will lose access to this account" xml:space="preserve">
|
||||
<source>Make sure your nsec account key is saved before you logout or you will lose access to this account</source>
|
||||
<target>Sorge dafür dass dein nsec Kontoschlüssel vor dem Abmelden gesichert ist, oder du wirst den Zugang zu diesem Konto verlieren</target>
|
||||
<target>Stelle sicher dass dein nsec Kontoschlüssel gesichert ist bevor du dich abmeldest oder du wirst den Zugang zu diesem Konto verlieren</target>
|
||||
|
||||
<note>Reminder message in alert to get customer to verify that their private security account key is saved saved before logging out.</note>
|
||||
</trans-unit>
|
||||
@@ -677,31 +556,9 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Label for NIP-05 Verification section of user profile form.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="No" xml:space="preserve">
|
||||
<source>No</source>
|
||||
|
||||
<note>Button to cancel out of posting a note after being alerted that it looks like they might be posting a private key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="No block list found, create a new one? This will overwrite any previous block lists." xml:space="preserve">
|
||||
<source>No block list found, create a new one? This will overwrite any previous block lists.</source>
|
||||
<target>Es wurde keine Blockier-Liste gefunden, soll eine neue erzeugt werden? Dies überschreibt eventuelle frühere Blockier-Listen.</target>
|
||||
|
||||
<note>Alert message prompt that asks if the user wants to create a new block list, overwriting previous block lists.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="None" xml:space="preserve">
|
||||
<source>None</source>
|
||||
<target>Kein</target>
|
||||
|
||||
<note>Dropdown option for selecting no translation server.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Note contains "nsec1" private key. Are you sure?" xml:space="preserve">
|
||||
<source>Note contains "nsec1" private key. Are you sure?</source>
|
||||
|
||||
<note>Alert user that they might be attempting to paste a private key and ask them to confirm.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Nothing to see here. Check back later!" xml:space="preserve">
|
||||
<source>Nothing to see here. Check back later!</source>
|
||||
<target>Hier gibt es nichts zu sehen. Schau später wieder vorbei!</target>
|
||||
<target>Hier gibts nichts zu sehen. Schau später wieder vorbei!</target>
|
||||
|
||||
<note>Indicates that there are no notes in the timeline to view.</note>
|
||||
</trans-unit>
|
||||
@@ -711,12 +568,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Navigation title for notifications.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Nudity or explicit content" xml:space="preserve">
|
||||
<source>Nudity or explicit content</source>
|
||||
<target>Nacktheit oder anstößige Inhalte</target>
|
||||
|
||||
<note>Button for user to report that the account or content has nudity or explicit content.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Pay" xml:space="preserve">
|
||||
<source>Pay</source>
|
||||
<target>Bezahlen</target>
|
||||
@@ -741,12 +592,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Button to post a note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Post from a user you've blocked" xml:space="preserve">
|
||||
<source>Post from a user you've blocked</source>
|
||||
<target>Nachricht von einem/e User/in den/die Du geblockt hast.</target>
|
||||
|
||||
<note>Text to indicate that what is being shown is a post from a user who has been blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Posts" xml:space="preserve">
|
||||
<source>Posts</source>
|
||||
<target>Beiträge</target>
|
||||
@@ -819,12 +664,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Section title for recommend relay servers that could be added as part of configuration</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reject" xml:space="preserve">
|
||||
<source>Reject</source>
|
||||
<target>Ablehnen</target>
|
||||
|
||||
<note>Button to reject the end user license agreement, which disallows the user from being let into the app.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Relay" xml:space="preserve">
|
||||
<source>Relay</source>
|
||||
<target>Relay</target>
|
||||
@@ -835,20 +674,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<source>Relays</source>
|
||||
<target>Relays</target>
|
||||
|
||||
<note>Sidebar menu label for Relay servers view
|
||||
Sidebar menu label for Relays view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Relays have been notified and clients will be able to use this information to filter content. Thank you!" xml:space="preserve">
|
||||
<source>Relays have been notified and clients will be able to use this information to filter content. Thank you!</source>
|
||||
<target>Relays wurden benachrichtigt und Anwendungen können diese Information nutzen, um Inhalte zu filtern. Vielen Dank!</target>
|
||||
|
||||
<note>Description of what was done as a result of sending a report to relay servers.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Remove all" xml:space="preserve">
|
||||
<source>Remove all</source>
|
||||
<target>Alle entfernen</target>
|
||||
|
||||
<note>Button label to remove all participants from a note reply.</note>
|
||||
<note>Sidebar menu label for Relay servers view</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reply to self" xml:space="preserve">
|
||||
<source>Reply to self</source>
|
||||
@@ -868,25 +694,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Indicating that the user is replying to the following listed people.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Report" xml:space="preserve">
|
||||
<source>Report</source>
|
||||
<target>Melden</target>
|
||||
|
||||
<note>Button to report a profile.
|
||||
Context menu option for reporting content.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Report ID:" xml:space="preserve">
|
||||
<source>Report ID:</source>
|
||||
<target>Meldungs-ID</target>
|
||||
|
||||
<note>Label indicating that the text underneath is the identifier of the report that was sent to relay servers.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Report sent!" xml:space="preserve">
|
||||
<source>Report sent!</source>
|
||||
<target>Meldung versandt!</target>
|
||||
|
||||
<note>Message indicating that a report was successfully sent to relay servers.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Repost" xml:space="preserve">
|
||||
<source>Repost</source>
|
||||
<target>Teilen</target>
|
||||
@@ -900,21 +707,21 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Text indicating that the post was reposted (i.e. re-shared).</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reposts" xml:space="preserve">
|
||||
<source>Reposts</source>
|
||||
<target>Geteilte Beiträge</target>
|
||||
|
||||
<note>Navigation bar title for Reposts view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Requests" xml:space="preserve">
|
||||
<source>Requests</source>
|
||||
<target>Anfragen</target>
|
||||
|
||||
<note>Picker option for DM selector for seeing only message requests (DMs that someone else sent the user which has not been responded to yet). DM is the English abbreviation for Direct Message.</note>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reset" xml:space="preserve">
|
||||
<source>Reset</source>
|
||||
<target>Zurücksetzen</target>
|
||||
|
||||
<note>Section title for resetting the user</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Retry" xml:space="preserve">
|
||||
<source>Retry</source>
|
||||
<target>Erneut versuchen</target>
|
||||
<target>Wiederholung</target>
|
||||
|
||||
<note>Button to retry completing account creation after an error occurred.</note>
|
||||
</trans-unit>
|
||||
@@ -938,7 +745,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="Save Image" xml:space="preserve">
|
||||
<source>Save Image</source>
|
||||
<target>Bild sichern</target>
|
||||
<target>Bild speichern</target>
|
||||
|
||||
<note>Context menu option to save an image.</note>
|
||||
</trans-unit>
|
||||
@@ -962,7 +769,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="Select a Lightning wallet" xml:space="preserve">
|
||||
<source>Select a Lightning wallet</source>
|
||||
<target>Wähle ein Lightning Wallet</target>
|
||||
<target>Wähle eine Lightning-Wallet</target>
|
||||
|
||||
<note>Title of section for selecting a Lightning wallet to pay a Lightning invoice.</note>
|
||||
</trans-unit>
|
||||
@@ -974,16 +781,10 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="Send a message to start the conversation..." xml:space="preserve">
|
||||
<source>Send a message to start the conversation...</source>
|
||||
<target>Sende eine Nachricht um eine Unterhaltung zu beginnen...</target>
|
||||
<target>Sende eine Nachricht um die Unterhaltung zu beginnen...</target>
|
||||
|
||||
<note>Text prompt for user to send a message to the other user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Server" xml:space="preserve">
|
||||
<source>Server</source>
|
||||
<target>Server</target>
|
||||
|
||||
<note>Prompt selection of LibreTranslate server to perform machine translations on notes</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Settings" xml:space="preserve">
|
||||
<source>Settings</source>
|
||||
<target>Einstellungen</target>
|
||||
@@ -995,21 +796,13 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<source>Share</source>
|
||||
<target>Teilen</target>
|
||||
|
||||
<note>Button to share an image.
|
||||
Button to share the link to a profile.</note>
|
||||
<note>Button to share an image.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show" xml:space="preserve">
|
||||
<source>Show</source>
|
||||
<target>Anzeigen</target>
|
||||
|
||||
<note>Button to show a post from a user who has been blocked.
|
||||
Toggle to show or hide user's secret account login key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show API Key" xml:space="preserve">
|
||||
<source>Show API Key</source>
|
||||
<target>API Schlüssel anzeigen</target>
|
||||
|
||||
<note>Button to hide the LibreTranslate server API key.</note>
|
||||
<note>Toggle to show or hide user's secret account login key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show wallet selector" xml:space="preserve">
|
||||
<source>Show wallet selector</source>
|
||||
@@ -1029,27 +822,15 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Dropdown option label for Lightning wallet, Strike.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Thanks!" xml:space="preserve">
|
||||
<source>Thanks!</source>
|
||||
<target>Danke!</target>
|
||||
|
||||
<note>Button to close out of alert that informs that the action to block a user was successful.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="They are impersonating someone" xml:space="preserve">
|
||||
<source>They are impersonating someone</source>
|
||||
<target>Die geben sich für jemand anderen aus</target>
|
||||
|
||||
<note>Button for user to report that the account is impersonating someone.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="This is a public key, you will not be able to make posts 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 posts or interact in any way. This is used for viewing accounts from their perspective.</source>
|
||||
<target>Dies ist ein öffentlicher Schlüssel, Du wirst keine Beiträge teilen oder oder auf irgendeine Weise interagieren können. Dies wird genutzt um andere Kontos aus deren Perspektive zu sehen.</target>
|
||||
<target>Dies ist ein öffentlicher Schlüssel, Du wirst keine Beiträge teilen oder oder auf irgendeine Weise interagieren können. Dies wird genutzt um Kontos aus deren Perspektive zu sehen.</target>
|
||||
|
||||
<note>Warning that the inputted account key is a public key and the result of what happens because of it.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="This is an old-style nostr key. We're not sure if it's a pubkey or private key. Please toggle the button below if this a public key." xml:space="preserve">
|
||||
<source>This is an old-style nostr key. We're not sure if it's a pubkey or private key. Please toggle the button below if this a public key.</source>
|
||||
<target>Dies ist ein Nostr-Schlüssel im veralteten Format. Wir sind nicht sicher ob es ein öffentlicher Schlüssel oder ein privater Schlüssel ist. Bitte betätige die untenstehende Schaltfläche wenn es ein öffentlicher Schlüssel ist.</target>
|
||||
<target>Dies ist ein veralteter nostr-Schlüssel. Wir sind und unsicher ob es ein öffentlicher Schlüssel oder ein privater Schlüssel ist. Bitte betätige die untenstehende Schaltfläche wenn es ein öffentlicher Schlüssel ist.</target>
|
||||
|
||||
<note>Warning that the inputted account key for login is an old-style and asking user to verify if it is a public key.</note>
|
||||
</trans-unit>
|
||||
@@ -1072,40 +853,12 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<note>Navigation bar title for note thread.
|
||||
Navigation bar title for threaded event detail view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Translate Note" xml:space="preserve">
|
||||
<source>Translate Note</source>
|
||||
<target>Notiz übersetzen</target>
|
||||
|
||||
<note>Button to translate note from different language.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Translated from (lang)" xml:space="preserve">
|
||||
<source>Translated from (lang)</source>
|
||||
<target>Übersetzt aus (lang)</target>
|
||||
|
||||
<note>Button to indicate that the note has been translated from a different language.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Translating from (lang)..." xml:space="preserve">
|
||||
<source>Translating from (lang)...</source>
|
||||
|
||||
<note>Button to indicate that the note is in the process of being translated from a different language.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Type DELETE to delete" xml:space="preserve">
|
||||
<source>Type DELETE to delete</source>
|
||||
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Type your post here..." xml:space="preserve">
|
||||
<source>Type your post here...</source>
|
||||
<target>Schreibe deinen Beitrag hier...</target>
|
||||
|
||||
<note>Text box prompt to ask user to type their post.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="URL" xml:space="preserve">
|
||||
<source>URL</source>
|
||||
<target>URL</target>
|
||||
|
||||
<note>Example URL to LibreTranslate server</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Unfollow" xml:space="preserve">
|
||||
<source>Unfollow</source>
|
||||
<target>Entfolgen</target>
|
||||
@@ -1114,7 +867,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="Unfollowing" xml:space="preserve">
|
||||
<source>Unfollowing</source>
|
||||
<target>Entfolge...</target>
|
||||
<target>Entfolgen...</target>
|
||||
|
||||
<note>Text to indicate that the button next to it is in a state that indicates that it is in the process of unfollowing a profile.</note>
|
||||
</trans-unit>
|
||||
@@ -1130,18 +883,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Text to indicate that the button next to it is in a state that will unfollow a profile when tapped.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="User blocked" xml:space="preserve">
|
||||
<source>User blocked</source>
|
||||
<target>Benutzer blockiert</target>
|
||||
|
||||
<note>Alert message to indicate the user has been blocked</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="User has been blocked" xml:space="preserve">
|
||||
<source>User has been blocked</source>
|
||||
<target>Der Benutzer wurde blockiert</target>
|
||||
|
||||
<note>Alert message that informs a user was blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Username" xml:space="preserve">
|
||||
<source>Username</source>
|
||||
<target>Benutzername</target>
|
||||
@@ -1155,18 +896,18 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Sidebar menu label for Wallet view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Wallet Of Satoshi" xml:space="preserve">
|
||||
<source>Wallet Of Satoshi</source>
|
||||
<target>Wallet Of Satoshi</target>
|
||||
|
||||
<note>Dropdown option label for Lightning wallet, Wallet Of Satoshi.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Wallet Selector" xml:space="preserve">
|
||||
<source>Wallet Selector</source>
|
||||
<target>Wallet-Auswahl</target>
|
||||
|
||||
<note>Section title for selection of wallet.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Wallet of Satoshi" xml:space="preserve">
|
||||
<source>Wallet of Satoshi</source>
|
||||
<target>Wallet of Satoshi</target>
|
||||
|
||||
<note>Dropdown option label for Lightning wallet, Wallet of Satoshi.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Website" xml:space="preserve">
|
||||
<source>Website</source>
|
||||
<target>Website</target>
|
||||
@@ -1185,35 +926,12 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Text to welcome user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="What do you want to report?" xml:space="preserve">
|
||||
<source>What do you want to report?</source>
|
||||
<target>Was möchtest du melden?</target>
|
||||
|
||||
<note>Header text to prompt user what issue they want to report.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Yes, Overwrite" xml:space="preserve">
|
||||
<source>Yes, Overwrite</source>
|
||||
<target>Ja, überschreiben</target>
|
||||
|
||||
<note>Text of button that confirms to overwrite the existing mutelist.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Yes, Post with Private Key" xml:space="preserve">
|
||||
<source>Yes, Post with Private Key</source>
|
||||
|
||||
<note>Button to proceed with posting a note even though it looks like they might be posting a private key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Your Name" xml:space="preserve">
|
||||
<source>Your Name</source>
|
||||
<target>Dein Name</target>
|
||||
|
||||
<note>Label for Your Name section of user profile form.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Your report will be sent to the relays you are connected to" xml:space="preserve">
|
||||
<source>Your report will be sent to the relays you are connected to</source>
|
||||
<target>Die Meldung wird an Relays versendet, mit denen du verbunden bist</target>
|
||||
|
||||
<note>Footer text to inform user what will happen when the report is submitted.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Zebedee" xml:space="preserve">
|
||||
<source>Zebedee</source>
|
||||
<target>Zebedee</target>
|
||||
@@ -1240,7 +958,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="https://example.com/pic.jpg" xml:space="preserve">
|
||||
<source>https://example.com/pic.jpg</source>
|
||||
<target>https://example.com/pic.jpg</target>
|
||||
<target>https://beispiel.de/bild.jpg</target>
|
||||
|
||||
<note>Placeholder example text for profile picture URL.</note>
|
||||
</trans-unit>
|
||||
@@ -1322,6 +1040,12 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Amount of sats. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="tips_count" translate="no" xml:space="preserve">
|
||||
<source>tips_count</source>
|
||||
<target>tips_count</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="u{00A0}" xml:space="preserve">
|
||||
<source>u{00A0}</source>
|
||||
<target>u{00A0}</target>
|
||||
@@ -1330,7 +1054,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="wss://some.relay.com" xml:space="preserve">
|
||||
<source>wss://some.relay.com</source>
|
||||
<target>wss://some.relay.com</target>
|
||||
<target>wss://irgendein.relay.de</target>
|
||||
|
||||
<note>Placeholder example for relay server address.</note>
|
||||
</trans-unit>
|
||||
@@ -1340,21 +1064,9 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>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.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="zaps_count" translate="no" xml:space="preserve">
|
||||
<source>zaps_count</source>
|
||||
<target>zaps_count</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="⚡️ %@" xml:space="preserve">
|
||||
<source>⚡️ %@</source>
|
||||
<target>⚡️ %@</target>
|
||||
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
<file original="damus/en-US.lproj/Localizable.stringsdict" source-language="en-US" target-language="de" datatype="plaintext">
|
||||
<file original="damus/en-US.lproj/Localizable.stringsdict" source-language="en-US" target-language="de-DE" datatype="plaintext">
|
||||
<header>
|
||||
<tool tool-id="com.apple.dt.xcode" tool-name="Xcode" tool-version="14.2" build-num="14C18"/>
|
||||
</header>
|
||||
@@ -1385,7 +1097,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="/followers_count:dict/FOLLOWERS:dict/other:dict/:string" xml:space="preserve">
|
||||
<source>Followers</source>
|
||||
<target>Gefolgte</target>
|
||||
<target>Follower</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many people are following a user.</note>
|
||||
</trans-unit>
|
||||
@@ -1439,13 +1151,13 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="/replying_to_one_and_others:dict/OTHERS:dict/one:dict/:string" xml:space="preserve">
|
||||
<source> & %d other</source>
|
||||
<target> & %d andere</target>
|
||||
<target>& %d andere</target>
|
||||
|
||||
<note>Label to indicate that the user is replying to 1 user and others.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/replying_to_one_and_others:dict/OTHERS:dict/other:dict/:string" xml:space="preserve">
|
||||
<source> & %d others</source>
|
||||
<target> & %d andere</target>
|
||||
<target>& %d andere</target>
|
||||
|
||||
<note>Label to indicate that the user is replying to 1 user and others.</note>
|
||||
</trans-unit>
|
||||
@@ -1461,13 +1173,13 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="/replying_to_two_and_others:dict/OTHERS:dict/one:dict/:string" xml:space="preserve">
|
||||
<source> & %d other</source>
|
||||
<target> & %d andere</target>
|
||||
<target>& %d andere</target>
|
||||
|
||||
<note>Label to indicate that the user is replying to 2 users and others.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/replying_to_two_and_others:dict/OTHERS:dict/other:dict/:string" xml:space="preserve">
|
||||
<source> & %d others</source>
|
||||
<target> & %d andere</target>
|
||||
<target>& %d andere</target>
|
||||
|
||||
<note>Label to indicate that the user is replying to 2 users and others.</note>
|
||||
</trans-unit>
|
||||
@@ -1483,13 +1195,13 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="/reposts_count:dict/REPOSTS:dict/one:dict/:string" xml:space="preserve">
|
||||
<source>Repost</source>
|
||||
<target>geteilter Beitrag</target>
|
||||
<target>Mal geteilt</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many reposts there are.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/reposts_count:dict/REPOSTS:dict/other:dict/:string" xml:space="preserve">
|
||||
<source>Reposts</source>
|
||||
<target>geteilte Beiträge</target>
|
||||
<target>Mal geteilt</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many reposts there are.</note>
|
||||
</trans-unit>
|
||||
@@ -1511,21 +1223,23 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Amount of sats.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/zaps_count:dict/NSStringLocalizedFormatKey:dict/:string" xml:space="preserve">
|
||||
<source>%#@ZAPS@</source>
|
||||
<target>%#@ZAPS@</target>
|
||||
<trans-unit id="/tips_count:dict/NSStringLocalizedFormatKey:dict/:string" xml:space="preserve">
|
||||
<source>%#@TIPS@</source>
|
||||
<target>%#@TIPS@</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post.</note>
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/zaps_count:dict/ZAPS:dict/one:dict/:string" xml:space="preserve">
|
||||
<source>Zap</source>
|
||||
<trans-unit id="/tips_count:dict/TIPS:dict/one:dict/:string" xml:space="preserve">
|
||||
<source>Tip</source>
|
||||
<target>Trinkgeld</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post.</note>
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/zaps_count:dict/ZAPS:dict/other:dict/:string" xml:space="preserve">
|
||||
<source>Zaps</source>
|
||||
<trans-unit id="/tips_count:dict/TIPS:dict/other:dict/:string" xml:space="preserve">
|
||||
<source>Tips</source>
|
||||
<target>Trinkgelder</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post.</note>
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post.</note>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
@@ -35,19 +35,15 @@
|
||||
<trans-unit id="%@" xml:space="preserve">
|
||||
<source>%@</source>
|
||||
<target>%@</target>
|
||||
<note>Abbreviated version of a nostr public key.</note>
|
||||
<note>Amount of time that has passed since reply quote event occurred.
|
||||
Abbreviated version of a nostr public key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%@ %@" xml:space="preserve">
|
||||
<source>%@ %@</source>
|
||||
<target>%@ %@</target>
|
||||
<note>Sentence composed of 2 variables to describe how many zap payments there are on a post. In source English, the first variable is the number of zap payments, and the second variable is 'Zap' or 'Zaps'.
|
||||
<note>Sentence composed of 2 variables to describe how many reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'.
|
||||
Sentence composed of 2 variables to describe how many profiles a user is following. In source English, the first variable is the number of profiles being followed, and the second variable is 'Following'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%@ has been blocked" xml:space="preserve">
|
||||
<source>%@ has been blocked</source>
|
||||
<target>%@ has been blocked</target>
|
||||
<note>Alert message that informs a user was blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction." xml:space="preserve">
|
||||
<source>%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.</source>
|
||||
<target>%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.</target>
|
||||
@@ -66,7 +62,7 @@ Sentence composed of 2 variables to describe how many profiles a user is followi
|
||||
<trans-unit id="%lld" xml:space="preserve">
|
||||
<source>%lld</source>
|
||||
<target>%lld</target>
|
||||
<note>Number of zap payments on a post.
|
||||
<note>Number of reposts.
|
||||
Number of profiles a user is following.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%lld/%lld" xml:space="preserve">
|
||||
@@ -79,9 +75,9 @@ Number of profiles a user is following.</note>
|
||||
<target>'%@' at '%@' will be used for verification</target>
|
||||
<note>Description of how the nip05 identifier would be used for verification.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="'%@' is an invalid NIP-05 identifier. It should look like an email." xml:space="preserve">
|
||||
<source>'%@' is an invalid NIP-05 identifier. It should look like an email.</source>
|
||||
<target>'%@' is an invalid NIP-05 identifier. It should look like an email.</target>
|
||||
<trans-unit id="'%@' is an invalid nip05 identifier. It should look like an email." xml:space="preserve">
|
||||
<source>'%@' is an invalid nip05 identifier. It should look like an email.</source>
|
||||
<target>'%@' is an invalid nip05 identifier. It should look like an email.</target>
|
||||
<note>Description of why the nip05 identifier is invalid.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="(Profile.displayName(profile: profile, pubkey: whos))'s Followers" xml:space="preserve">
|
||||
@@ -104,11 +100,6 @@ Number of profiles a user is following.</note>
|
||||
<target>@</target>
|
||||
<note>Prefix character to username.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="API Key (optional)" xml:space="preserve">
|
||||
<source>API Key (optional)</source>
|
||||
<target>API Key (optional)</target>
|
||||
<note>Example URL to LibreTranslate server</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="About" xml:space="preserve">
|
||||
<source>About</source>
|
||||
<target>About</target>
|
||||
@@ -124,21 +115,11 @@ Number of profiles a user is following.</note>
|
||||
<target>Absolute Boss</target>
|
||||
<note>Placeholder text for About Me description.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Accept" xml:space="preserve">
|
||||
<source>Accept</source>
|
||||
<target>Accept</target>
|
||||
<note>Button to accept the end user license agreement before being allowed into the app.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Account ID" xml:space="preserve">
|
||||
<source>Account ID</source>
|
||||
<target>Account ID</target>
|
||||
<note>Label to indicate the public ID of the account.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Actions" xml:space="preserve">
|
||||
<source>Actions</source>
|
||||
<target>Actions</target>
|
||||
<note>Title for confirmation dialog to either share, report, or block a profile.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Add" xml:space="preserve">
|
||||
<source>Add</source>
|
||||
<target>Add</target>
|
||||
@@ -190,33 +171,6 @@ Number of profiles a user is following.</note>
|
||||
<target>Blixt Wallet</target>
|
||||
<note>Dropdown option label for Lightning wallet, Blixt Wallet</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Block" xml:space="preserve">
|
||||
<source>Block</source>
|
||||
<target>Block</target>
|
||||
<note>Alert button to block a user.
|
||||
Button to block a profile.
|
||||
Context menu option for blocking users.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Block %@?" xml:space="preserve">
|
||||
<source>Block %@?</source>
|
||||
<target>Block %@?</target>
|
||||
<note>Alert message prompt to ask if a user should be blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Block User" xml:space="preserve">
|
||||
<source>Block User</source>
|
||||
<target>Block User</target>
|
||||
<note>Title of alert for blocking a user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Blocked" xml:space="preserve">
|
||||
<source>Blocked</source>
|
||||
<target>Blocked</target>
|
||||
<note>Sidebar menu label for Profile view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Blocked Users" xml:space="preserve">
|
||||
<source>Blocked Users</source>
|
||||
<target>Blocked Users</target>
|
||||
<note>Navigation title of view to see list of blocked users.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Blue Wallet" xml:space="preserve">
|
||||
<source>Blue Wallet</source>
|
||||
<target>Blue Wallet</target>
|
||||
@@ -235,12 +189,9 @@ Number of profiles a user is following.</note>
|
||||
<trans-unit id="Cancel" xml:space="preserve">
|
||||
<source>Cancel</source>
|
||||
<target>Cancel</target>
|
||||
<note>Alert button to cancel out of alert for blocking a user.
|
||||
Button to cancel out of alert that creates a new mutelist.
|
||||
Button to cancel out of posting a note.
|
||||
<note>Button to cancel out of posting a note.
|
||||
Button to cancel out of reposting a post.
|
||||
Button to cancel out of view adding user inputted relay.
|
||||
Cancel deleting the user.
|
||||
Cancel out of logging out the user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Cash App" xml:space="preserve">
|
||||
@@ -304,19 +255,14 @@ Number of profiles a user is following.</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 Report ID" xml:space="preserve">
|
||||
<source>Copy Report ID</source>
|
||||
<target>Copy Report ID</target>
|
||||
<note>Button to copy report ID.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Copy Text" xml:space="preserve">
|
||||
<source>Copy Text</source>
|
||||
<target>Copy Text</target>
|
||||
<note>Context menu option for copying the text from an note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Copy User Pubkey" xml:space="preserve">
|
||||
<source>Copy User Pubkey</source>
|
||||
<target>Copy User Pubkey</target>
|
||||
<trans-unit id="Copy User ID" xml:space="preserve">
|
||||
<source>Copy User ID</source>
|
||||
<target>Copy User ID</target>
|
||||
<note>Context menu option for copying the ID of the user who created the note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Copy invoice" xml:space="preserve">
|
||||
@@ -324,11 +270,6 @@ Number of profiles a user is following.</note>
|
||||
<target>Copy invoice</target>
|
||||
<note>Title of section for copying a Lightning invoice identifier.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Could not find user to block..." xml:space="preserve">
|
||||
<source>Could not find user to block...</source>
|
||||
<target>Could not find user to block...</target>
|
||||
<note>Alert message to indicate that the blocked user could not be found.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Create" xml:space="preserve">
|
||||
<source>Create</source>
|
||||
<target>Create</target>
|
||||
@@ -339,20 +280,15 @@ Number of profiles a user is following.</note>
|
||||
<target>Create Account</target>
|
||||
<note>Button to create an account.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Create new mutelist" xml:space="preserve">
|
||||
<source>Create new mutelist</source>
|
||||
<target>Create new mutelist</target>
|
||||
<note>Title of alert prompting the user to create a new mutelist.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Creator(s) of Bitcoin. Absolute legend." xml:space="preserve">
|
||||
<source>Creator(s) of Bitcoin. Absolute legend.</source>
|
||||
<target>Creator(s) of Bitcoin. Absolute legend.</target>
|
||||
<note>Example description about Bitcoin creator(s), Satoshi Nakamoto.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Custom" xml:space="preserve">
|
||||
<source>Custom</source>
|
||||
<target>Custom</target>
|
||||
<note>Dropdown option for selecting a custom translation server.</note>
|
||||
<trans-unit id="DM Type" xml:space="preserve">
|
||||
<source>DM Type</source>
|
||||
<target>DM Type</target>
|
||||
<note>DM selector for seeing either DMs or message requests, which are messages that have not been responded to yet. DM is the English abbreviation for Direct Message.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="DMs" xml:space="preserve">
|
||||
<source>DMs</source>
|
||||
@@ -373,21 +309,7 @@ Number of profiles a user is following.</note>
|
||||
<trans-unit id="Delete" xml:space="preserve">
|
||||
<source>Delete</source>
|
||||
<target>Delete</target>
|
||||
<note>Button for deleting the users account.
|
||||
Button to delete a relay server that the user connects to.
|
||||
Button to remove a user from their blocklist.
|
||||
Section title for deleting the user</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Delete Account" xml:space="preserve">
|
||||
<source>Delete Account</source>
|
||||
<target>Delete Account</target>
|
||||
<note>Alert for deleting the users account.
|
||||
Button to delete the user's account.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Deleted Account" xml:space="preserve">
|
||||
<source>Deleted Account</source>
|
||||
<target>Deleted Account</target>
|
||||
<note>Alert message to indicate this is a deleted account</note>
|
||||
<note>Button to delete a relay server that the user connects to.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Dismiss" xml:space="preserve">
|
||||
<source>Dismiss</source>
|
||||
@@ -404,11 +326,6 @@ Number of profiles a user is following.</note>
|
||||
<target>Done</target>
|
||||
<note>Button to dismiss wallet selection view for paying Lightning invoice.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="EULA" xml:space="preserve">
|
||||
<source>EULA</source>
|
||||
<target>EULA</target>
|
||||
<note>Label indicating that the below text is the EULA, an acronym for End User License Agreement.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Earn Money" xml:space="preserve">
|
||||
<source>Earn Money</source>
|
||||
<target>Earn Money</target>
|
||||
@@ -439,6 +356,11 @@ Number of profiles a user is following.</note>
|
||||
<target>Error: %@</target>
|
||||
<note>Error message indicating why saving keys failed.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Filter State" xml:space="preserve">
|
||||
<source>Filter State</source>
|
||||
<target>Filter State</target>
|
||||
<note>Filter state for seeing either only posts, or posts & replies.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Follow" xml:space="preserve">
|
||||
<source>Follow</source>
|
||||
<target>Follow</target>
|
||||
@@ -480,36 +402,16 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>Goto profile %@</target>
|
||||
<note>Navigation link to go to profile.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Hide" xml:space="preserve">
|
||||
<source>Hide</source>
|
||||
<target>Hide</target>
|
||||
<note>Button to hide a post from a user who has been blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Hide API Key" xml:space="preserve">
|
||||
<source>Hide API Key</source>
|
||||
<target>Hide API Key</target>
|
||||
<note>Button to hide the LibreTranslate server API key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Home" xml:space="preserve">
|
||||
<source>Home</source>
|
||||
<target>Home</target>
|
||||
<note>Navigation bar title for Home view where posts and replies appear from those who the user is following.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Illegal content" xml:space="preserve">
|
||||
<source>Illegal content</source>
|
||||
<target>Illegal content</target>
|
||||
<note>Button for user to report that the account or content has illegal content.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Invalid key" xml:space="preserve">
|
||||
<source>Invalid key</source>
|
||||
<target>Invalid key</target>
|
||||
<note>Error message indicating that an invalid account key was entered for login.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="It's spam" xml:space="preserve">
|
||||
<source>It's spam</source>
|
||||
<target>It's spam</target>
|
||||
<note>Button for user to report that the account or content has spam.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="LNLink" xml:space="preserve">
|
||||
<source>LNLink</source>
|
||||
<target>LNLink</target>
|
||||
@@ -525,11 +427,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>Let's go!</target>
|
||||
<note>Button to complete account creation and start using the app.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="LibreTranslate Translations" xml:space="preserve">
|
||||
<source>LibreTranslate Translations</source>
|
||||
<target>LibreTranslate Translations</target>
|
||||
<note>Section title for selecting the server that hosts the LibreTranslate machine translation API.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Lightning Address or LNURL" xml:space="preserve">
|
||||
<source>Lightning Address or LNURL</source>
|
||||
<target>Lightning Address or LNURL</target>
|
||||
@@ -556,7 +453,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>Logout</target>
|
||||
<note>Alert for logging out the user.
|
||||
Button for logging out the user.
|
||||
Button to close the alert that informs that the current account has been deleted.</note>
|
||||
Button to logout the user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Make sure your nsec account key is saved before you logout or you will lose access to this account" xml:space="preserve">
|
||||
<source>Make sure your nsec account key is saved before you logout or you will lose access to this account</source>
|
||||
@@ -573,26 +470,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>NIP-05 Verification</target>
|
||||
<note>Label for NIP-05 Verification section of user profile form.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="No" xml:space="preserve">
|
||||
<source>No</source>
|
||||
<target>No</target>
|
||||
<note>Button to cancel out of posting a note after being alerted that it looks like they might be posting a private key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="No block list found, create a new one? This will overwrite any previous block lists." xml:space="preserve">
|
||||
<source>No block list found, create a new one? This will overwrite any previous block lists.</source>
|
||||
<target>No block list found, create a new one? This will overwrite any previous block lists.</target>
|
||||
<note>Alert message prompt that asks if the user wants to create a new block list, overwriting previous block lists.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="None" xml:space="preserve">
|
||||
<source>None</source>
|
||||
<target>None</target>
|
||||
<note>Dropdown option for selecting no translation server.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Note contains "nsec1" private key. Are you sure?" xml:space="preserve">
|
||||
<source>Note contains "nsec1" private key. Are you sure?</source>
|
||||
<target>Note contains "nsec1" private key. Are you sure?</target>
|
||||
<note>Alert user that they might be attempting to paste a private key and ask them to confirm.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Nothing to see here. Check back later!" xml:space="preserve">
|
||||
<source>Nothing to see here. Check back later!</source>
|
||||
<target>Nothing to see here. Check back later!</target>
|
||||
@@ -603,11 +480,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>Notifications</target>
|
||||
<note>Navigation title for notifications.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Nudity or explicit content" xml:space="preserve">
|
||||
<source>Nudity or explicit content</source>
|
||||
<target>Nudity or explicit content</target>
|
||||
<note>Button for user to report that the account or content has nudity or explicit content.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Pay" xml:space="preserve">
|
||||
<source>Pay</source>
|
||||
<target>Pay</target>
|
||||
@@ -628,11 +500,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>Post</target>
|
||||
<note>Button to post a note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Post from a user you've blocked" xml:space="preserve">
|
||||
<source>Post from a user you've blocked</source>
|
||||
<target>Post from a user you've blocked</target>
|
||||
<note>Text to indicate that what is being shown is a post from a user who has been blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Posts" xml:space="preserve">
|
||||
<source>Posts</source>
|
||||
<target>Posts</target>
|
||||
@@ -693,11 +560,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>Recommended Relays</target>
|
||||
<note>Section title for recommend relay servers that could be added as part of configuration</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reject" xml:space="preserve">
|
||||
<source>Reject</source>
|
||||
<target>Reject</target>
|
||||
<note>Button to reject the end user license agreement, which disallows the user from being let into the app.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Relay" xml:space="preserve">
|
||||
<source>Relay</source>
|
||||
<target>Relay</target>
|
||||
@@ -706,13 +568,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<trans-unit id="Relays" xml:space="preserve">
|
||||
<source>Relays</source>
|
||||
<target>Relays</target>
|
||||
<note>Sidebar menu label for Relay servers view
|
||||
Sidebar menu label for Relays view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Relays have been notified and clients will be able to use this information to filter content. Thank you!" xml:space="preserve">
|
||||
<source>Relays have been notified and clients will be able to use this information to filter content. Thank you!</source>
|
||||
<target>Relays have been notified and clients will be able to use this information to filter content. Thank you!</target>
|
||||
<note>Description of what was done as a result of sending a report to relay servers.</note>
|
||||
<note>Sidebar menu label for Relay servers view</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Remove all" xml:space="preserve">
|
||||
<source>Remove all</source>
|
||||
@@ -734,22 +590,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>Replying to:</target>
|
||||
<note>Indicating that the user is replying to the following listed people.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Report" xml:space="preserve">
|
||||
<source>Report</source>
|
||||
<target>Report</target>
|
||||
<note>Button to report a profile.
|
||||
Context menu option for reporting content.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Report ID:" xml:space="preserve">
|
||||
<source>Report ID:</source>
|
||||
<target>Report ID:</target>
|
||||
<note>Label indicating that the text underneath is the identifier of the report that was sent to relay servers.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Report sent!" xml:space="preserve">
|
||||
<source>Report sent!</source>
|
||||
<target>Report sent!</target>
|
||||
<note>Message indicating that a report was successfully sent to relay servers.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Repost" xml:space="preserve">
|
||||
<source>Repost</source>
|
||||
<target>Repost</target>
|
||||
@@ -761,16 +601,16 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>Reposted</target>
|
||||
<note>Text indicating that the post was reposted (i.e. re-shared).</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reposts" xml:space="preserve">
|
||||
<source>Reposts</source>
|
||||
<target>Reposts</target>
|
||||
<note>Navigation bar title for Reposts view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Requests" xml:space="preserve">
|
||||
<source>Requests</source>
|
||||
<target>Requests</target>
|
||||
<note>Picker option for DM selector for seeing only message requests (DMs that someone else sent the user which has not been responded to yet). DM is the English abbreviation for Direct Message.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reset" xml:space="preserve">
|
||||
<source>Reset</source>
|
||||
<target>Reset</target>
|
||||
<note>Section title for resetting the user</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Retry" xml:space="preserve">
|
||||
<source>Retry</source>
|
||||
<target>Retry</target>
|
||||
@@ -826,11 +666,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>Send a message to start the conversation...</target>
|
||||
<note>Text prompt for user to send a message to the other user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Server" xml:space="preserve">
|
||||
<source>Server</source>
|
||||
<target>Server</target>
|
||||
<note>Prompt selection of LibreTranslate server to perform machine translations on notes</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Settings" xml:space="preserve">
|
||||
<source>Settings</source>
|
||||
<target>Settings</target>
|
||||
@@ -840,19 +675,12 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<trans-unit id="Share" xml:space="preserve">
|
||||
<source>Share</source>
|
||||
<target>Share</target>
|
||||
<note>Button to share an image.
|
||||
Button to share the link to a profile.</note>
|
||||
<note>Button to share an image.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show" xml:space="preserve">
|
||||
<source>Show</source>
|
||||
<target>Show</target>
|
||||
<note>Button to show a post from a user who has been blocked.
|
||||
Toggle to show or hide user's secret account login key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show API Key" xml:space="preserve">
|
||||
<source>Show API Key</source>
|
||||
<target>Show API Key</target>
|
||||
<note>Button to hide the LibreTranslate server API key.</note>
|
||||
<note>Toggle to show or hide user's secret account login key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show wallet selector" xml:space="preserve">
|
||||
<source>Show wallet selector</source>
|
||||
@@ -869,16 +697,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>Strike</target>
|
||||
<note>Dropdown option label for Lightning wallet, Strike.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Thanks!" xml:space="preserve">
|
||||
<source>Thanks!</source>
|
||||
<target>Thanks!</target>
|
||||
<note>Button to close out of alert that informs that the action to block a user was successful.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="They are impersonating someone" xml:space="preserve">
|
||||
<source>They are impersonating someone</source>
|
||||
<target>They are impersonating someone</target>
|
||||
<note>Button for user to report that the account is impersonating someone.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="This is a public key, you will not be able to make posts 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 posts 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 posts or interact in any way. This is used for viewing accounts from their perspective.</target>
|
||||
@@ -905,36 +723,11 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<note>Navigation bar title for note thread.
|
||||
Navigation bar title for threaded event detail view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Translate Note" xml:space="preserve">
|
||||
<source>Translate Note</source>
|
||||
<target>Translate Note</target>
|
||||
<note>Button to translate note from different language.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Translated from (lang)" xml:space="preserve">
|
||||
<source>Translated from (lang)</source>
|
||||
<target>Translated from (lang)</target>
|
||||
<note>Button to indicate that the note has been translated from a different language.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Translating from (lang)..." xml:space="preserve">
|
||||
<source>Translating from (lang)...</source>
|
||||
<target>Translating from (lang)...</target>
|
||||
<note>Button to indicate that the note is in the process of being translated from a different language.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Type DELETE to delete" xml:space="preserve">
|
||||
<source>Type DELETE to delete</source>
|
||||
<target>Type DELETE to delete</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Type your post here..." xml:space="preserve">
|
||||
<source>Type your post here...</source>
|
||||
<target>Type your post here...</target>
|
||||
<note>Text box prompt to ask user to type their post.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="URL" xml:space="preserve">
|
||||
<source>URL</source>
|
||||
<target>URL</target>
|
||||
<note>Example URL to LibreTranslate server</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Unfollow" xml:space="preserve">
|
||||
<source>Unfollow</source>
|
||||
<target>Unfollow</target>
|
||||
@@ -955,16 +748,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>Unfollows</target>
|
||||
<note>Text to indicate that the button next to it is in a state that will unfollow a profile when tapped.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="User blocked" xml:space="preserve">
|
||||
<source>User blocked</source>
|
||||
<target>User blocked</target>
|
||||
<note>Alert message to indicate the user has been blocked</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="User has been blocked" xml:space="preserve">
|
||||
<source>User has been blocked</source>
|
||||
<target>User has been blocked</target>
|
||||
<note>Alert message that informs a user was blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Username" xml:space="preserve">
|
||||
<source>Username</source>
|
||||
<target>Username</target>
|
||||
@@ -976,16 +759,16 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>Wallet</target>
|
||||
<note>Sidebar menu label for Wallet view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Wallet Of Satoshi" xml:space="preserve">
|
||||
<source>Wallet Of Satoshi</source>
|
||||
<target>Wallet Of Satoshi</target>
|
||||
<note>Dropdown option label for Lightning wallet, Wallet Of Satoshi.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Wallet Selector" xml:space="preserve">
|
||||
<source>Wallet Selector</source>
|
||||
<target>Wallet Selector</target>
|
||||
<note>Section title for selection of wallet.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Wallet of Satoshi" xml:space="preserve">
|
||||
<source>Wallet of Satoshi</source>
|
||||
<target>Wallet of Satoshi</target>
|
||||
<note>Dropdown option label for Lightning wallet, Wallet of Satoshi.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Website" xml:space="preserve">
|
||||
<source>Website</source>
|
||||
<target>Website</target>
|
||||
@@ -1001,31 +784,11 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>Welcome, %@!</target>
|
||||
<note>Text to welcome user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="What do you want to report?" xml:space="preserve">
|
||||
<source>What do you want to report?</source>
|
||||
<target>What do you want to report?</target>
|
||||
<note>Header text to prompt user what issue they want to report.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Yes, Overwrite" xml:space="preserve">
|
||||
<source>Yes, Overwrite</source>
|
||||
<target>Yes, Overwrite</target>
|
||||
<note>Text of button that confirms to overwrite the existing mutelist.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Yes, Post with Private Key" xml:space="preserve">
|
||||
<source>Yes, Post with Private Key</source>
|
||||
<target>Yes, Post with Private Key</target>
|
||||
<note>Button to proceed with posting a note even though it looks like they might be posting a private key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Your Name" xml:space="preserve">
|
||||
<source>Your Name</source>
|
||||
<target>Your Name</target>
|
||||
<note>Label for Your Name section of user profile form.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Your report will be sent to the relays you are connected to" xml:space="preserve">
|
||||
<source>Your report will be sent to the relays you are connected to</source>
|
||||
<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="Zebedee" xml:space="preserve">
|
||||
<source>Zebedee</source>
|
||||
<target>Zebedee</target>
|
||||
@@ -1116,6 +879,11 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>sats_count</target>
|
||||
<note>Amount of sats. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="tips_count" translate="no" xml:space="preserve">
|
||||
<source>tips_count</source>
|
||||
<target>tips_count</target>
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="u{00A0}" xml:space="preserve">
|
||||
<source>u{00A0}</source>
|
||||
<target>u{00A0}</target>
|
||||
@@ -1131,16 +899,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>you</target>
|
||||
<note>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.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="zaps_count" translate="no" xml:space="preserve">
|
||||
<source>zaps_count</source>
|
||||
<target>zaps_count</target>
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="⚡️ %@" xml:space="preserve">
|
||||
<source>⚡️ %@</source>
|
||||
<target>⚡️ %@</target>
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
<file original="damus/en-US.lproj/Localizable.stringsdict" source-language="en-US" target-language="en-US" datatype="plaintext">
|
||||
@@ -1278,20 +1036,20 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<target>%2$@ sats</target>
|
||||
<note>Amount of sats.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/zaps_count:dict/NSStringLocalizedFormatKey:dict/:string" xml:space="preserve">
|
||||
<source>%#@ZAPS@</source>
|
||||
<target>%#@ZAPS@</target>
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post.</note>
|
||||
<trans-unit id="/tips_count:dict/NSStringLocalizedFormatKey:dict/:string" xml:space="preserve">
|
||||
<source>%#@TIPS@</source>
|
||||
<target>%#@TIPS@</target>
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/zaps_count:dict/ZAPS:dict/one:dict/:string" xml:space="preserve">
|
||||
<source>Zap</source>
|
||||
<target>Zap</target>
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post.</note>
|
||||
<trans-unit id="/tips_count:dict/TIPS:dict/one:dict/:string" xml:space="preserve">
|
||||
<source>Tip</source>
|
||||
<target>Tip</target>
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/zaps_count:dict/ZAPS:dict/other:dict/:string" xml:space="preserve">
|
||||
<source>Zaps</source>
|
||||
<target>Zaps</target>
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post.</note>
|
||||
<trans-unit id="/tips_count:dict/TIPS:dict/other:dict/:string" xml:space="preserve">
|
||||
<source>Tips</source>
|
||||
<target>Tips</target>
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post.</note>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
Binary file not shown.
@@ -134,20 +134,20 @@
|
||||
<string>%2$@ sats</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>zaps_count</key>
|
||||
<key>tips_count</key>
|
||||
<dict>
|
||||
<key>NSStringLocalizedFormatKey</key>
|
||||
<string>%#@ZAPS@</string>
|
||||
<key>ZAPS</key>
|
||||
<string>%#@TIPS@</string>
|
||||
<key>TIPS</key>
|
||||
<dict>
|
||||
<key>NSStringFormatSpecTypeKey</key>
|
||||
<string>NSStringPluralRuleType</string>
|
||||
<key>NSStringFormatValueTypeKey</key>
|
||||
<string>d</string>
|
||||
<key>one</key>
|
||||
<string>Zap</string>
|
||||
<string>Tip</string>
|
||||
<key>other</key>
|
||||
<string>Zaps</string>
|
||||
<string>Tips</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
@@ -17,8 +17,8 @@
|
||||
<note>Bundle name</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="NSPhotoLibraryAddUsageDescription" xml:space="preserve">
|
||||
<source>Granting Damus access to your photos allows you to save images.</source>
|
||||
<target>Si le concedes acceso a Damus a tus fotos, podrás guardar imágenes.</target>
|
||||
<source>"Granting Damus access to your photo library allows you to save photos.</source>
|
||||
<target>Si le concedes acceso a Damus a tu fototeca, podrás guardar fotos.</target>
|
||||
|
||||
<note>Privacy - Photo Library Additions Usage Description</note>
|
||||
</trans-unit>
|
||||
@@ -38,21 +38,16 @@
|
||||
<source>%@</source>
|
||||
<target>%@</target>
|
||||
|
||||
<note>Abbreviated version of a nostr public key.</note>
|
||||
<note>Amount of time that has passed since reply quote event occurred.
|
||||
Abbreviated version of a nostr public key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%@ %@" xml:space="preserve">
|
||||
<source>%@ %@</source>
|
||||
<target>%@ %@</target>
|
||||
|
||||
<note>Sentence composed of 2 variables to describe how many zap payments there are on a post. In source English, the first variable is the number of zap payments, and the second variable is 'Zap' or 'Zaps'.
|
||||
<note>Sentence composed of 2 variables to describe how many reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'.
|
||||
Sentence composed of 2 variables to describe how many profiles a user is following. In source English, the first variable is the number of profiles being followed, and the second variable is 'Following'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%@ has been blocked" xml:space="preserve">
|
||||
<source>%@ has been blocked</source>
|
||||
<target>Se bloqueó a %@</target>
|
||||
|
||||
<note>Alert message that informs a user was blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction." xml:space="preserve">
|
||||
<source>%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.</source>
|
||||
<target>%@. No se requiere un número de teléfono, correo electrónico ni nombre para crear una cuenta. Comienza de inmediato sin fricciones.</target>
|
||||
@@ -75,7 +70,7 @@ Sentence composed of 2 variables to describe how many profiles a user is followi
|
||||
<source>%lld</source>
|
||||
<target>%lld</target>
|
||||
|
||||
<note>Number of zap payments on a post.
|
||||
<note>Number of reposts.
|
||||
Number of profiles a user is following.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%lld/%lld" xml:space="preserve">
|
||||
@@ -86,13 +81,13 @@ Number of profiles a user is following.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="'%@' at '%@' will be used for verification" xml:space="preserve">
|
||||
<source>'%@' at '%@' will be used for verification</source>
|
||||
<target>'%@' en '%@' se usará con fines de verificación</target>
|
||||
<target>'%@' en '%@' se usarán con fines de verificación</target>
|
||||
|
||||
<note>Description of how the nip05 identifier would be used for verification.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="'%@' is an invalid NIP-05 identifier. It should look like an email." xml:space="preserve">
|
||||
<source>'%@' is an invalid NIP-05 identifier. It should look like an email.</source>
|
||||
<target>'%@' es un identificador NIP-05 no válido. Debería de tener la apariencia de un correo electrónico.</target>
|
||||
<trans-unit id="'%@' is an invalid nip05 identifier. It should look like an email." xml:space="preserve">
|
||||
<source>'%@' is an invalid nip05 identifier. It should look like an email.</source>
|
||||
<target>'%@' es un identificador nip05 no válido. Debería de tener la apariencia de un correo electrónico.</target>
|
||||
|
||||
<note>Description of why the nip05 identifier is invalid.</note>
|
||||
</trans-unit>
|
||||
@@ -120,12 +115,6 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Prefix character to username.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="API Key (optional)" xml:space="preserve">
|
||||
<source>API Key (optional)</source>
|
||||
<target>Clave de API (opcional)</target>
|
||||
|
||||
<note>Example URL to LibreTranslate server</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="About" xml:space="preserve">
|
||||
<source>About</source>
|
||||
<target>Información</target>
|
||||
@@ -144,24 +133,12 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Placeholder text for About Me description.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Accept" xml:space="preserve">
|
||||
<source>Accept</source>
|
||||
<target>Aceptar</target>
|
||||
|
||||
<note>Button to accept the end user license agreement before being allowed into the app.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Account ID" xml:space="preserve">
|
||||
<source>Account ID</source>
|
||||
<target>Identificador de cuenta</target>
|
||||
|
||||
<note>Label to indicate the public ID of the account.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Actions" xml:space="preserve">
|
||||
<source>Actions</source>
|
||||
<target>Acciones</target>
|
||||
|
||||
<note>Title for confirmation dialog to either share, report, or block a profile.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Add" xml:space="preserve">
|
||||
<source>Add</source>
|
||||
<target>Agregar</target>
|
||||
@@ -175,12 +152,6 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Label for section for adding a relay server.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Add all" xml:space="preserve">
|
||||
<source>Add all</source>
|
||||
<target>Agregar todo</target>
|
||||
|
||||
<note>Button label to re-add all original participants as profiles to reply to in a note</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Any" xml:space="preserve">
|
||||
<source>Any</source>
|
||||
<target>Cualquiera</target>
|
||||
@@ -223,38 +194,6 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Dropdown option label for Lightning wallet, Blixt Wallet</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Block" xml:space="preserve">
|
||||
<source>Block</source>
|
||||
<target>Bloquear</target>
|
||||
|
||||
<note>Alert button to block a user.
|
||||
Button to block a profile.
|
||||
Context menu option for blocking users.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Block %@?" xml:space="preserve">
|
||||
<source>Block %@?</source>
|
||||
<target>¿Bloquear a %@?</target>
|
||||
|
||||
<note>Alert message prompt to ask if a user should be blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Block User" xml:space="preserve">
|
||||
<source>Block User</source>
|
||||
<target>Bloquear usuario</target>
|
||||
|
||||
<note>Title of alert for blocking a user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Blocked" xml:space="preserve">
|
||||
<source>Blocked</source>
|
||||
<target>Bloqueado</target>
|
||||
|
||||
<note>Sidebar menu label for Profile view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Blocked Users" xml:space="preserve">
|
||||
<source>Blocked Users</source>
|
||||
<target>Usuarios bloqueados</target>
|
||||
|
||||
<note>Navigation title of view to see list of blocked users.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Blue Wallet" xml:space="preserve">
|
||||
<source>Blue Wallet</source>
|
||||
<target>Blue Wallet</target>
|
||||
@@ -277,12 +216,9 @@ Number of profiles a user is following.</note>
|
||||
<source>Cancel</source>
|
||||
<target>Cancelar</target>
|
||||
|
||||
<note>Alert button to cancel out of alert for blocking a user.
|
||||
Button to cancel out of alert that creates a new mutelist.
|
||||
Button to cancel out of posting a note.
|
||||
<note>Button to cancel out of posting a note.
|
||||
Button to cancel out of reposting a post.
|
||||
Button to cancel out of view adding user inputted relay.
|
||||
Cancel deleting the user.
|
||||
Cancel out of logging out the user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Cash App" xml:space="preserve">
|
||||
@@ -358,21 +294,15 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Context menu option for copying the JSON text from the note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Copy Report ID" xml:space="preserve">
|
||||
<source>Copy Report ID</source>
|
||||
<target>Copiar identificador de reporte</target>
|
||||
|
||||
<note>Button to copy report ID.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Copy Text" xml:space="preserve">
|
||||
<source>Copy Text</source>
|
||||
<target>Copiar texto</target>
|
||||
|
||||
<note>Context menu option for copying the text from an note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Copy User Pubkey" xml:space="preserve">
|
||||
<source>Copy User Pubkey</source>
|
||||
<target>Copiar clave pública de usuario</target>
|
||||
<trans-unit id="Copy User ID" xml:space="preserve">
|
||||
<source>Copy User ID</source>
|
||||
<target>Copiar identificador de usuario</target>
|
||||
|
||||
<note>Context menu option for copying the ID of the user who created the note.</note>
|
||||
</trans-unit>
|
||||
@@ -382,12 +312,6 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Title of section for copying a Lightning invoice identifier.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Could not find user to block..." xml:space="preserve">
|
||||
<source>Could not find user to block...</source>
|
||||
<target>No se pudo encontrar al usuario para bloquearlo...</target>
|
||||
|
||||
<note>Alert message to indicate that the blocked user could not be found.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Create" xml:space="preserve">
|
||||
<source>Create</source>
|
||||
<target>Crear</target>
|
||||
@@ -400,30 +324,17 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Button to create an account.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Create new mutelist" xml:space="preserve">
|
||||
<source>Create new mutelist</source>
|
||||
<target>Crear nueva lista de silenciados</target>
|
||||
|
||||
<note>Title of alert prompting the user to create a new mutelist.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Creator(s) of Bitcoin. Absolute legend." xml:space="preserve">
|
||||
<source>Creator(s) of Bitcoin. Absolute legend.</source>
|
||||
<target>Creador(es) de Bitcoin. Toda una leyenda.</target>
|
||||
|
||||
<note>Example description about Bitcoin creator(s), Satoshi Nakamoto.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Custom" xml:space="preserve">
|
||||
<source>Custom</source>
|
||||
<target>Personalizado</target>
|
||||
<trans-unit id="DM" xml:space="preserve">
|
||||
<source>DM</source>
|
||||
<target>MD</target>
|
||||
|
||||
<note>Dropdown option for selecting a custom translation server.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="DMs" xml:space="preserve">
|
||||
<source>DMs</source>
|
||||
<target>Mensajes directos</target>
|
||||
|
||||
<note>Navigation title for DMs view, where DM is the English abbreviation for Direct Message.
|
||||
Navigation title for view of DMs, where DM is an English abbreviation for Direct Message.</note>
|
||||
<note>Navigation title for DM view, which is the English abbreviation for Direct Message.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Damus" xml:space="preserve">
|
||||
<source>Damus</source>
|
||||
@@ -441,21 +352,7 @@ Number of profiles a user is following.</note>
|
||||
<source>Delete</source>
|
||||
<target>Borrar</target>
|
||||
|
||||
<note>Button for deleting the users account.
|
||||
Button to delete a relay server that the user connects to.
|
||||
Button to remove a user from their blocklist.
|
||||
Section title for deleting the user</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Delete Account" xml:space="preserve">
|
||||
<source>Delete Account</source>
|
||||
|
||||
<note>Alert for deleting the users account.
|
||||
Button to delete the user's account.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Deleted Account" xml:space="preserve">
|
||||
<source>Deleted Account</source>
|
||||
|
||||
<note>Alert message to indicate this is a deleted account</note>
|
||||
<note>Button to delete a relay server that the user connects to.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Dismiss" xml:space="preserve">
|
||||
<source>Dismiss</source>
|
||||
@@ -475,12 +372,6 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Button to dismiss wallet selection view for paying Lightning invoice.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="EULA" xml:space="preserve">
|
||||
<source>EULA</source>
|
||||
<target>CLUF</target>
|
||||
|
||||
<note>Label indicating that the below text is the EULA, an acronym for End User License Agreement.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Earn Money" xml:space="preserve">
|
||||
<source>Earn Money</source>
|
||||
<target>Gana dinero</target>
|
||||
@@ -493,18 +384,18 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Button to edit user's profile.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Edit participants" xml:space="preserve">
|
||||
<source>Edit participants</source>
|
||||
<target>Editar participantes</target>
|
||||
|
||||
<note>Text indicating that the view is used for editing which participants are replied to in a note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Encrypted" xml:space="preserve">
|
||||
<source>Encrypted</source>
|
||||
<target>Cifrada</target>
|
||||
|
||||
<note>Heading indicating that this application keeps private messaging end-to-end encrypted.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Encrypted DMs" xml:space="preserve">
|
||||
<source>Encrypted DMs</source>
|
||||
<target>MD cifrados</target>
|
||||
|
||||
<note>Navigation title for view of encrypted DMs, where DM is an English abbreviation for Direct Message.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Enter your account key to login:" xml:space="preserve">
|
||||
<source>Enter your account key to login:</source>
|
||||
<target>Ingresa la clave de tu cuenta para iniciar sesión:</target>
|
||||
@@ -517,6 +408,12 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Error message indicating why saving keys failed.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Filter State" xml:space="preserve">
|
||||
<source>Filter State</source>
|
||||
<target>Estado del filtro</target>
|
||||
|
||||
<note>Filter state for seeing either only posts, or posts & replies.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Follow" xml:space="preserve">
|
||||
<source>Follow</source>
|
||||
<target>Seguir</target>
|
||||
@@ -566,42 +463,18 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Navigation link to go to profile.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Hide" xml:space="preserve">
|
||||
<source>Hide</source>
|
||||
<target>Ocultar</target>
|
||||
|
||||
<note>Button to hide a post from a user who has been blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Hide API Key" xml:space="preserve">
|
||||
<source>Hide API Key</source>
|
||||
<target>Ocultar clave de API</target>
|
||||
|
||||
<note>Button to hide the LibreTranslate server API key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Home" xml:space="preserve">
|
||||
<source>Home</source>
|
||||
<target>Inicio</target>
|
||||
|
||||
<note>Navigation bar title for Home view where posts and replies appear from those who the user is following.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Illegal content" xml:space="preserve">
|
||||
<source>Illegal content</source>
|
||||
<target>Contenido ilegal</target>
|
||||
|
||||
<note>Button for user to report that the account or content has illegal content.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Invalid key" xml:space="preserve">
|
||||
<source>Invalid key</source>
|
||||
<target>Clave inválida</target>
|
||||
|
||||
<note>Error message indicating that an invalid account key was entered for login.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="It's spam" xml:space="preserve">
|
||||
<source>It's spam</source>
|
||||
<target>Es spam</target>
|
||||
|
||||
<note>Button for user to report that the account or content has spam.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="LNLink" xml:space="preserve">
|
||||
<source>LNLink</source>
|
||||
<target>LNLink</target>
|
||||
@@ -620,12 +493,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Button to complete account creation and start using the app.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="LibreTranslate Translations" xml:space="preserve">
|
||||
<source>LibreTranslate Translations</source>
|
||||
<target>Traducciones de LibreTranslate</target>
|
||||
|
||||
<note>Section title for selecting the server that hosts the LibreTranslate machine translation API.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Lightning Address or LNURL" xml:space="preserve">
|
||||
<source>Lightning Address or LNURL</source>
|
||||
<target>Dirección de Lightning o LNURL</target>
|
||||
@@ -657,7 +524,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Alert for logging out the user.
|
||||
Button for logging out the user.
|
||||
Button to close the alert that informs that the current account has been deleted.</note>
|
||||
Button to logout the user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Make sure your nsec account key is saved before you logout or you will lose access to this account" xml:space="preserve">
|
||||
<source>Make sure your nsec account key is saved before you logout or you will lose access to this account</source>
|
||||
@@ -677,28 +544,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Label for NIP-05 Verification section of user profile form.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="No" xml:space="preserve">
|
||||
<source>No</source>
|
||||
|
||||
<note>Button to cancel out of posting a note after being alerted that it looks like they might be posting a private key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="No block list found, create a new one? This will overwrite any previous block lists." xml:space="preserve">
|
||||
<source>No block list found, create a new one? This will overwrite any previous block lists.</source>
|
||||
<target>No se encontró una lista de bloqueo. ¿Crear una nueva? Esto sobrescribirá las listas de bloqueo anteriores.</target>
|
||||
|
||||
<note>Alert message prompt that asks if the user wants to create a new block list, overwriting previous block lists.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="None" xml:space="preserve">
|
||||
<source>None</source>
|
||||
<target>Ninguno</target>
|
||||
|
||||
<note>Dropdown option for selecting no translation server.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Note contains "nsec1" private key. Are you sure?" xml:space="preserve">
|
||||
<source>Note contains "nsec1" private key. Are you sure?</source>
|
||||
|
||||
<note>Alert user that they might be attempting to paste a private key and ask them to confirm.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Nothing to see here. Check back later!" xml:space="preserve">
|
||||
<source>Nothing to see here. Check back later!</source>
|
||||
<target>Nada para ver aquí. ¡Vuelve a consultar luego!</target>
|
||||
@@ -711,12 +556,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Navigation title for notifications.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Nudity or explicit content" xml:space="preserve">
|
||||
<source>Nudity or explicit content</source>
|
||||
<target>Desnudos o contenido explícito</target>
|
||||
|
||||
<note>Button for user to report that the account or content has nudity or explicit content.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Pay" xml:space="preserve">
|
||||
<source>Pay</source>
|
||||
<target>Pagar</target>
|
||||
@@ -741,12 +580,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Button to post a note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Post from a user you've blocked" xml:space="preserve">
|
||||
<source>Post from a user you've blocked</source>
|
||||
<target>Publicación de un usuario que bloqueaste</target>
|
||||
|
||||
<note>Text to indicate that what is being shown is a post from a user who has been blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Posts" xml:space="preserve">
|
||||
<source>Posts</source>
|
||||
<target>Publicaciones</target>
|
||||
@@ -769,6 +602,12 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<source>Private Key</source>
|
||||
<target>Clave privada</target>
|
||||
|
||||
<note>Label to indicate that the text below is the user's private key used by only the user themself as a secret to login to access their account.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="PrivateKey" xml:space="preserve">
|
||||
<source>PrivateKey</source>
|
||||
<target>ClavePrivada</target>
|
||||
|
||||
<note>Title of the secure field that holds the user's private key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Profile" xml:space="preserve">
|
||||
@@ -819,12 +658,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Section title for recommend relay servers that could be added as part of configuration</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reject" xml:space="preserve">
|
||||
<source>Reject</source>
|
||||
<target>Rechazar</target>
|
||||
|
||||
<note>Button to reject the end user license agreement, which disallows the user from being let into the app.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Relay" xml:space="preserve">
|
||||
<source>Relay</source>
|
||||
<target>Relé</target>
|
||||
@@ -835,20 +668,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<source>Relays</source>
|
||||
<target>Relés</target>
|
||||
|
||||
<note>Sidebar menu label for Relay servers view
|
||||
Sidebar menu label for Relays view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Relays have been notified and clients will be able to use this information to filter content. Thank you!" xml:space="preserve">
|
||||
<source>Relays have been notified and clients will be able to use this information to filter content. Thank you!</source>
|
||||
<target>Se notificó a los relés, por lo que los clientes podrán usar esta información para filtrar contenido. ¡Gracias!</target>
|
||||
|
||||
<note>Description of what was done as a result of sending a report to relay servers.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Remove all" xml:space="preserve">
|
||||
<source>Remove all</source>
|
||||
<target>Eliminar todo</target>
|
||||
|
||||
<note>Button label to remove all participants from a note reply.</note>
|
||||
<note>Sidebar menu label for Relay servers view</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reply to self" xml:space="preserve">
|
||||
<source>Reply to self</source>
|
||||
@@ -868,25 +688,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Indicating that the user is replying to the following listed people.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Report" xml:space="preserve">
|
||||
<source>Report</source>
|
||||
<target>Reportar</target>
|
||||
|
||||
<note>Button to report a profile.
|
||||
Context menu option for reporting content.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Report ID:" xml:space="preserve">
|
||||
<source>Report ID:</source>
|
||||
<target>Identificador de reporte:</target>
|
||||
|
||||
<note>Label indicating that the text underneath is the identifier of the report that was sent to relay servers.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Report sent!" xml:space="preserve">
|
||||
<source>Report sent!</source>
|
||||
<target>¡Reporte enviado!</target>
|
||||
|
||||
<note>Message indicating that a report was successfully sent to relay servers.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Repost" xml:space="preserve">
|
||||
<source>Repost</source>
|
||||
<target>Republicar</target>
|
||||
@@ -900,17 +701,11 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Text indicating that the post was reposted (i.e. re-shared).</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reposts" xml:space="preserve">
|
||||
<source>Reposts</source>
|
||||
<target>Republicaciones</target>
|
||||
<trans-unit id="Reset" xml:space="preserve">
|
||||
<source>Reset</source>
|
||||
<target>Reiniciar</target>
|
||||
|
||||
<note>Navigation bar title for Reposts view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Requests" xml:space="preserve">
|
||||
<source>Requests</source>
|
||||
<target>Solicitudes</target>
|
||||
|
||||
<note>Picker option for DM selector for seeing only message requests (DMs that someone else sent the user which has not been responded to yet). DM is the English abbreviation for Direct Message.</note>
|
||||
<note>Section title for resetting the user</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Retry" xml:space="preserve">
|
||||
<source>Retry</source>
|
||||
@@ -950,7 +745,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="Search..." xml:space="preserve">
|
||||
<source>Search...</source>
|
||||
<target>Buscar...</target>
|
||||
<target>Búsqueda...</target>
|
||||
|
||||
<note>Placeholder text to prompt entry of search query.</note>
|
||||
</trans-unit>
|
||||
@@ -978,12 +773,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Text prompt for user to send a message to the other user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Server" xml:space="preserve">
|
||||
<source>Server</source>
|
||||
<target>Servidor</target>
|
||||
|
||||
<note>Prompt selection of LibreTranslate server to perform machine translations on notes</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Settings" xml:space="preserve">
|
||||
<source>Settings</source>
|
||||
<target>Configuración</target>
|
||||
@@ -995,21 +784,13 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<source>Share</source>
|
||||
<target>Compartir</target>
|
||||
|
||||
<note>Button to share an image.
|
||||
Button to share the link to a profile.</note>
|
||||
<note>Button to share an image.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show" xml:space="preserve">
|
||||
<source>Show</source>
|
||||
<target>Mostrar</target>
|
||||
|
||||
<note>Button to show a post from a user who has been blocked.
|
||||
Toggle to show or hide user's secret account login key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show API Key" xml:space="preserve">
|
||||
<source>Show API Key</source>
|
||||
<target>Mostrar clave de API</target>
|
||||
|
||||
<note>Button to hide the LibreTranslate server API key.</note>
|
||||
<note>Toggle to show or hide user's secret account login key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show wallet selector" xml:space="preserve">
|
||||
<source>Show wallet selector</source>
|
||||
@@ -1029,18 +810,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Dropdown option label for Lightning wallet, Strike.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Thanks!" xml:space="preserve">
|
||||
<source>Thanks!</source>
|
||||
<target>¡Gracias!</target>
|
||||
|
||||
<note>Button to close out of alert that informs that the action to block a user was successful.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="They are impersonating someone" xml:space="preserve">
|
||||
<source>They are impersonating someone</source>
|
||||
<target>Está suplantando a alguien</target>
|
||||
|
||||
<note>Button for user to report that the account is impersonating someone.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="This is a public key, you will not be able to make posts 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 posts or interact in any way. This is used for viewing accounts from their perspective.</source>
|
||||
<target>Esta es una clave pública, por lo que no podrás hacer publicaciones ni interactuar de ningún modo. Se usa para ver cuentas desde su perspectiva.</target>
|
||||
@@ -1061,7 +830,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="This is your secret account key. You need this to access your account. Don't share this with anyone! Save it in a password manager and keep it safe!" xml:space="preserve">
|
||||
<source>This is your secret account key. You need this to access your account. Don't share this with anyone! Save it in a password manager and keep it safe!</source>
|
||||
<target>Esta es tu clave de cuenta secreta, que necesitas para acceder a tu cuenta. ¡No la compartas con nadie! Guárdala en un administrador de contraseñas y protégela.</target>
|
||||
<target>Esta es tu clave de cuenta secreta, que necesitas para acceder a tu cuenta. ¡No la compartas con nadie! Guárdala en un administrador de contraseñas y protégela!</target>
|
||||
|
||||
<note>Label to describe that a private key is the user's secret account key and what they should do with it.</note>
|
||||
</trans-unit>
|
||||
@@ -1072,40 +841,12 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<note>Navigation bar title for note thread.
|
||||
Navigation bar title for threaded event detail view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Translate Note" xml:space="preserve">
|
||||
<source>Translate Note</source>
|
||||
<target>Traducir nota</target>
|
||||
|
||||
<note>Button to translate note from different language.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Translated from (lang)" xml:space="preserve">
|
||||
<source>Translated from (lang)</source>
|
||||
<target>Traducida del (lang)</target>
|
||||
|
||||
<note>Button to indicate that the note has been translated from a different language.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Translating from (lang)..." xml:space="preserve">
|
||||
<source>Translating from (lang)...</source>
|
||||
|
||||
<note>Button to indicate that the note is in the process of being translated from a different language.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Type DELETE to delete" xml:space="preserve">
|
||||
<source>Type DELETE to delete</source>
|
||||
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Type your post here..." xml:space="preserve">
|
||||
<source>Type your post here...</source>
|
||||
<target>Escribe tu publicación aquí...</target>
|
||||
<target>Ingresa tu publicación aquí...</target>
|
||||
|
||||
<note>Text box prompt to ask user to type their post.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="URL" xml:space="preserve">
|
||||
<source>URL</source>
|
||||
<target>URL</target>
|
||||
|
||||
<note>Example URL to LibreTranslate server</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Unfollow" xml:space="preserve">
|
||||
<source>Unfollow</source>
|
||||
<target>Dejar de seguir</target>
|
||||
@@ -1130,18 +871,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Text to indicate that the button next to it is in a state that will unfollow a profile when tapped.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="User blocked" xml:space="preserve">
|
||||
<source>User blocked</source>
|
||||
<target>Usuario bloqueado</target>
|
||||
|
||||
<note>Alert message to indicate the user has been blocked</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="User has been blocked" xml:space="preserve">
|
||||
<source>User has been blocked</source>
|
||||
<target>Se bloqueó al usuario</target>
|
||||
|
||||
<note>Alert message that informs a user was blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Username" xml:space="preserve">
|
||||
<source>Username</source>
|
||||
<target>Nombre de usuario</target>
|
||||
@@ -1155,18 +884,18 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Sidebar menu label for Wallet view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Wallet Of Satoshi" xml:space="preserve">
|
||||
<source>Wallet Of Satoshi</source>
|
||||
<target>Wallet Of Satoshi</target>
|
||||
|
||||
<note>Dropdown option label for Lightning wallet, Wallet Of Satoshi.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Wallet Selector" xml:space="preserve">
|
||||
<source>Wallet Selector</source>
|
||||
<target>Selección de billetera</target>
|
||||
|
||||
<note>Section title for selection of wallet.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Wallet of Satoshi" xml:space="preserve">
|
||||
<source>Wallet of Satoshi</source>
|
||||
<target>Wallet of Satoshi</target>
|
||||
|
||||
<note>Dropdown option label for Lightning wallet, Wallet of Satoshi.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Website" xml:space="preserve">
|
||||
<source>Website</source>
|
||||
<target>Sitio web</target>
|
||||
@@ -1185,35 +914,12 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Text to welcome user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="What do you want to report?" xml:space="preserve">
|
||||
<source>What do you want to report?</source>
|
||||
<target>¿Qué quieres reportar?</target>
|
||||
|
||||
<note>Header text to prompt user what issue they want to report.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Yes, Overwrite" xml:space="preserve">
|
||||
<source>Yes, Overwrite</source>
|
||||
<target>Sí, sobrescribir</target>
|
||||
|
||||
<note>Text of button that confirms to overwrite the existing mutelist.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Yes, Post with Private Key" xml:space="preserve">
|
||||
<source>Yes, Post with Private Key</source>
|
||||
|
||||
<note>Button to proceed with posting a note even though it looks like they might be posting a private key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Your Name" xml:space="preserve">
|
||||
<source>Your Name</source>
|
||||
<target>Tu nombre</target>
|
||||
|
||||
<note>Label for Your Name section of user profile form.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Your report will be sent to the relays you are connected to" xml:space="preserve">
|
||||
<source>Your report will be sent to the relays you are connected to</source>
|
||||
<target>El reporte se enviará a los relés con los que tengas conexión</target>
|
||||
|
||||
<note>Footer text to inform user what will happen when the report is submitted.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Zebedee" xml:space="preserve">
|
||||
<source>Zebedee</source>
|
||||
<target>Zebedee</target>
|
||||
@@ -1228,13 +934,13 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="collapsed_event_view_other_notes" translate="no" xml:space="preserve">
|
||||
<source>collapsed_event_view_other_notes</source>
|
||||
<target>collapsed_event_view_other_notes</target>
|
||||
<target>evento_colapsado_ver_otras_notas</target>
|
||||
|
||||
<note>Text to indicate that the thread was collapsed and that there are other notes to view if tapped. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="followers_count" translate="no" xml:space="preserve">
|
||||
<source>followers_count</source>
|
||||
<target>followers_count</target>
|
||||
<target>recuento_de_seguidores</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many people are following a user. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
@@ -1282,13 +988,13 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="reactions_count" translate="no" xml:space="preserve">
|
||||
<source>reactions_count</source>
|
||||
<target>reactions_count</target>
|
||||
<target>recuento_de_reacciones</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many reactions there are on a post. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="relays_count" translate="no" xml:space="preserve">
|
||||
<source>relays_count</source>
|
||||
<target>relays_count</target>
|
||||
<target>recuento_de_relés</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many relay servers a user is connected. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
@@ -1322,6 +1028,12 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Amount of sats. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="tips_count" translate="no" xml:space="preserve">
|
||||
<source>tips_count</source>
|
||||
<target>tips_count</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="u{00A0}" xml:space="preserve">
|
||||
<source>u{00A0}</source>
|
||||
<target>u{00A0}</target>
|
||||
@@ -1330,7 +1042,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="wss://some.relay.com" xml:space="preserve">
|
||||
<source>wss://some.relay.com</source>
|
||||
<target>wss://algun.rele.com</target>
|
||||
<target>wss://algún.relé.com</target>
|
||||
|
||||
<note>Placeholder example for relay server address.</note>
|
||||
</trans-unit>
|
||||
@@ -1340,18 +1052,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>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.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="zaps_count" translate="no" xml:space="preserve">
|
||||
<source>zaps_count</source>
|
||||
<target>zaps_count</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="⚡️ %@" xml:space="preserve">
|
||||
<source>⚡️ %@</source>
|
||||
<target>⚡️ %@</target>
|
||||
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
<file original="damus/en-US.lproj/Localizable.stringsdict" source-language="en-US" target-language="es-419" datatype="plaintext">
|
||||
@@ -1511,21 +1211,23 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Amount of sats.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/zaps_count:dict/NSStringLocalizedFormatKey:dict/:string" xml:space="preserve">
|
||||
<source>%#@ZAPS@</source>
|
||||
<target>%#@ZAPS@</target>
|
||||
<trans-unit id="/tips_count:dict/NSStringLocalizedFormatKey:dict/:string" xml:space="preserve">
|
||||
<source>%#@TIPS@</source>
|
||||
<target>%#@TIPS@</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post.</note>
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/zaps_count:dict/ZAPS:dict/one:dict/:string" xml:space="preserve">
|
||||
<source>Zap</source>
|
||||
<trans-unit id="/tips_count:dict/TIPS:dict/one:dict/:string" xml:space="preserve">
|
||||
<source>Tip</source>
|
||||
<target>Propina</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post.</note>
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/zaps_count:dict/ZAPS:dict/other:dict/:string" xml:space="preserve">
|
||||
<source>Zaps</source>
|
||||
<trans-unit id="/tips_count:dict/TIPS:dict/other:dict/:string" xml:space="preserve">
|
||||
<source>Tips</source>
|
||||
<target>Propinas</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post.</note>
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post.</note>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,8 @@
|
||||
<note>Bundle name</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="NSPhotoLibraryAddUsageDescription" xml:space="preserve">
|
||||
<source>Granting Damus access to your photos allows you to save images.</source>
|
||||
<source>"Granting Damus access to your photo library allows you to save photos.</source>
|
||||
<target>Damus'a fotoğraf kitaplığınıza erişim izni vermek, fotoğrafları kaydetmenize olanak tanır.</target>
|
||||
|
||||
<note>Privacy - Photo Library Additions Usage Description</note>
|
||||
</trans-unit>
|
||||
@@ -37,20 +38,16 @@
|
||||
<source>%@</source>
|
||||
<target>%@</target>
|
||||
|
||||
<note>Abbreviated version of a nostr public key.</note>
|
||||
<note>Amount of time that has passed since reply quote event occurred.
|
||||
Abbreviated version of a nostr public key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%@ %@" xml:space="preserve">
|
||||
<source>%@ %@</source>
|
||||
<target>%@ %@</target>
|
||||
|
||||
<note>Sentence composed of 2 variables to describe how many zap payments there are on a post. In source English, the first variable is the number of zap payments, and the second variable is 'Zap' or 'Zaps'.
|
||||
<note>Sentence composed of 2 variables to describe how many reposts. In source English, the first variable is the number of reposts, and the second variable is 'Repost' or 'Reposts'.
|
||||
Sentence composed of 2 variables to describe how many profiles a user is following. In source English, the first variable is the number of profiles being followed, and the second variable is 'Following'.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%@ has been blocked" xml:space="preserve">
|
||||
<source>%@ has been blocked</source>
|
||||
|
||||
<note>Alert message that informs a user was blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction." xml:space="preserve">
|
||||
<source>%@. Creating an account doesn't require a phone number, email or name. Get started right away with zero friction.</source>
|
||||
<target>%@. Hesap oluşturmak için telefon numarası, e-posta veya isim gerekmez. Vakit kaybetmeden hemen hemen başlayın.</target>
|
||||
@@ -73,7 +70,7 @@ Sentence composed of 2 variables to describe how many profiles a user is followi
|
||||
<source>%lld</source>
|
||||
<target>%lld</target>
|
||||
|
||||
<note>Number of zap payments on a post.
|
||||
<note>Number of reposts.
|
||||
Number of profiles a user is following.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="%lld/%lld" xml:space="preserve">
|
||||
@@ -88,8 +85,9 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Description of how the nip05 identifier would be used for verification.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="'%@' is an invalid NIP-05 identifier. It should look like an email." xml:space="preserve">
|
||||
<source>'%@' is an invalid NIP-05 identifier. It should look like an email.</source>
|
||||
<trans-unit id="'%@' is an invalid nip05 identifier. It should look like an email." xml:space="preserve">
|
||||
<source>'%@' is an invalid nip05 identifier. It should look like an email.</source>
|
||||
<target>'%@' geçersiz bir nip05 tanımlayıcısı. Tanımlayıcı, e-posta gibi gözükmeli. </target>
|
||||
|
||||
<note>Description of why the nip05 identifier is invalid.</note>
|
||||
</trans-unit>
|
||||
@@ -117,11 +115,6 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Prefix character to username.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="API Key (optional)" xml:space="preserve">
|
||||
<source>API Key (optional)</source>
|
||||
|
||||
<note>Example URL to LibreTranslate server</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="About" xml:space="preserve">
|
||||
<source>About</source>
|
||||
<target>Hakkında</target>
|
||||
@@ -140,22 +133,12 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Placeholder text for About Me description.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Accept" xml:space="preserve">
|
||||
<source>Accept</source>
|
||||
|
||||
<note>Button to accept the end user license agreement before being allowed into the app.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Account ID" xml:space="preserve">
|
||||
<source>Account ID</source>
|
||||
<target>Hesap Kimliği</target>
|
||||
|
||||
<note>Label to indicate the public ID of the account.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Actions" xml:space="preserve">
|
||||
<source>Actions</source>
|
||||
|
||||
<note>Title for confirmation dialog to either share, report, or block a profile.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Add" xml:space="preserve">
|
||||
<source>Add</source>
|
||||
<target>Ekle</target>
|
||||
@@ -169,11 +152,6 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Label for section for adding a relay server.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Add all" xml:space="preserve">
|
||||
<source>Add all</source>
|
||||
|
||||
<note>Button label to re-add all original participants as profiles to reply to in a note</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Any" xml:space="preserve">
|
||||
<source>Any</source>
|
||||
<target>Herhangi</target>
|
||||
@@ -216,33 +194,6 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Dropdown option label for Lightning wallet, Blixt Wallet</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Block" xml:space="preserve">
|
||||
<source>Block</source>
|
||||
|
||||
<note>Alert button to block a user.
|
||||
Button to block a profile.
|
||||
Context menu option for blocking users.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Block %@?" xml:space="preserve">
|
||||
<source>Block %@?</source>
|
||||
|
||||
<note>Alert message prompt to ask if a user should be blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Block User" xml:space="preserve">
|
||||
<source>Block User</source>
|
||||
|
||||
<note>Title of alert for blocking a user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Blocked" xml:space="preserve">
|
||||
<source>Blocked</source>
|
||||
|
||||
<note>Sidebar menu label for Profile view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Blocked Users" xml:space="preserve">
|
||||
<source>Blocked Users</source>
|
||||
|
||||
<note>Navigation title of view to see list of blocked users.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Blue Wallet" xml:space="preserve">
|
||||
<source>Blue Wallet</source>
|
||||
<target>Blue Wallet</target>
|
||||
@@ -265,12 +216,9 @@ Number of profiles a user is following.</note>
|
||||
<source>Cancel</source>
|
||||
<target>İptal Et</target>
|
||||
|
||||
<note>Alert button to cancel out of alert for blocking a user.
|
||||
Button to cancel out of alert that creates a new mutelist.
|
||||
Button to cancel out of posting a note.
|
||||
<note>Button to cancel out of posting a note.
|
||||
Button to cancel out of reposting a post.
|
||||
Button to cancel out of view adding user inputted relay.
|
||||
Cancel deleting the user.
|
||||
Cancel out of logging out the user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Cash App" xml:space="preserve">
|
||||
@@ -346,19 +294,15 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Context menu option for copying the JSON text from the note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Copy Report ID" xml:space="preserve">
|
||||
<source>Copy Report ID</source>
|
||||
|
||||
<note>Button to copy report ID.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Copy Text" xml:space="preserve">
|
||||
<source>Copy Text</source>
|
||||
<target>Metni Kopyala</target>
|
||||
|
||||
<note>Context menu option for copying the text from an note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Copy User Pubkey" xml:space="preserve">
|
||||
<source>Copy User Pubkey</source>
|
||||
<trans-unit id="Copy User ID" xml:space="preserve">
|
||||
<source>Copy User ID</source>
|
||||
<target>Hesap Kimliğini Kopyala</target>
|
||||
|
||||
<note>Context menu option for copying the ID of the user who created the note.</note>
|
||||
</trans-unit>
|
||||
@@ -368,11 +312,6 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Title of section for copying a Lightning invoice identifier.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Could not find user to block..." xml:space="preserve">
|
||||
<source>Could not find user to block...</source>
|
||||
|
||||
<note>Alert message to indicate that the blocked user could not be found.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Create" xml:space="preserve">
|
||||
<source>Create</source>
|
||||
<target>Yarat</target>
|
||||
@@ -385,27 +324,17 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Button to create an account.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Create new mutelist" xml:space="preserve">
|
||||
<source>Create new mutelist</source>
|
||||
|
||||
<note>Title of alert prompting the user to create a new mutelist.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Creator(s) of Bitcoin. Absolute legend." xml:space="preserve">
|
||||
<source>Creator(s) of Bitcoin. Absolute legend.</source>
|
||||
<target>Bitcoin'in Yaratıcısı. Kral Adam.</target>
|
||||
|
||||
<note>Example description about Bitcoin creator(s), Satoshi Nakamoto.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Custom" xml:space="preserve">
|
||||
<source>Custom</source>
|
||||
<trans-unit id="DM" xml:space="preserve">
|
||||
<source>DM</source>
|
||||
<target>DM</target>
|
||||
|
||||
<note>Dropdown option for selecting a custom translation server.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="DMs" xml:space="preserve">
|
||||
<source>DMs</source>
|
||||
|
||||
<note>Navigation title for DMs view, where DM is the English abbreviation for Direct Message.
|
||||
Navigation title for view of DMs, where DM is an English abbreviation for Direct Message.</note>
|
||||
<note>Navigation title for DM view, which is the English abbreviation for Direct Message.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Damus" xml:space="preserve">
|
||||
<source>Damus</source>
|
||||
@@ -423,21 +352,7 @@ Number of profiles a user is following.</note>
|
||||
<source>Delete</source>
|
||||
<target>Sil</target>
|
||||
|
||||
<note>Button for deleting the users account.
|
||||
Button to delete a relay server that the user connects to.
|
||||
Button to remove a user from their blocklist.
|
||||
Section title for deleting the user</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Delete Account" xml:space="preserve">
|
||||
<source>Delete Account</source>
|
||||
|
||||
<note>Alert for deleting the users account.
|
||||
Button to delete the user's account.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Deleted Account" xml:space="preserve">
|
||||
<source>Deleted Account</source>
|
||||
|
||||
<note>Alert message to indicate this is a deleted account</note>
|
||||
<note>Button to delete a relay server that the user connects to.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Dismiss" xml:space="preserve">
|
||||
<source>Dismiss</source>
|
||||
@@ -457,11 +372,6 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Button to dismiss wallet selection view for paying Lightning invoice.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="EULA" xml:space="preserve">
|
||||
<source>EULA</source>
|
||||
|
||||
<note>Label indicating that the below text is the EULA, an acronym for End User License Agreement.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Earn Money" xml:space="preserve">
|
||||
<source>Earn Money</source>
|
||||
<target>Para Kazan</target>
|
||||
@@ -474,17 +384,18 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Button to edit user's profile.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Edit participants" xml:space="preserve">
|
||||
<source>Edit participants</source>
|
||||
|
||||
<note>Text indicating that the view is used for editing which participants are replied to in a note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Encrypted" xml:space="preserve">
|
||||
<source>Encrypted</source>
|
||||
<target>Şifreli</target>
|
||||
|
||||
<note>Heading indicating that this application keeps private messaging end-to-end encrypted.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Encrypted DMs" xml:space="preserve">
|
||||
<source>Encrypted DMs</source>
|
||||
<target>Şifreli DM'ler</target>
|
||||
|
||||
<note>Navigation title for view of encrypted DMs, where DM is an English abbreviation for Direct Message.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Enter your account key to login:" xml:space="preserve">
|
||||
<source>Enter your account key to login:</source>
|
||||
<target>Giriş yapmak için hesap anahtarını gir:</target>
|
||||
@@ -497,6 +408,12 @@ Number of profiles a user is following.</note>
|
||||
|
||||
<note>Error message indicating why saving keys failed.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Filter State" xml:space="preserve">
|
||||
<source>Filter State</source>
|
||||
<target>Filtre Durumu</target>
|
||||
|
||||
<note>Filter state for seeing either only posts, or posts & replies.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Follow" xml:space="preserve">
|
||||
<source>Follow</source>
|
||||
<target>Takip Et</target>
|
||||
@@ -546,38 +463,18 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Navigation link to go to profile.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Hide" xml:space="preserve">
|
||||
<source>Hide</source>
|
||||
|
||||
<note>Button to hide a post from a user who has been blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Hide API Key" xml:space="preserve">
|
||||
<source>Hide API Key</source>
|
||||
|
||||
<note>Button to hide the LibreTranslate server API key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Home" xml:space="preserve">
|
||||
<source>Home</source>
|
||||
<target>Ev</target>
|
||||
|
||||
<note>Navigation bar title for Home view where posts and replies appear from those who the user is following.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Illegal content" xml:space="preserve">
|
||||
<source>Illegal content</source>
|
||||
|
||||
<note>Button for user to report that the account or content has illegal content.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Invalid key" xml:space="preserve">
|
||||
<source>Invalid key</source>
|
||||
<target>Hatalı anahtar</target>
|
||||
|
||||
<note>Error message indicating that an invalid account key was entered for login.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="It's spam" xml:space="preserve">
|
||||
<source>It's spam</source>
|
||||
|
||||
<note>Button for user to report that the account or content has spam.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="LNLink" xml:space="preserve">
|
||||
<source>LNLink</source>
|
||||
<target>LNLink</target>
|
||||
@@ -596,11 +493,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Button to complete account creation and start using the app.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="LibreTranslate Translations" xml:space="preserve">
|
||||
<source>LibreTranslate Translations</source>
|
||||
|
||||
<note>Section title for selecting the server that hosts the LibreTranslate machine translation API.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Lightning Address or LNURL" xml:space="preserve">
|
||||
<source>Lightning Address or LNURL</source>
|
||||
<target>Lightning Adresi ya da LNURL</target>
|
||||
@@ -632,7 +524,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Alert for logging out the user.
|
||||
Button for logging out the user.
|
||||
Button to close the alert that informs that the current account has been deleted.</note>
|
||||
Button to logout the user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Make sure your nsec account key is saved before you logout or you will lose access to this account" xml:space="preserve">
|
||||
<source>Make sure your nsec account key is saved before you logout or you will lose access to this account</source>
|
||||
@@ -652,26 +544,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Label for NIP-05 Verification section of user profile form.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="No" xml:space="preserve">
|
||||
<source>No</source>
|
||||
|
||||
<note>Button to cancel out of posting a note after being alerted that it looks like they might be posting a private key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="No block list found, create a new one? This will overwrite any previous block lists." xml:space="preserve">
|
||||
<source>No block list found, create a new one? This will overwrite any previous block lists.</source>
|
||||
|
||||
<note>Alert message prompt that asks if the user wants to create a new block list, overwriting previous block lists.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="None" xml:space="preserve">
|
||||
<source>None</source>
|
||||
|
||||
<note>Dropdown option for selecting no translation server.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Note contains "nsec1" private key. Are you sure?" xml:space="preserve">
|
||||
<source>Note contains "nsec1" private key. Are you sure?</source>
|
||||
|
||||
<note>Alert user that they might be attempting to paste a private key and ask them to confirm.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Nothing to see here. Check back later!" xml:space="preserve">
|
||||
<source>Nothing to see here. Check back later!</source>
|
||||
<target>Görülecek bir şey yok. Daha sonra tekrar kontrol et!</target>
|
||||
@@ -684,11 +556,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Navigation title for notifications.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Nudity or explicit content" xml:space="preserve">
|
||||
<source>Nudity or explicit content</source>
|
||||
|
||||
<note>Button for user to report that the account or content has nudity or explicit content.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Pay" xml:space="preserve">
|
||||
<source>Pay</source>
|
||||
<target>Öde</target>
|
||||
@@ -713,11 +580,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Button to post a note.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Post from a user you've blocked" xml:space="preserve">
|
||||
<source>Post from a user you've blocked</source>
|
||||
|
||||
<note>Text to indicate that what is being shown is a post from a user who has been blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Posts" xml:space="preserve">
|
||||
<source>Posts</source>
|
||||
<target>Gönderiler</target>
|
||||
@@ -740,6 +602,12 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<source>Private Key</source>
|
||||
<target>Özel Anahtar</target>
|
||||
|
||||
<note>Label to indicate that the text below is the user's private key used by only the user themself as a secret to login to access their account.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="PrivateKey" xml:space="preserve">
|
||||
<source>PrivateKey</source>
|
||||
<target>Özel Anahtar</target>
|
||||
|
||||
<note>Title of the secure field that holds the user's private key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Profile" xml:space="preserve">
|
||||
@@ -790,11 +658,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Section title for recommend relay servers that could be added as part of configuration</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reject" xml:space="preserve">
|
||||
<source>Reject</source>
|
||||
|
||||
<note>Button to reject the end user license agreement, which disallows the user from being let into the app.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Relay" xml:space="preserve">
|
||||
<source>Relay</source>
|
||||
<target>Röle</target>
|
||||
@@ -805,18 +668,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<source>Relays</source>
|
||||
<target>Röleler</target>
|
||||
|
||||
<note>Sidebar menu label for Relay servers view
|
||||
Sidebar menu label for Relays view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Relays have been notified and clients will be able to use this information to filter content. Thank you!" xml:space="preserve">
|
||||
<source>Relays have been notified and clients will be able to use this information to filter content. Thank you!</source>
|
||||
|
||||
<note>Description of what was done as a result of sending a report to relay servers.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Remove all" xml:space="preserve">
|
||||
<source>Remove all</source>
|
||||
|
||||
<note>Button label to remove all participants from a note reply.</note>
|
||||
<note>Sidebar menu label for Relay servers view</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reply to self" xml:space="preserve">
|
||||
<source>Reply to self</source>
|
||||
@@ -836,22 +688,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Indicating that the user is replying to the following listed people.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Report" xml:space="preserve">
|
||||
<source>Report</source>
|
||||
|
||||
<note>Button to report a profile.
|
||||
Context menu option for reporting content.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Report ID:" xml:space="preserve">
|
||||
<source>Report ID:</source>
|
||||
|
||||
<note>Label indicating that the text underneath is the identifier of the report that was sent to relay servers.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Report sent!" xml:space="preserve">
|
||||
<source>Report sent!</source>
|
||||
|
||||
<note>Message indicating that a report was successfully sent to relay servers.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Repost" xml:space="preserve">
|
||||
<source>Repost</source>
|
||||
<target>Yinele</target>
|
||||
@@ -865,15 +701,11 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Text indicating that the post was reposted (i.e. re-shared).</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Reposts" xml:space="preserve">
|
||||
<source>Reposts</source>
|
||||
<trans-unit id="Reset" xml:space="preserve">
|
||||
<source>Reset</source>
|
||||
<target>Sıfırla</target>
|
||||
|
||||
<note>Navigation bar title for Reposts view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Requests" xml:space="preserve">
|
||||
<source>Requests</source>
|
||||
|
||||
<note>Picker option for DM selector for seeing only message requests (DMs that someone else sent the user which has not been responded to yet). DM is the English abbreviation for Direct Message.</note>
|
||||
<note>Section title for resetting the user</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Retry" xml:space="preserve">
|
||||
<source>Retry</source>
|
||||
@@ -941,11 +773,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Text prompt for user to send a message to the other user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Server" xml:space="preserve">
|
||||
<source>Server</source>
|
||||
|
||||
<note>Prompt selection of LibreTranslate server to perform machine translations on notes</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Settings" xml:space="preserve">
|
||||
<source>Settings</source>
|
||||
<target>Ayarlar</target>
|
||||
@@ -957,20 +784,13 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<source>Share</source>
|
||||
<target>Paylaş</target>
|
||||
|
||||
<note>Button to share an image.
|
||||
Button to share the link to a profile.</note>
|
||||
<note>Button to share an image.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show" xml:space="preserve">
|
||||
<source>Show</source>
|
||||
<target>Göster</target>
|
||||
|
||||
<note>Button to show a post from a user who has been blocked.
|
||||
Toggle to show or hide user's secret account login key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show API Key" xml:space="preserve">
|
||||
<source>Show API Key</source>
|
||||
|
||||
<note>Button to hide the LibreTranslate server API key.</note>
|
||||
<note>Toggle to show or hide user's secret account login key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Show wallet selector" xml:space="preserve">
|
||||
<source>Show wallet selector</source>
|
||||
@@ -990,16 +810,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Dropdown option label for Lightning wallet, Strike.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Thanks!" xml:space="preserve">
|
||||
<source>Thanks!</source>
|
||||
|
||||
<note>Button to close out of alert that informs that the action to block a user was successful.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="They are impersonating someone" xml:space="preserve">
|
||||
<source>They are impersonating someone</source>
|
||||
|
||||
<note>Button for user to report that the account is impersonating someone.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="This is a public key, you will not be able to make posts 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 posts or interact in any way. This is used for viewing accounts from their perspective.</source>
|
||||
<target>Bu herkese açık bir anahtardır, herhangi bir şekilde gönderi yapamaz veya etkileşimde bulunamazsınız. Bu, hesapları kendi bakış açılarından görüntülemek için kullanılır.</target>
|
||||
@@ -1031,37 +841,12 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<note>Navigation bar title for note thread.
|
||||
Navigation bar title for threaded event detail view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Translate Note" xml:space="preserve">
|
||||
<source>Translate Note</source>
|
||||
|
||||
<note>Button to translate note from different language.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Translated from (lang)" xml:space="preserve">
|
||||
<source>Translated from (lang)</source>
|
||||
|
||||
<note>Button to indicate that the note has been translated from a different language.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Translating from (lang)..." xml:space="preserve">
|
||||
<source>Translating from (lang)...</source>
|
||||
|
||||
<note>Button to indicate that the note is in the process of being translated from a different language.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Type DELETE to delete" xml:space="preserve">
|
||||
<source>Type DELETE to delete</source>
|
||||
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Type your post here..." xml:space="preserve">
|
||||
<source>Type your post here...</source>
|
||||
<target>Gönderinizi buraya yazın...</target>
|
||||
|
||||
<note>Text box prompt to ask user to type their post.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="URL" xml:space="preserve">
|
||||
<source>URL</source>
|
||||
|
||||
<note>Example URL to LibreTranslate server</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Unfollow" xml:space="preserve">
|
||||
<source>Unfollow</source>
|
||||
<target>Takipten Çık</target>
|
||||
@@ -1086,16 +871,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Text to indicate that the button next to it is in a state that will unfollow a profile when tapped.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="User blocked" xml:space="preserve">
|
||||
<source>User blocked</source>
|
||||
|
||||
<note>Alert message to indicate the user has been blocked</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="User has been blocked" xml:space="preserve">
|
||||
<source>User has been blocked</source>
|
||||
|
||||
<note>Alert message that informs a user was blocked.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Username" xml:space="preserve">
|
||||
<source>Username</source>
|
||||
<target>Kullanıcı Adı</target>
|
||||
@@ -1109,18 +884,18 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Sidebar menu label for Wallet view.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Wallet Of Satoshi" xml:space="preserve">
|
||||
<source>Wallet Of Satoshi</source>
|
||||
<target>Wallet Of Satoshi</target>
|
||||
|
||||
<note>Dropdown option label for Lightning wallet, Wallet Of Satoshi.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Wallet Selector" xml:space="preserve">
|
||||
<source>Wallet Selector</source>
|
||||
<target>Cüzdan Seçici</target>
|
||||
|
||||
<note>Section title for selection of wallet.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Wallet of Satoshi" xml:space="preserve">
|
||||
<source>Wallet of Satoshi</source>
|
||||
<target>Wallet of Satoshi</target>
|
||||
|
||||
<note>Dropdown option label for Lightning wallet, Wallet of Satoshi.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Website" xml:space="preserve">
|
||||
<source>Website</source>
|
||||
<target>Websitesi</target>
|
||||
@@ -1139,32 +914,12 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Text to welcome user.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="What do you want to report?" xml:space="preserve">
|
||||
<source>What do you want to report?</source>
|
||||
|
||||
<note>Header text to prompt user what issue they want to report.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Yes, Overwrite" xml:space="preserve">
|
||||
<source>Yes, Overwrite</source>
|
||||
|
||||
<note>Text of button that confirms to overwrite the existing mutelist.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Yes, Post with Private Key" xml:space="preserve">
|
||||
<source>Yes, Post with Private Key</source>
|
||||
|
||||
<note>Button to proceed with posting a note even though it looks like they might be posting a private key.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Your Name" xml:space="preserve">
|
||||
<source>Your Name</source>
|
||||
<target>İsminiz</target>
|
||||
|
||||
<note>Label for Your Name section of user profile form.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Your report will be sent to the relays you are connected to" xml:space="preserve">
|
||||
<source>Your report will be sent to the relays you are connected to</source>
|
||||
|
||||
<note>Footer text to inform user what will happen when the report is submitted.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="Zebedee" xml:space="preserve">
|
||||
<source>Zebedee</source>
|
||||
<target>Zebedee</target>
|
||||
@@ -1191,7 +946,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="https://example.com/pic.jpg" xml:space="preserve">
|
||||
<source>https://example.com/pic.jpg</source>
|
||||
<target>https://ornek.com/resim.jpg</target>
|
||||
<target>https://example.com/pic.jpg</target>
|
||||
|
||||
<note>Placeholder example text for profile picture URL.</note>
|
||||
</trans-unit>
|
||||
@@ -1273,6 +1028,12 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Amount of sats. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="tips_count" translate="no" xml:space="preserve">
|
||||
<source>tips_count</source>
|
||||
<target>tips_count</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="u{00A0}" xml:space="preserve">
|
||||
<source>u{00A0}</source>
|
||||
<target>u{00A0}</target>
|
||||
@@ -1281,7 +1042,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="wss://some.relay.com" xml:space="preserve">
|
||||
<source>wss://some.relay.com</source>
|
||||
<target>wss://örnek.role.com</target>
|
||||
<target>wss://some.relay.com</target>
|
||||
|
||||
<note>Placeholder example for relay server address.</note>
|
||||
</trans-unit>
|
||||
@@ -1291,18 +1052,6 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>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.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="zaps_count" translate="no" xml:space="preserve">
|
||||
<source>zaps_count</source>
|
||||
<target>zaps_count</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post. (Key in .stringsdict)</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="⚡️ %@" xml:space="preserve">
|
||||
<source>⚡️ %@</source>
|
||||
<target>⚡️ %@</target>
|
||||
|
||||
<note>No comment provided by engineer.</note>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
<file original="damus/en-US.lproj/Localizable.stringsdict" source-language="en-US" target-language="tr-TR" datatype="plaintext">
|
||||
@@ -1312,7 +1061,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
<body>
|
||||
<trans-unit id="/collapsed_event_view_other_notes:dict/NOTES:dict/one:dict/:string" xml:space="preserve">
|
||||
<source>%d other note</source>
|
||||
<target>%d diğer not</target>
|
||||
<target>1%d diğer not</target>
|
||||
|
||||
<note>Text to indicate that the thread was collapsed and that there are other notes to view if tapped.</note>
|
||||
</trans-unit>
|
||||
@@ -1384,7 +1133,7 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
</trans-unit>
|
||||
<trans-unit id="/replying_to_one_and_others:dict/NSStringLocalizedFormatKey:dict/:string" xml:space="preserve">
|
||||
<source>Replying to %@%#@OTHERS@</source>
|
||||
<target>%@%#@OTHERS@'lara yanıt</target>
|
||||
<target>%@%#@OTHERS@'lara yanıt </target>
|
||||
|
||||
<note>Label to indicate that the user is replying to 1 user and others.</note>
|
||||
</trans-unit>
|
||||
@@ -1462,21 +1211,23 @@ Part of a larger sentence to describe how many profiles a user is following.</no
|
||||
|
||||
<note>Amount of sats.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/zaps_count:dict/NSStringLocalizedFormatKey:dict/:string" xml:space="preserve">
|
||||
<source>%#@ZAPS@</source>
|
||||
<target>%#@ZAPS@</target>
|
||||
<trans-unit id="/tips_count:dict/NSStringLocalizedFormatKey:dict/:string" xml:space="preserve">
|
||||
<source>%#@TIPS@</source>
|
||||
<target>%#@TIPS@</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post.</note>
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/zaps_count:dict/ZAPS:dict/one:dict/:string" xml:space="preserve">
|
||||
<source>Zap</source>
|
||||
<trans-unit id="/tips_count:dict/TIPS:dict/one:dict/:string" xml:space="preserve">
|
||||
<source>Tip</source>
|
||||
<target>Bahşiş</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post.</note>
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post.</note>
|
||||
</trans-unit>
|
||||
<trans-unit id="/zaps_count:dict/ZAPS:dict/other:dict/:string" xml:space="preserve">
|
||||
<source>Zaps</source>
|
||||
<trans-unit id="/tips_count:dict/TIPS:dict/other:dict/:string" xml:space="preserve">
|
||||
<source>Tips</source>
|
||||
<target>Bahşişler</target>
|
||||
|
||||
<note>Part of a larger sentence to describe how many zap payments there are on a post.</note>
|
||||
<note>Part of a larger sentence to describe how many tip payments there are on a post.</note>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
@@ -18,7 +18,6 @@
|
||||
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 */; };
|
||||
3AE45AF6297BB2E700C1D842 /* LibreTranslateServer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AE45AF5297BB2E700C1D842 /* LibreTranslateServer.swift */; };
|
||||
4C06670128FC7C5900038D2A /* RelayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C06670028FC7C5900038D2A /* RelayView.swift */; };
|
||||
4C06670428FC7EC500038D2A /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = 4C06670328FC7EC500038D2A /* Kingfisher */; };
|
||||
4C06670628FCB08600038D2A /* ImageCarousel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C06670528FCB08600038D2A /* ImageCarousel.swift */; };
|
||||
@@ -28,6 +27,7 @@
|
||||
4C0A3F8F280F640A000448DE /* ThreadModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0A3F8E280F640A000448DE /* ThreadModel.swift */; };
|
||||
4C0A3F91280F6528000448DE /* ChatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0A3F90280F6528000448DE /* ChatView.swift */; };
|
||||
4C0A3F93280F66F5000448DE /* ReplyMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0A3F92280F66F5000448DE /* ReplyMap.swift */; };
|
||||
4C0A3F95280F6C78000448DE /* ReplyQuoteView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0A3F94280F6C78000448DE /* ReplyQuoteView.swift */; };
|
||||
4C0A3F97280F8E02000448DE /* ThreadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0A3F96280F8E02000448DE /* ThreadView.swift */; };
|
||||
4C216F32286E388800040376 /* DMChatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C216F31286E388800040376 /* DMChatView.swift */; };
|
||||
4C216F34286F5ACD00040376 /* DMView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C216F33286F5ACD00040376 /* DMView.swift */; };
|
||||
@@ -69,8 +69,6 @@
|
||||
4C3BEFDA281DCA1400B3DE84 /* LikeCounter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3BEFD9281DCA1400B3DE84 /* LikeCounter.swift */; };
|
||||
4C3BEFDC281DCE6100B3DE84 /* Liked.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3BEFDB281DCE6100B3DE84 /* Liked.swift */; };
|
||||
4C3BEFE0281DE1ED00B3DE84 /* DamusState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3BEFDF281DE1ED00B3DE84 /* DamusState.swift */; };
|
||||
4C3D52B6298DB4E6001C5831 /* ZapEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3D52B5298DB4E6001C5831 /* ZapEvent.swift */; };
|
||||
4C3D52B8298DB5C6001C5831 /* TextEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3D52B7298DB5C6001C5831 /* TextEvent.swift */; };
|
||||
4C3EA63D28FF52D600C48A62 /* bolt11.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C3EA63C28FF52D600C48A62 /* bolt11.c */; };
|
||||
4C3EA64128FF553900C48A62 /* hash_u5.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C3EA64028FF553900C48A62 /* hash_u5.c */; };
|
||||
4C3EA64428FF558100C48A62 /* sha256.c in Sources */ = {isa = PBXBuildFile; fileRef = 4C3EA64328FF558100C48A62 /* sha256.c */; };
|
||||
@@ -87,7 +85,6 @@
|
||||
4C3EA67B28FF7B3900C48A62 /* InvoiceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3EA67A28FF7B3900C48A62 /* InvoiceTests.swift */; };
|
||||
4C3EA67D28FFBBA300C48A62 /* InvoicesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3EA67C28FFBBA200C48A62 /* InvoicesView.swift */; };
|
||||
4C3EA67F28FFC01D00C48A62 /* InvoiceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3EA67E28FFC01D00C48A62 /* InvoiceView.swift */; };
|
||||
4C42812C298C848200DBF26F /* TranslateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C42812B298C848200DBF26F /* TranslateView.swift */; };
|
||||
4C477C9E282C3A4800033AA3 /* TipCounter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C477C9D282C3A4800033AA3 /* TipCounter.swift */; };
|
||||
4C5C7E68284ED36500A22DF5 /* SearchHomeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C5C7E67284ED36500A22DF5 /* SearchHomeModel.swift */; };
|
||||
4C5C7E6A284EDE2E00A22DF5 /* SearchResultsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C5C7E69284EDE2E00A22DF5 /* SearchResultsView.swift */; };
|
||||
@@ -119,8 +116,6 @@
|
||||
4C987B57283FD07F0042CE38 /* FollowersModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C987B56283FD07F0042CE38 /* FollowersModel.swift */; };
|
||||
4C99737B28C92A9200E53835 /* ChatroomMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C99737A28C92A9200E53835 /* ChatroomMetadata.swift */; };
|
||||
4CA2EFA0280E37AC0044ACD8 /* TimelineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CA2EF9F280E37AC0044ACD8 /* TimelineView.swift */; };
|
||||
4CAAD8AD298851D000060CEA /* AccountDeletion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CAAD8AC298851D000060CEA /* AccountDeletion.swift */; };
|
||||
4CAAD8B029888AD200060CEA /* RelayConfigView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CAAD8AF29888AD200060CEA /* RelayConfigView.swift */; };
|
||||
4CACA9D5280C31E100D9BBE8 /* ReplyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CACA9D4280C31E100D9BBE8 /* ReplyView.swift */; };
|
||||
4CACA9DC280C38C000D9BBE8 /* Profiles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CACA9DB280C38C000D9BBE8 /* Profiles.swift */; };
|
||||
4CB55EF3295E5D59007FD187 /* RecommendedRelayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB55EF2295E5D59007FD187 /* RecommendedRelayView.swift */; };
|
||||
@@ -133,14 +128,7 @@
|
||||
4CB88393296F798300DC99E7 /* ReactionsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB88392296F798300DC99E7 /* ReactionsModel.swift */; };
|
||||
4CB88396296F7F8B00DC99E7 /* ReactionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB88395296F7F8B00DC99E7 /* ReactionView.swift */; };
|
||||
4CB8839A297322D200DC99E7 /* DMTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB88399297322D200DC99E7 /* DMTests.swift */; };
|
||||
4CB883A62975F83C00DC99E7 /* LNUrlPayRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB883A52975F83C00DC99E7 /* LNUrlPayRequest.swift */; };
|
||||
4CB883A82975FC1800DC99E7 /* Zaps.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB883A72975FC1800DC99E7 /* Zaps.swift */; };
|
||||
4CB883AA297612FF00DC99E7 /* ZapTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB883A9297612FF00DC99E7 /* ZapTests.swift */; };
|
||||
4CB883AE2976FA9300DC99E7 /* FormatTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB883AD2976FA9300DC99E7 /* FormatTests.swift */; };
|
||||
4CB883B0297705DD00DC99E7 /* ZapButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB883AF297705DD00DC99E7 /* ZapButton.swift */; };
|
||||
4CB883B6297730E400DC99E7 /* LNUrls.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CB883B5297730E400DC99E7 /* LNUrls.swift */; };
|
||||
4CBCA930297DB57F00EC6B2F /* WebsiteLink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CBCA92F297DB57F00EC6B2F /* WebsiteLink.swift */; };
|
||||
4CC7AAE7297EFA7B00430951 /* Zap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CC7AAE6297EFA7B00430951 /* Zap.swift */; };
|
||||
4CC7AAEB297F0AEC00430951 /* BuilderEventView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CC7AAEA297F0AEC00430951 /* BuilderEventView.swift */; };
|
||||
4CC7AAED297F0B9E00430951 /* Highlight.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CC7AAEC297F0B9E00430951 /* Highlight.swift */; };
|
||||
4CC7AAF0297F11C700430951 /* SelectedEventView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CC7AAEF297F11C700430951 /* SelectedEventView.swift */; };
|
||||
@@ -148,7 +136,6 @@
|
||||
4CC7AAF4297F18B400430951 /* ReplyDescription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CC7AAF3297F18B400430951 /* ReplyDescription.swift */; };
|
||||
4CC7AAF6297F1A6A00430951 /* EventBody.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CC7AAF5297F1A6A00430951 /* EventBody.swift */; };
|
||||
4CC7AAF8297F1CEE00430951 /* EventProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CC7AAF7297F1CEE00430951 /* EventProfile.swift */; };
|
||||
4CC7AAFA297F64AC00430951 /* EventMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CC7AAF9297F64AC00430951 /* EventMenu.swift */; };
|
||||
4CD7641B28A1641400B6928F /* EndBlock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CD7641A28A1641400B6928F /* EndBlock.swift */; };
|
||||
4CE4F8CD281352B30009DFBB /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4F8CC281352B30009DFBB /* Notifications.swift */; };
|
||||
4CE4F9DE2852768D00C00DD9 /* ConfigView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4F9DD2852768D00C00DD9 /* ConfigView.swift */; };
|
||||
@@ -170,30 +157,14 @@
|
||||
4CEE2AF7280B2DEA00AB5EEF /* ProfileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CEE2AF6280B2DEA00AB5EEF /* ProfileName.swift */; };
|
||||
4CEE2AF9280B2EAC00AB5EEF /* PowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CEE2AF8280B2EAC00AB5EEF /* PowView.swift */; };
|
||||
4CEE2B02280B39E800AB5EEF /* EventActionBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CEE2B01280B39E800AB5EEF /* EventActionBar.swift */; };
|
||||
4CF0ABD42980996B00D66079 /* Report.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF0ABD32980996B00D66079 /* Report.swift */; };
|
||||
4CF0ABD629817F5B00D66079 /* ReportView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF0ABD529817F5B00D66079 /* ReportView.swift */; };
|
||||
4CF0ABD82981980C00D66079 /* Lists.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF0ABD72981980C00D66079 /* Lists.swift */; };
|
||||
4CF0ABDC2981A19E00D66079 /* ListTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF0ABDB2981A19E00D66079 /* ListTests.swift */; };
|
||||
4CF0ABDE2981A69500D66079 /* MutelistModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF0ABDD2981A69500D66079 /* MutelistModel.swift */; };
|
||||
4CF0ABE12981A83900D66079 /* MutelistView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF0ABE02981A83900D66079 /* MutelistView.swift */; };
|
||||
4CF0ABE32981BC7D00D66079 /* UserView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF0ABE22981BC7D00D66079 /* UserView.swift */; };
|
||||
4CF0ABE52981EE0C00D66079 /* EULAView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF0ABE42981EE0C00D66079 /* EULAView.swift */; };
|
||||
4CF0ABE7298444FD00D66079 /* MutedEventView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF0ABE6298444FC00D66079 /* MutedEventView.swift */; };
|
||||
4CF0ABE929844AF100D66079 /* AnyCodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF0ABE829844AF100D66079 /* AnyCodable.swift */; };
|
||||
4CF0ABEC29844B4700D66079 /* AnyDecodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF0ABEB29844B4700D66079 /* AnyDecodable.swift */; };
|
||||
4CF0ABEE29844B5500D66079 /* AnyEncodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF0ABED29844B5500D66079 /* AnyEncodable.swift */; };
|
||||
4CF0ABF029857E9200D66079 /* Bech32Object.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF0ABEF29857E9200D66079 /* Bech32Object.swift */; };
|
||||
4CF0ABF62985CD5500D66079 /* UserSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF0ABF52985CD5500D66079 /* UserSearch.swift */; };
|
||||
4FE60CDD295E1C5E00105A1F /* Wallet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FE60CDC295E1C5E00105A1F /* Wallet.swift */; };
|
||||
5C513FBA297F72980072348F /* CustomPicker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C513FB9297F72980072348F /* CustomPicker.swift */; };
|
||||
5C513FCC2984ACA60072348F /* QRCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C513FCB2984ACA60072348F /* QRCodeView.swift */; };
|
||||
6439E014296790CF0020672B /* ProfileZoomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6439E013296790CF0020672B /* ProfileZoomView.swift */; };
|
||||
647D9A8D2968520300A295DE /* SideMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 647D9A8C2968520300A295DE /* SideMenuView.swift */; };
|
||||
64FBD06F296255C400D9D3B2 /* Theme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64FBD06E296255C400D9D3B2 /* Theme.swift */; };
|
||||
6C7DE41F2955169800E66263 /* Vault in Frameworks */ = {isa = PBXBuildFile; productRef = 6C7DE41E2955169800E66263 /* Vault */; };
|
||||
7C45AE6D297352F90031D7BC /* SVGKit in Frameworks */ = {isa = PBXBuildFile; productRef = 7C45AE6C297352F90031D7BC /* SVGKit */; };
|
||||
7C45AE6F297352F90031D7BC /* SVGKitSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 7C45AE6E297352F90031D7BC /* SVGKitSwift */; };
|
||||
7C45AE71297353390031D7BC /* KFImageModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C45AE70297353390031D7BC /* KFImageModel.swift */; };
|
||||
7C60CAEF298471A1009C80D6 /* CoreSVG.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C60CAEE298471A1009C80D6 /* CoreSVG.swift */; };
|
||||
7C902AE32981D55B002AB16E /* ZoomableScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C902AE22981D55B002AB16E /* ZoomableScrollView.swift */; };
|
||||
9609F058296E220800069BF3 /* BannerImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9609F057296E220800069BF3 /* BannerImageView.swift */; };
|
||||
BA693074295D649800ADDB87 /* UserSettingsStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA693073295D649800ADDB87 /* UserSettingsStore.swift */; };
|
||||
BAB68BED29543FA3007BA466 /* SelectWalletView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAB68BEC29543FA3007BA466 /* SelectWalletView.swift */; };
|
||||
@@ -226,45 +197,26 @@
|
||||
3169CAE5294E69C000EE4006 /* EmptyTimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyTimelineView.swift; sourceTree = "<group>"; };
|
||||
3169CAEC294FCCFC00EE4006 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Constants.swift; path = damus/Util/Constants.swift; sourceTree = SOURCE_ROOT; };
|
||||
31D2E846295218AF006D67F8 /* Shimmer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Shimmer.swift; sourceTree = "<group>"; };
|
||||
3A185A04297F2C3800F4BDC0 /* lv-LV */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "lv-LV"; path = "lv-LV.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||
3A185A05297F2C3800F4BDC0 /* lv-LV */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "lv-LV"; path = "lv-LV.lproj/Localizable.strings"; sourceTree = "<group>"; };
|
||||
3A185A06297F2C3800F4BDC0 /* lv-LV */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "lv-LV"; path = "lv-LV.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>"; };
|
||||
3A4F3320297CCFEE004B5F72 /* fr-FR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fr-FR"; path = "fr-FR.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||
3A4F3321297CCFEE004B5F72 /* fr-FR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fr-FR"; path = "fr-FR.lproj/Localizable.strings"; sourceTree = "<group>"; };
|
||||
3A4F3322297CCFEE004B5F72 /* fr-FR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "fr-FR"; path = "fr-FR.lproj/Localizable.stringsdict"; 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>"; };
|
||||
3A5CAE1F298DC0DB00B5334F /* zh-CN */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "zh-CN"; path = "zh-CN.lproj/Localizable.stringsdict"; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
3A96D41A298DA94500388A2A /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
3A96D41B298DA94500388A2A /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
3A96D41C298DA94500388A2A /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = nl; path = nl.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
|
||||
3A5EA10F297CCF6C00569477 /* de-AT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "de-AT"; path = "de-AT.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||
3A5EA110297CCF6C00569477 /* de-AT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "de-AT"; path = "de-AT.lproj/Localizable.strings"; sourceTree = "<group>"; };
|
||||
3A5EA111297CCF6C00569477 /* de-AT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "de-AT"; path = "de-AT.lproj/Localizable.stringsdict"; sourceTree = "<group>"; };
|
||||
3AA247FC297E3CFF0090C62D /* RepostsModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RepostsModel.swift; 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>"; };
|
||||
3AB5B86A2986D8A3006599D2 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
3AB5B86B2986D8A3006599D2 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
3AB5B86C2986D8A3006599D2 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = de; path = de.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
|
||||
3AC524EE298C000B00693EBF /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
3AC524EF298C000B00693EBF /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
3AC524F0298C000B00693EBF /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = ar; path = ar.lproj/Localizable.stringsdict; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
3AE45AF5297BB2E700C1D842 /* LibreTranslateServer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibreTranslateServer.swift; sourceTree = "<group>"; };
|
||||
3AEABD20297CCFA8003F2975 /* de-DE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "de-DE"; path = "de-DE.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||
3AEABD21297CCFA8003F2975 /* de-DE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "de-DE"; path = "de-DE.lproj/Localizable.strings"; sourceTree = "<group>"; };
|
||||
3AEABD22297CCFA8003F2975 /* de-DE */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "de-DE"; path = "de-DE.lproj/Localizable.stringsdict"; sourceTree = "<group>"; };
|
||||
3AEB8003297CCEA800713A25 /* tr-TR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "tr-TR"; path = "tr-TR.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||
3AEB8004297CCEA800713A25 /* tr-TR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "tr-TR"; path = "tr-TR.lproj/Localizable.strings"; sourceTree = "<group>"; };
|
||||
3AEB8005297CCEA900713A25 /* tr-TR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "tr-TR"; path = "tr-TR.lproj/Localizable.stringsdict"; sourceTree = "<group>"; };
|
||||
3AF6336829884C6B0005672A /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
|
||||
3AF6336929884C6B0005672A /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/Localizable.strings"; sourceTree = "<group>"; };
|
||||
3AF6336A29884C6B0005672A /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = "pt-PT"; path = "pt-PT.lproj/Localizable.stringsdict"; sourceTree = "<group>"; };
|
||||
4C06670028FC7C5900038D2A /* RelayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayView.swift; sourceTree = "<group>"; };
|
||||
4C06670528FCB08600038D2A /* ImageCarousel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCarousel.swift; sourceTree = "<group>"; };
|
||||
4C06670828FDE64700038D2A /* damus-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "damus-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
@@ -276,6 +228,7 @@
|
||||
4C0A3F8E280F640A000448DE /* ThreadModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThreadModel.swift; sourceTree = "<group>"; };
|
||||
4C0A3F90280F6528000448DE /* ChatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatView.swift; sourceTree = "<group>"; };
|
||||
4C0A3F92280F66F5000448DE /* ReplyMap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReplyMap.swift; sourceTree = "<group>"; };
|
||||
4C0A3F94280F6C78000448DE /* ReplyQuoteView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReplyQuoteView.swift; sourceTree = "<group>"; };
|
||||
4C0A3F96280F8E02000448DE /* ThreadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThreadView.swift; sourceTree = "<group>"; };
|
||||
4C216F31286E388800040376 /* DMChatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DMChatView.swift; sourceTree = "<group>"; };
|
||||
4C216F33286F5ACD00040376 /* DMView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DMView.swift; sourceTree = "<group>"; };
|
||||
@@ -317,8 +270,6 @@
|
||||
4C3BEFD9281DCA1400B3DE84 /* LikeCounter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LikeCounter.swift; sourceTree = "<group>"; };
|
||||
4C3BEFDB281DCE6100B3DE84 /* Liked.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Liked.swift; sourceTree = "<group>"; };
|
||||
4C3BEFDF281DE1ED00B3DE84 /* DamusState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DamusState.swift; sourceTree = "<group>"; };
|
||||
4C3D52B5298DB4E6001C5831 /* ZapEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZapEvent.swift; sourceTree = "<group>"; };
|
||||
4C3D52B7298DB5C6001C5831 /* TextEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextEvent.swift; sourceTree = "<group>"; };
|
||||
4C3EA63B28FF52D600C48A62 /* bolt11.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = bolt11.h; sourceTree = "<group>"; };
|
||||
4C3EA63C28FF52D600C48A62 /* bolt11.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = bolt11.c; sourceTree = "<group>"; };
|
||||
4C3EA63E28FF54BD00C48A62 /* short_types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = short_types.h; sourceTree = "<group>"; };
|
||||
@@ -364,7 +315,6 @@
|
||||
4C3EA67A28FF7B3900C48A62 /* InvoiceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvoiceTests.swift; sourceTree = "<group>"; };
|
||||
4C3EA67C28FFBBA200C48A62 /* InvoicesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvoicesView.swift; sourceTree = "<group>"; };
|
||||
4C3EA67E28FFC01D00C48A62 /* InvoiceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvoiceView.swift; sourceTree = "<group>"; };
|
||||
4C42812B298C848200DBF26F /* TranslateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TranslateView.swift; sourceTree = "<group>"; };
|
||||
4C477C9D282C3A4800033AA3 /* TipCounter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TipCounter.swift; sourceTree = "<group>"; };
|
||||
4C4A3A5A288A1B2200453788 /* damus.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = damus.entitlements; sourceTree = "<group>"; };
|
||||
4C5C7E67284ED36500A22DF5 /* SearchHomeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchHomeModel.swift; sourceTree = "<group>"; };
|
||||
@@ -397,8 +347,6 @@
|
||||
4C987B56283FD07F0042CE38 /* FollowersModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FollowersModel.swift; sourceTree = "<group>"; };
|
||||
4C99737A28C92A9200E53835 /* ChatroomMetadata.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatroomMetadata.swift; sourceTree = "<group>"; };
|
||||
4CA2EF9F280E37AC0044ACD8 /* TimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineView.swift; sourceTree = "<group>"; };
|
||||
4CAAD8AC298851D000060CEA /* AccountDeletion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountDeletion.swift; sourceTree = "<group>"; };
|
||||
4CAAD8AF29888AD200060CEA /* RelayConfigView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayConfigView.swift; sourceTree = "<group>"; };
|
||||
4CACA9D4280C31E100D9BBE8 /* ReplyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReplyView.swift; sourceTree = "<group>"; };
|
||||
4CACA9DB280C38C000D9BBE8 /* Profiles.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Profiles.swift; sourceTree = "<group>"; };
|
||||
4CB55EF2295E5D59007FD187 /* RecommendedRelayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendedRelayView.swift; sourceTree = "<group>"; };
|
||||
@@ -411,14 +359,7 @@
|
||||
4CB88392296F798300DC99E7 /* ReactionsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReactionsModel.swift; sourceTree = "<group>"; };
|
||||
4CB88395296F7F8B00DC99E7 /* ReactionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReactionView.swift; sourceTree = "<group>"; };
|
||||
4CB88399297322D200DC99E7 /* DMTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DMTests.swift; sourceTree = "<group>"; };
|
||||
4CB883A52975F83C00DC99E7 /* LNUrlPayRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LNUrlPayRequest.swift; sourceTree = "<group>"; };
|
||||
4CB883A72975FC1800DC99E7 /* Zaps.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Zaps.swift; sourceTree = "<group>"; };
|
||||
4CB883A9297612FF00DC99E7 /* ZapTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZapTests.swift; sourceTree = "<group>"; };
|
||||
4CB883AD2976FA9300DC99E7 /* FormatTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormatTests.swift; sourceTree = "<group>"; };
|
||||
4CB883AF297705DD00DC99E7 /* ZapButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZapButton.swift; sourceTree = "<group>"; };
|
||||
4CB883B5297730E400DC99E7 /* LNUrls.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LNUrls.swift; sourceTree = "<group>"; };
|
||||
4CBCA92F297DB57F00EC6B2F /* WebsiteLink.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebsiteLink.swift; sourceTree = "<group>"; };
|
||||
4CC7AAE6297EFA7B00430951 /* Zap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Zap.swift; sourceTree = "<group>"; };
|
||||
4CC7AAEA297F0AEC00430951 /* BuilderEventView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BuilderEventView.swift; sourceTree = "<group>"; };
|
||||
4CC7AAEC297F0B9E00430951 /* Highlight.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Highlight.swift; sourceTree = "<group>"; };
|
||||
4CC7AAEF297F11C700430951 /* SelectedEventView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectedEventView.swift; sourceTree = "<group>"; };
|
||||
@@ -426,7 +367,6 @@
|
||||
4CC7AAF3297F18B400430951 /* ReplyDescription.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReplyDescription.swift; sourceTree = "<group>"; };
|
||||
4CC7AAF5297F1A6A00430951 /* EventBody.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventBody.swift; sourceTree = "<group>"; };
|
||||
4CC7AAF7297F1CEE00430951 /* EventProfile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventProfile.swift; sourceTree = "<group>"; };
|
||||
4CC7AAF9297F64AC00430951 /* EventMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventMenu.swift; sourceTree = "<group>"; };
|
||||
4CD7641A28A1641400B6928F /* EndBlock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EndBlock.swift; sourceTree = "<group>"; };
|
||||
4CE4F8CC281352B30009DFBB /* Notifications.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Notifications.swift; sourceTree = "<group>"; };
|
||||
4CE4F9DD2852768D00C00DD9 /* ConfigView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigView.swift; sourceTree = "<group>"; };
|
||||
@@ -451,29 +391,11 @@
|
||||
4CEE2AF6280B2DEA00AB5EEF /* ProfileName.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileName.swift; sourceTree = "<group>"; };
|
||||
4CEE2AF8280B2EAC00AB5EEF /* PowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PowView.swift; sourceTree = "<group>"; };
|
||||
4CEE2B01280B39E800AB5EEF /* EventActionBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventActionBar.swift; sourceTree = "<group>"; };
|
||||
4CF0ABD32980996B00D66079 /* Report.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Report.swift; sourceTree = "<group>"; };
|
||||
4CF0ABD529817F5B00D66079 /* ReportView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportView.swift; sourceTree = "<group>"; };
|
||||
4CF0ABD72981980C00D66079 /* Lists.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Lists.swift; sourceTree = "<group>"; };
|
||||
4CF0ABDB2981A19E00D66079 /* ListTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListTests.swift; sourceTree = "<group>"; };
|
||||
4CF0ABDD2981A69500D66079 /* MutelistModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MutelistModel.swift; sourceTree = "<group>"; };
|
||||
4CF0ABE02981A83900D66079 /* MutelistView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MutelistView.swift; sourceTree = "<group>"; };
|
||||
4CF0ABE22981BC7D00D66079 /* UserView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserView.swift; sourceTree = "<group>"; };
|
||||
4CF0ABE42981EE0C00D66079 /* EULAView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EULAView.swift; sourceTree = "<group>"; };
|
||||
4CF0ABE6298444FC00D66079 /* MutedEventView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MutedEventView.swift; sourceTree = "<group>"; };
|
||||
4CF0ABE829844AF100D66079 /* AnyCodable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnyCodable.swift; sourceTree = "<group>"; };
|
||||
4CF0ABEB29844B4700D66079 /* AnyDecodable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnyDecodable.swift; sourceTree = "<group>"; };
|
||||
4CF0ABED29844B5500D66079 /* AnyEncodable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnyEncodable.swift; sourceTree = "<group>"; };
|
||||
4CF0ABEF29857E9200D66079 /* Bech32Object.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bech32Object.swift; sourceTree = "<group>"; };
|
||||
4CF0ABF52985CD5500D66079 /* UserSearch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSearch.swift; sourceTree = "<group>"; };
|
||||
4FE60CDC295E1C5E00105A1F /* Wallet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Wallet.swift; sourceTree = "<group>"; };
|
||||
5C513FB9297F72980072348F /* CustomPicker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomPicker.swift; sourceTree = "<group>"; };
|
||||
5C513FCB2984ACA60072348F /* QRCodeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRCodeView.swift; sourceTree = "<group>"; };
|
||||
6439E013296790CF0020672B /* ProfileZoomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileZoomView.swift; sourceTree = "<group>"; };
|
||||
647D9A8C2968520300A295DE /* SideMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SideMenuView.swift; sourceTree = "<group>"; };
|
||||
64FBD06E296255C400D9D3B2 /* Theme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Theme.swift; sourceTree = "<group>"; };
|
||||
7C45AE70297353390031D7BC /* KFImageModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KFImageModel.swift; sourceTree = "<group>"; };
|
||||
7C60CAEE298471A1009C80D6 /* CoreSVG.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreSVG.swift; sourceTree = "<group>"; };
|
||||
7C902AE22981D55B002AB16E /* ZoomableScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZoomableScrollView.swift; sourceTree = "<group>"; };
|
||||
9609F057296E220800069BF3 /* BannerImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BannerImageView.swift; sourceTree = "<group>"; };
|
||||
BA693073295D649800ADDB87 /* UserSettingsStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSettingsStore.swift; sourceTree = "<group>"; };
|
||||
BAB68BEC29543FA3007BA466 /* SelectWalletView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectWalletView.swift; sourceTree = "<group>"; };
|
||||
@@ -489,6 +411,8 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
7C45AE6F297352F90031D7BC /* SVGKitSwift in Frameworks */,
|
||||
7C45AE6D297352F90031D7BC /* SVGKit in Frameworks */,
|
||||
4C06670428FC7EC500038D2A /* Kingfisher in Frameworks */,
|
||||
6C7DE41F2955169800E66263 /* Vault in Frameworks */,
|
||||
4CE6DF1227F7A2B300C66700 /* Starscream in Frameworks */,
|
||||
@@ -618,9 +542,6 @@
|
||||
4FE60CDC295E1C5E00105A1F /* Wallet.swift */,
|
||||
4CB88392296F798300DC99E7 /* ReactionsModel.swift */,
|
||||
7C45AE70297353390031D7BC /* KFImageModel.swift */,
|
||||
4CF0ABD32980996B00D66079 /* Report.swift */,
|
||||
4CF0ABDD2981A69500D66079 /* MutelistModel.swift */,
|
||||
3AE45AF5297BB2E700C1D842 /* LibreTranslateServer.swift */,
|
||||
);
|
||||
path = Models;
|
||||
sourceTree = "<group>";
|
||||
@@ -628,9 +549,6 @@
|
||||
4C75EFA227FA576C0006080F /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4CAAD8AE29888A9B00060CEA /* Relays */,
|
||||
4CF0ABF42985CD4200D66079 /* Posting */,
|
||||
4CF0ABDF2981A83000D66079 /* Muting */,
|
||||
4CC7AAEE297F11B300430951 /* Events */,
|
||||
3AA24800297E3DAE0090C62D /* Reposts */,
|
||||
4CB88394296F7F8100DC99E7 /* Reactions */,
|
||||
@@ -663,6 +581,9 @@
|
||||
4C8682862814DE470026224F /* ProfileView.swift */,
|
||||
4C3AC7A42836987600E1F516 /* MainTabView.swift */,
|
||||
4C363A8B28236B92006E126D /* PubkeyView.swift */,
|
||||
4CB55EF2295E5D59007FD187 /* RecommendedRelayView.swift */,
|
||||
4C06670028FC7C5900038D2A /* RelayView.swift */,
|
||||
4C0A3F94280F6C78000448DE /* ReplyQuoteView.swift */,
|
||||
4CACA9D4280C31E100D9BBE8 /* ReplyView.swift */,
|
||||
F7F0BA262978E54D009531F3 /* ParicipantsView.swift */,
|
||||
4C285C8D28399BFD008A31F1 /* SaveKeysView.swift */,
|
||||
@@ -679,10 +600,7 @@
|
||||
9609F057296E220800069BF3 /* BannerImageView.swift */,
|
||||
4CB8838E296F781C00DC99E7 /* ReactionsView.swift */,
|
||||
6439E013296790CF0020672B /* ProfileZoomView.swift */,
|
||||
4CF0ABD529817F5B00D66079 /* ReportView.swift */,
|
||||
4CF0ABE42981EE0C00D66079 /* EULAView.swift */,
|
||||
3AA247FE297E3D900090C62D /* RepostsView.swift */,
|
||||
5C513FCB2984ACA60072348F /* QRCodeView.swift */,
|
||||
);
|
||||
path = Views;
|
||||
sourceTree = "<group>";
|
||||
@@ -710,8 +628,6 @@
|
||||
4C7FF7D628233637009601DB /* Util */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4CF0ABEA29844B2F00D66079 /* AnyCodable */,
|
||||
4CC7AAE6297EFA7B00430951 /* Zap.swift */,
|
||||
4C3A1D322960DB0500558C0F /* Markdown.swift */,
|
||||
4CEE2AF4280B29E600AB5EEF /* TimeAgo.swift */,
|
||||
4CE4F8CC281352B30009DFBB /* Notifications.swift */,
|
||||
@@ -726,27 +642,10 @@
|
||||
4C3A1D3629637E0500558C0F /* PreviewCache.swift */,
|
||||
64FBD06E296255C400D9D3B2 /* Theme.swift */,
|
||||
4CB8838529656C8B00DC99E7 /* NIP05.swift */,
|
||||
4CF0ABD72981980C00D66079 /* Lists.swift */,
|
||||
4CF0ABEF29857E9200D66079 /* Bech32Object.swift */,
|
||||
7C60CAEE298471A1009C80D6 /* CoreSVG.swift */,
|
||||
4CAAD8AC298851D000060CEA /* AccountDeletion.swift */,
|
||||
4CB883A52975F83C00DC99E7 /* LNUrlPayRequest.swift */,
|
||||
4CB883A72975FC1800DC99E7 /* Zaps.swift */,
|
||||
4CB883B5297730E400DC99E7 /* LNUrls.swift */,
|
||||
);
|
||||
path = Util;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4CAAD8AE29888A9B00060CEA /* Relays */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4CB55EF2295E5D59007FD187 /* RecommendedRelayView.swift */,
|
||||
4C06670028FC7C5900038D2A /* RelayView.swift */,
|
||||
4CAAD8AF29888AD200060CEA /* RelayConfigView.swift */,
|
||||
);
|
||||
path = Relays;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4CB88387296AF97C00DC99E7 /* ActionBar */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -773,10 +672,6 @@
|
||||
4CC7AAF5297F1A6A00430951 /* EventBody.swift */,
|
||||
4CC7AAEA297F0AEC00430951 /* BuilderEventView.swift */,
|
||||
4CC7AAF7297F1CEE00430951 /* EventProfile.swift */,
|
||||
4CC7AAF9297F64AC00430951 /* EventMenu.swift */,
|
||||
4CF0ABE6298444FC00D66079 /* MutedEventView.swift */,
|
||||
4C3D52B5298DB4E6001C5831 /* ZapEvent.swift */,
|
||||
4C3D52B7298DB5C6001C5831 /* TextEvent.swift */,
|
||||
);
|
||||
path = Events;
|
||||
sourceTree = "<group>";
|
||||
@@ -794,11 +689,6 @@
|
||||
4CB8838C296F710400DC99E7 /* Reposted.swift */,
|
||||
4CBCA92F297DB57F00EC6B2F /* WebsiteLink.swift */,
|
||||
4CC7AAEC297F0B9E00430951 /* Highlight.swift */,
|
||||
5C513FB9297F72980072348F /* CustomPicker.swift */,
|
||||
4CF0ABE22981BC7D00D66079 /* UserView.swift */,
|
||||
7C902AE22981D55B002AB16E /* ZoomableScrollView.swift */,
|
||||
4CB883AF297705DD00DC99E7 /* ZapButton.swift */,
|
||||
4C42812B298C848200DBF26F /* TranslateView.swift */,
|
||||
);
|
||||
path = Components;
|
||||
sourceTree = "<group>";
|
||||
@@ -866,9 +756,6 @@
|
||||
4C3EA67A28FF7B3900C48A62 /* InvoiceTests.swift */,
|
||||
3ACBCB77295FE5C70037388A /* TimeAgoTests.swift */,
|
||||
4CB88399297322D200DC99E7 /* DMTests.swift */,
|
||||
4CF0ABDB2981A19E00D66079 /* ListTests.swift */,
|
||||
4CB883A9297612FF00DC99E7 /* ZapTests.swift */,
|
||||
4CB883AD2976FA9300DC99E7 /* FormatTests.swift */,
|
||||
);
|
||||
path = damusTests;
|
||||
sourceTree = "<group>";
|
||||
@@ -890,32 +777,6 @@
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4CF0ABDF2981A83000D66079 /* Muting */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4CF0ABE02981A83900D66079 /* MutelistView.swift */,
|
||||
);
|
||||
path = Muting;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4CF0ABEA29844B2F00D66079 /* AnyCodable */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4CF0ABE829844AF100D66079 /* AnyCodable.swift */,
|
||||
4CF0ABEB29844B4700D66079 /* AnyDecodable.swift */,
|
||||
4CF0ABED29844B5500D66079 /* AnyEncodable.swift */,
|
||||
);
|
||||
path = AnyCodable;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4CF0ABF42985CD4200D66079 /* Posting */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4CF0ABF52985CD5500D66079 /* UserSearch.swift */,
|
||||
);
|
||||
path = Posting;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
F7F0BA23297892AE009531F3 /* Modifiers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -945,6 +806,8 @@
|
||||
4C649880286E0EE300EAE2B3 /* secp256k1 */,
|
||||
4C06670328FC7EC500038D2A /* Kingfisher */,
|
||||
6C7DE41E2955169800E66263 /* Vault */,
|
||||
7C45AE6C297352F90031D7BC /* SVGKit */,
|
||||
7C45AE6E297352F90031D7BC /* SVGKitSwift */,
|
||||
);
|
||||
productName = damus;
|
||||
productReference = 4CE6DEE327F7A08100C66700 /* damus.app */;
|
||||
@@ -1018,16 +881,10 @@
|
||||
Base,
|
||||
"es-419",
|
||||
"en-US",
|
||||
"de-AT",
|
||||
"de-DE",
|
||||
"tr-TR",
|
||||
"fr-FR",
|
||||
"lv-LV",
|
||||
"it-IT",
|
||||
de,
|
||||
"pt-PT",
|
||||
"pl-PL",
|
||||
ar,
|
||||
nl,
|
||||
"zh-CN",
|
||||
);
|
||||
mainGroup = 4CE6DEDA27F7A08100C66700;
|
||||
packageReferences = (
|
||||
@@ -1035,6 +892,7 @@
|
||||
4C64987F286E0EE300EAE2B3 /* XCRemoteSwiftPackageReference "secp256k1" */,
|
||||
4C06670228FC7EC500038D2A /* XCRemoteSwiftPackageReference "Kingfisher" */,
|
||||
6C7DE41D2955169800E66263 /* XCRemoteSwiftPackageReference "Vault" */,
|
||||
7C45AE6B297352F90031D7BC /* XCRemoteSwiftPackageReference "SVGKit" */,
|
||||
);
|
||||
productRefGroup = 4CE6DEE427F7A08100C66700 /* Products */;
|
||||
projectDirPath = "";
|
||||
@@ -1088,15 +946,12 @@
|
||||
4C216F34286F5ACD00040376 /* DMView.swift in Sources */,
|
||||
4C3EA64428FF558100C48A62 /* sha256.c in Sources */,
|
||||
4CE4F9E1285287B800C00DD9 /* TextFieldAlert.swift in Sources */,
|
||||
4CF0ABF62985CD5500D66079 /* UserSearch.swift in Sources */,
|
||||
4C363AA828297703006E126D /* InsertSort.swift in Sources */,
|
||||
4C285C86283892E7008A31F1 /* CreateAccountModel.swift in Sources */,
|
||||
4C64987C286D03E000EAE2B3 /* DirectMessagesView.swift in Sources */,
|
||||
7C902AE32981D55B002AB16E /* ZoomableScrollView.swift in Sources */,
|
||||
4C363A8C28236B92006E126D /* PubkeyView.swift in Sources */,
|
||||
4C5C7E68284ED36500A22DF5 /* SearchHomeModel.swift in Sources */,
|
||||
4C75EFB728049D990006080F /* RelayPool.swift in Sources */,
|
||||
4CF0ABEE29844B5500D66079 /* AnyEncodable.swift in Sources */,
|
||||
4CB8838D296F710400DC99E7 /* Reposted.swift in Sources */,
|
||||
4C3EA67728FF7A9800C48A62 /* talstr.c in Sources */,
|
||||
4CE6DEE927F7A08100C66700 /* ContentView.swift in Sources */,
|
||||
@@ -1108,24 +963,18 @@
|
||||
4C285C8A2838B985008A31F1 /* ProfilePictureSelector.swift in Sources */,
|
||||
4C75EFB92804A2740006080F /* EventView.swift in Sources */,
|
||||
3AA247FD297E3CFF0090C62D /* RepostsModel.swift in Sources */,
|
||||
4CB883B6297730E400DC99E7 /* LNUrls.swift in Sources */,
|
||||
4C7FF7D52823313F009601DB /* Mentions.swift in Sources */,
|
||||
4C633350283D40E500B1C9C3 /* HomeModel.swift in Sources */,
|
||||
4C987B57283FD07F0042CE38 /* FollowersModel.swift in Sources */,
|
||||
4C363A9028247A1D006E126D /* NostrLink.swift in Sources */,
|
||||
4C0A3F8C280F5FCA000448DE /* ChatroomView.swift in Sources */,
|
||||
4C477C9E282C3A4800033AA3 /* TipCounter.swift in Sources */,
|
||||
4C3D52B6298DB4E6001C5831 /* ZapEvent.swift in Sources */,
|
||||
647D9A8D2968520300A295DE /* SideMenuView.swift in Sources */,
|
||||
F7F0BA272978E54D009531F3 /* ParicipantsView.swift in Sources */,
|
||||
4C0A3F91280F6528000448DE /* ChatView.swift in Sources */,
|
||||
4CF0ABE32981BC7D00D66079 /* UserView.swift in Sources */,
|
||||
4CF0ABF029857E9200D66079 /* Bech32Object.swift in Sources */,
|
||||
4C3D52B8298DB5C6001C5831 /* TextEvent.swift in Sources */,
|
||||
4C216F362870A9A700040376 /* InputDismissKeyboard.swift in Sources */,
|
||||
4C216F382871EDE300040376 /* DirectMessageModel.swift in Sources */,
|
||||
4C75EFA627FF87A20006080F /* Nostr.swift in Sources */,
|
||||
4CB883A62975F83C00DC99E7 /* LNUrlPayRequest.swift in Sources */,
|
||||
4CE4F9DE2852768D00C00DD9 /* ConfigView.swift in Sources */,
|
||||
4C285C8E28399BFE008A31F1 /* SaveKeysView.swift in Sources */,
|
||||
F7F0BA25297892BD009531F3 /* SwipeToDismiss.swift in Sources */,
|
||||
@@ -1142,9 +991,6 @@
|
||||
4C3EA66828FF5F9900C48A62 /* hex.c in Sources */,
|
||||
E9E4ED0B295867B900DD7078 /* ThreadV2View.swift in Sources */,
|
||||
4C3BEFDC281DCE6100B3DE84 /* Liked.swift in Sources */,
|
||||
4CF0ABE7298444FD00D66079 /* MutedEventView.swift in Sources */,
|
||||
4CF0ABE12981A83900D66079 /* MutelistView.swift in Sources */,
|
||||
4CB883A82975FC1800DC99E7 /* Zaps.swift in Sources */,
|
||||
4C75EFB128049D510006080F /* NostrResponse.swift in Sources */,
|
||||
4CEE2AF7280B2DEA00AB5EEF /* ProfileName.swift in Sources */,
|
||||
4CC7AAEB297F0AEC00430951 /* BuilderEventView.swift in Sources */,
|
||||
@@ -1154,11 +1000,9 @@
|
||||
4CEE2B02280B39E800AB5EEF /* EventActionBar.swift in Sources */,
|
||||
4C3BEFE0281DE1ED00B3DE84 /* DamusState.swift in Sources */,
|
||||
7C45AE71297353390031D7BC /* KFImageModel.swift in Sources */,
|
||||
4CF0ABE929844AF100D66079 /* AnyCodable.swift in Sources */,
|
||||
4C0A3F8F280F640A000448DE /* ThreadModel.swift in Sources */,
|
||||
4CC7AAF2297F129C00430951 /* EmbeddedEventView.swift in Sources */,
|
||||
4C3AC79F2833115300E1F516 /* FollowButtonView.swift in Sources */,
|
||||
4CC7AAE7297EFA7B00430951 /* Zap.swift in Sources */,
|
||||
4C3BEFD22819DB9B00B3DE84 /* ProfileModel.swift in Sources */,
|
||||
4C0A3F93280F66F5000448DE /* ReplyMap.swift in Sources */,
|
||||
BAB68BED29543FA3007BA466 /* SelectWalletView.swift in Sources */,
|
||||
@@ -1178,33 +1022,25 @@
|
||||
9609F058296E220800069BF3 /* BannerImageView.swift in Sources */,
|
||||
4C363A94282704FA006E126D /* Post.swift in Sources */,
|
||||
4C216F32286E388800040376 /* DMChatView.swift in Sources */,
|
||||
4CAAD8AD298851D000060CEA /* AccountDeletion.swift in Sources */,
|
||||
4C3EA67928FF7ABF00C48A62 /* list.c in Sources */,
|
||||
4C64987E286D082C00EAE2B3 /* DirectMessagesModel.swift in Sources */,
|
||||
4C363A8828236948006E126D /* BlocksView.swift in Sources */,
|
||||
4C06670628FCB08600038D2A /* ImageCarousel.swift in Sources */,
|
||||
4C75EFAF28049D350006080F /* NostrFilter.swift in Sources */,
|
||||
4C3EA64C28FF59AC00C48A62 /* bech32_util.c in Sources */,
|
||||
4C42812C298C848200DBF26F /* TranslateView.swift in Sources */,
|
||||
4C363A9C282838B9006E126D /* EventRef.swift in Sources */,
|
||||
3AA24802297E3DC20090C62D /* RepostView.swift in Sources */,
|
||||
4CD7641B28A1641400B6928F /* EndBlock.swift in Sources */,
|
||||
4C3EA66528FF5F6800C48A62 /* mem.c in Sources */,
|
||||
4CF0ABE52981EE0C00D66079 /* EULAView.swift in Sources */,
|
||||
4CBCA930297DB57F00EC6B2F /* WebsiteLink.swift in Sources */,
|
||||
4CAAD8B029888AD200060CEA /* RelayConfigView.swift in Sources */,
|
||||
4C3EA64128FF553900C48A62 /* hash_u5.c in Sources */,
|
||||
5C513FCC2984ACA60072348F /* QRCodeView.swift in Sources */,
|
||||
4C3EA64F28FF59F200C48A62 /* tal.c in Sources */,
|
||||
4CB88393296F798300DC99E7 /* ReactionsModel.swift in Sources */,
|
||||
4CB88396296F7F8B00DC99E7 /* ReactionView.swift in Sources */,
|
||||
4C8682872814DE470026224F /* ProfileView.swift in Sources */,
|
||||
4C5F9114283D694D0052CD1C /* FollowTarget.swift in Sources */,
|
||||
4CF0ABD629817F5B00D66079 /* ReportView.swift in Sources */,
|
||||
4CB8838629656C8B00DC99E7 /* NIP05.swift in Sources */,
|
||||
4CF0ABD82981980C00D66079 /* Lists.swift in Sources */,
|
||||
4C5C7E6A284EDE2E00A22DF5 /* SearchResultsView.swift in Sources */,
|
||||
7C60CAEF298471A1009C80D6 /* CoreSVG.swift in Sources */,
|
||||
6439E014296790CF0020672B /* ProfileZoomView.swift in Sources */,
|
||||
4CE6DF1627F8DEBF00C66700 /* RelayConnection.swift in Sources */,
|
||||
4C3BEFD6281D995700B3DE84 /* ActionBarModel.swift in Sources */,
|
||||
@@ -1222,35 +1058,29 @@
|
||||
4C06670E28FDEAA000038D2A /* utf8.c in Sources */,
|
||||
4C3EA66D28FF782800C48A62 /* amount.c in Sources */,
|
||||
4C3AC7A728369BA200E1F516 /* SearchHomeView.swift in Sources */,
|
||||
4CB883B0297705DD00DC99E7 /* ZapButton.swift in Sources */,
|
||||
4C363A922825FCF2006E126D /* ProfileUpdate.swift in Sources */,
|
||||
4C0A3F95280F6C78000448DE /* ReplyQuoteView.swift in Sources */,
|
||||
4C3BEFDA281DCA1400B3DE84 /* LikeCounter.swift in Sources */,
|
||||
4CB88389296AF99A00DC99E7 /* EventDetailBar.swift in Sources */,
|
||||
4CF0ABDE2981A69500D66079 /* MutelistModel.swift in Sources */,
|
||||
4C3AC79B28306D7B00E1F516 /* Contacts.swift in Sources */,
|
||||
4C3EA63D28FF52D600C48A62 /* bolt11.c in Sources */,
|
||||
4CB55EF3295E5D59007FD187 /* RecommendedRelayView.swift in Sources */,
|
||||
4CF0ABEC29844B4700D66079 /* AnyDecodable.swift in Sources */,
|
||||
4C5F9118283D88E40052CD1C /* FollowingModel.swift in Sources */,
|
||||
4C3EA67D28FFBBA300C48A62 /* InvoicesView.swift in Sources */,
|
||||
4C363A8E28236FE4006E126D /* NoteContentView.swift in Sources */,
|
||||
4C90BD1A283AA67F008EE7EF /* Bech32.swift in Sources */,
|
||||
E990020F2955F837003BBC5A /* EditMetadataView.swift in Sources */,
|
||||
5C513FBA297F72980072348F /* CustomPicker.swift in Sources */,
|
||||
4CACA9D5280C31E100D9BBE8 /* ReplyView.swift in Sources */,
|
||||
4C3A1D332960DB0500558C0F /* Markdown.swift in Sources */,
|
||||
4CF0ABD42980996B00D66079 /* Report.swift in Sources */,
|
||||
4C0A3F97280F8E02000448DE /* ThreadView.swift in Sources */,
|
||||
4C06670B28FDE64700038D2A /* damus.c in Sources */,
|
||||
4FE60CDD295E1C5E00105A1F /* Wallet.swift in Sources */,
|
||||
3AA247FF297E3D900090C62D /* RepostsView.swift in Sources */,
|
||||
3AE45AF6297BB2E700C1D842 /* LibreTranslateServer.swift in Sources */,
|
||||
4C99737B28C92A9200E53835 /* ChatroomMetadata.swift in Sources */,
|
||||
4CC7AAF4297F18B400430951 /* ReplyDescription.swift in Sources */,
|
||||
4C75EFA427FA577B0006080F /* PostView.swift in Sources */,
|
||||
4C75EFB528049D790006080F /* Relay.swift in Sources */,
|
||||
4CEE2AF1280B216B00AB5EEF /* EventDetailView.swift in Sources */,
|
||||
4CC7AAFA297F64AC00430951 /* EventMenu.swift in Sources */,
|
||||
4C75EFBB2804A34C0006080F /* ProofOfWork.swift in Sources */,
|
||||
4C3AC7A52836987600E1F516 /* MainTabView.swift in Sources */,
|
||||
3169CAED294FCCFC00EE4006 /* Constants.swift in Sources */,
|
||||
@@ -1265,13 +1095,10 @@
|
||||
DD597CBD2963D85A00C64D32 /* MarkdownTests.swift in Sources */,
|
||||
4C3EA67B28FF7B3900C48A62 /* InvoiceTests.swift in Sources */,
|
||||
4C363A9E2828A822006E126D /* ReplyTests.swift in Sources */,
|
||||
4CB883AA297612FF00DC99E7 /* ZapTests.swift in Sources */,
|
||||
4CB8839A297322D200DC99E7 /* DMTests.swift in Sources */,
|
||||
4CB883AE2976FA9300DC99E7 /* FormatTests.swift in Sources */,
|
||||
4C363AA02828A8DD006E126D /* LikeTests.swift in Sources */,
|
||||
4C90BD1C283AC38E008EE7EF /* Bech32Tests.swift in Sources */,
|
||||
4CE6DEF827F7A08200C66700 /* damusTests.swift in Sources */,
|
||||
4CF0ABDC2981A19E00D66079 /* ListTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -1305,16 +1132,10 @@
|
||||
children = (
|
||||
3A5C4575296A879E0032D398 /* es-419 */,
|
||||
3A2B8B0A296A8982009CC16D /* en-US */,
|
||||
3A5EA111297CCF6C00569477 /* de-AT */,
|
||||
3AEABD22297CCFA8003F2975 /* de-DE */,
|
||||
3AEB8005297CCEA900713A25 /* tr-TR */,
|
||||
3A4F3322297CCFEE004B5F72 /* fr-FR */,
|
||||
3A185A06297F2C3800F4BDC0 /* lv-LV */,
|
||||
3A929C22297F2CF80090925E /* it-IT */,
|
||||
3AB5B86C2986D8A3006599D2 /* de */,
|
||||
3AF6336A29884C6B0005672A /* pt-PT */,
|
||||
3A93342B29884CA600D6A8F3 /* pl-PL */,
|
||||
3AC524F0298C000B00693EBF /* ar */,
|
||||
3A96D41C298DA94500388A2A /* nl */,
|
||||
3A5CAE1F298DC0DB00B5334F /* zh-CN */,
|
||||
);
|
||||
name = Localizable.stringsdict;
|
||||
sourceTree = "<group>";
|
||||
@@ -1323,16 +1144,10 @@
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3ACB685B297633BC00C46468 /* es-419 */,
|
||||
3A5EA10F297CCF6C00569477 /* de-AT */,
|
||||
3AEABD20297CCFA8003F2975 /* de-DE */,
|
||||
3AEB8003297CCEA800713A25 /* tr-TR */,
|
||||
3A4F3320297CCFEE004B5F72 /* fr-FR */,
|
||||
3A185A04297F2C3800F4BDC0 /* lv-LV */,
|
||||
3A929C20297F2CF80090925E /* it-IT */,
|
||||
3AB5B86A2986D8A3006599D2 /* de */,
|
||||
3AF6336829884C6B0005672A /* pt-PT */,
|
||||
3A93342929884CA600D6A8F3 /* pl-PL */,
|
||||
3AC524EE298C000B00693EBF /* ar */,
|
||||
3A96D41A298DA94500388A2A /* nl */,
|
||||
3A5CAE1D298DC0DB00B5334F /* zh-CN */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
@@ -1341,16 +1156,10 @@
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3ACB685E297633BC00C46468 /* es-419 */,
|
||||
3A5EA110297CCF6C00569477 /* de-AT */,
|
||||
3AEABD21297CCFA8003F2975 /* de-DE */,
|
||||
3AEB8004297CCEA800713A25 /* tr-TR */,
|
||||
3A4F3321297CCFEE004B5F72 /* fr-FR */,
|
||||
3A185A05297F2C3800F4BDC0 /* lv-LV */,
|
||||
3A929C21297F2CF80090925E /* it-IT */,
|
||||
3AB5B86B2986D8A3006599D2 /* de */,
|
||||
3AF6336929884C6B0005672A /* pt-PT */,
|
||||
3A93342A29884CA600D6A8F3 /* pl-PL */,
|
||||
3AC524EF298C000B00693EBF /* ar */,
|
||||
3A96D41B298DA94500388A2A /* nl */,
|
||||
3A5CAE1E298DC0DB00B5334F /* zh-CN */,
|
||||
);
|
||||
name = Localizable.strings;
|
||||
sourceTree = "<group>";
|
||||
@@ -1486,7 +1295,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = damus/damus.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 13;
|
||||
CURRENT_PROJECT_VERSION = 9;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"damus/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = XK7H4JAB3D;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
@@ -1527,7 +1336,7 @@
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = damus/damus.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 13;
|
||||
CURRENT_PROJECT_VERSION = 9;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"damus/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = XK7H4JAB3D;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
@@ -1709,6 +1518,14 @@
|
||||
minimumVersion = 1.0.0;
|
||||
};
|
||||
};
|
||||
7C45AE6B297352F90031D7BC /* XCRemoteSwiftPackageReference "SVGKit" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/SVGKit/SVGKit";
|
||||
requirement = {
|
||||
kind = revision;
|
||||
revision = e1f13e27b1e4c0ffe20e7d8d3984bf49c2a584d0;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
@@ -1732,6 +1549,16 @@
|
||||
package = 6C7DE41D2955169800E66263 /* XCRemoteSwiftPackageReference "Vault" */;
|
||||
productName = Vault;
|
||||
};
|
||||
7C45AE6C297352F90031D7BC /* SVGKit */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 7C45AE6B297352F90031D7BC /* XCRemoteSwiftPackageReference "SVGKit" */;
|
||||
productName = SVGKit;
|
||||
};
|
||||
7C45AE6E297352F90031D7BC /* SVGKitSwift */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 7C45AE6B297352F90031D7BC /* XCRemoteSwiftPackageReference "SVGKit" */;
|
||||
productName = SVGKitSwift;
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
};
|
||||
rootObject = 4CE6DEDB27F7A08100C66700 /* Project object */;
|
||||
|
||||
@@ -26,6 +26,14 @@
|
||||
"version" : "4.0.4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "svgkit",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/SVGKit/SVGKit",
|
||||
"state" : {
|
||||
"revision" : "e1f13e27b1e4c0ffe20e7d8d3984bf49c2a584d0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "vault",
|
||||
"kind" : "remoteSourceControl",
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1420"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4CE6DEE227F7A08100C66700"
|
||||
BuildableName = "damus.app"
|
||||
BlueprintName = "damus"
|
||||
ReferencedContainer = "container:damus.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4CE6DEF227F7A08200C66700"
|
||||
BuildableName = "damusTests.xctest"
|
||||
BlueprintName = "damusTests"
|
||||
ReferencedContainer = "container:damus.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
<TestableReference
|
||||
skipped = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4CE6DEFC27F7A08200C66700"
|
||||
BuildableName = "damusUITests.xctest"
|
||||
BlueprintName = "damusUITests"
|
||||
ReferencedContainer = "container:damus.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4CE6DEE227F7A08100C66700"
|
||||
BuildableName = "damus.app"
|
||||
BlueprintName = "damus"
|
||||
ReferencedContainer = "container:damus.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4CE6DEE227F7A08100C66700"
|
||||
BuildableName = "damus.app"
|
||||
BlueprintName = "damus"
|
||||
ReferencedContainer = "container:damus.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,60 +0,0 @@
|
||||
//
|
||||
// CustomPicker.swift
|
||||
// damus
|
||||
//
|
||||
// Created by Eric Holguin on 1/22/23.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
let RECTANGLE_GRADIENT = LinearGradient(gradient: Gradient(colors: [
|
||||
Color("DamusPurple"),
|
||||
Color("DamusBlue")
|
||||
]), startPoint: .leading, endPoint: .trailing)
|
||||
|
||||
struct CustomPicker<SelectionValue: Hashable, Content: View>: View {
|
||||
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
|
||||
@Namespace var picker
|
||||
@Binding var selection: SelectionValue
|
||||
@ViewBuilder let content: Content
|
||||
|
||||
public var body: some View {
|
||||
let contentMirror = Mirror(reflecting: content)
|
||||
let blocksCount = Mirror(reflecting: contentMirror.descendant("value")!).children.count
|
||||
HStack {
|
||||
ForEach(0..<blocksCount, id: \.self) { index in
|
||||
let tupleBlock = contentMirror.descendant("value", ".\(index)")
|
||||
let text = Mirror(reflecting: tupleBlock!).descendant("content") as! Text
|
||||
let tag = Mirror(reflecting: tupleBlock!).descendant("modifier", "value", "tagged") as! SelectionValue
|
||||
|
||||
Button {
|
||||
withAnimation(.spring()) {
|
||||
selection = tag
|
||||
}
|
||||
} label: {
|
||||
text
|
||||
.padding(EdgeInsets(top: 15, leading: 0, bottom: 10, trailing: 0))
|
||||
.font(.system(size: 14, weight: .heavy))
|
||||
}
|
||||
.background(
|
||||
Group {
|
||||
if tag == selection {
|
||||
Rectangle().fill(RECTANGLE_GRADIENT).frame(height: 2.5)
|
||||
.matchedGeometryEffect(id: "selector", in: picker)
|
||||
.cornerRadius(2.5)
|
||||
}
|
||||
},
|
||||
alignment: .bottom
|
||||
)
|
||||
.frame(maxWidth: .infinity)
|
||||
.accentColor(tag == selection ? textColor() : .gray)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func textColor() -> Color {
|
||||
colorScheme == .light ? Color("DamusBlack") : Color("DamusWhite")
|
||||
}
|
||||
}
|
||||
@@ -115,6 +115,56 @@ private struct ImageContainerView: View {
|
||||
// TODO: Update ImageCarousel with serializer and processor
|
||||
// .serialize(by: imageModel.serializer)
|
||||
// .setProcessor(imageModel.processor)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
struct ZoomableScrollView<Content: View>: UIViewRepresentable {
|
||||
|
||||
private var content: Content
|
||||
|
||||
init(@ViewBuilder content: () -> Content) {
|
||||
self.content = content()
|
||||
}
|
||||
|
||||
func makeUIView(context: Context) -> UIScrollView {
|
||||
let scrollView = UIScrollView()
|
||||
scrollView.delegate = context.coordinator
|
||||
scrollView.maximumZoomScale = 20
|
||||
scrollView.minimumZoomScale = 1
|
||||
scrollView.bouncesZoom = true
|
||||
scrollView.showsVerticalScrollIndicator = false
|
||||
scrollView.showsHorizontalScrollIndicator = false
|
||||
|
||||
let hostedView = context.coordinator.hostingController.view!
|
||||
hostedView.translatesAutoresizingMaskIntoConstraints = true
|
||||
hostedView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
||||
hostedView.frame = scrollView.bounds
|
||||
hostedView.backgroundColor = .clear
|
||||
scrollView.addSubview(hostedView)
|
||||
|
||||
return scrollView
|
||||
}
|
||||
|
||||
func makeCoordinator() -> Coordinator {
|
||||
return Coordinator(hostingController: UIHostingController(rootView: self.content))
|
||||
}
|
||||
|
||||
func updateUIView(_ uiView: UIScrollView, context: Context) {
|
||||
context.coordinator.hostingController.rootView = self.content
|
||||
assert(context.coordinator.hostingController.view.superview == uiView)
|
||||
}
|
||||
|
||||
class Coordinator: NSObject, UIScrollViewDelegate {
|
||||
var hostingController: UIHostingController<Content>
|
||||
|
||||
init(hostingController: UIHostingController<Content>) {
|
||||
self.hostingController = hostingController
|
||||
}
|
||||
|
||||
func viewForZooming(in scrollView: UIScrollView) -> UIView? {
|
||||
return hostingController.view
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,14 +177,6 @@ struct ImageView: View {
|
||||
@State private var selectedIndex = 0
|
||||
@State var showMenu = true
|
||||
|
||||
var safeAreaInsets: UIEdgeInsets? {
|
||||
return UIApplication
|
||||
.shared
|
||||
.connectedScenes
|
||||
.flatMap { ($0 as? UIWindowScene)?.windows ?? [] }
|
||||
.first { $0.isKeyWindow }?.safeAreaInsets
|
||||
}
|
||||
|
||||
var navBarView: some View {
|
||||
VStack {
|
||||
HStack {
|
||||
@@ -180,24 +222,22 @@ struct ImageView: View {
|
||||
ZoomableScrollView {
|
||||
ImageContainerView(url: urls[index])
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.padding(.top, safeAreaInsets?.top)
|
||||
.padding(.bottom, safeAreaInsets?.bottom)
|
||||
}
|
||||
.ignoresSafeArea()
|
||||
.tag(index)
|
||||
.modifier(SwipeToDismissModifier(minDistance: 50, onDismiss: {
|
||||
presentationMode.wrappedValue.dismiss()
|
||||
}))
|
||||
.ignoresSafeArea()
|
||||
.tag(index)
|
||||
}
|
||||
}
|
||||
.ignoresSafeArea()
|
||||
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))
|
||||
.gesture(TapGesture(count: 2).onEnded {
|
||||
// Prevents menu from hiding on double tap
|
||||
.onChange(of: selectedIndex, perform: { _ in
|
||||
showMenu = true
|
||||
})
|
||||
.gesture(TapGesture(count: 1).onEnded {
|
||||
.onTapGesture {
|
||||
showMenu.toggle()
|
||||
})
|
||||
}
|
||||
.overlay(
|
||||
VStack {
|
||||
if showMenu {
|
||||
@@ -210,7 +250,14 @@ struct ImageView: View {
|
||||
}
|
||||
}
|
||||
.animation(.easeInOut, value: showMenu)
|
||||
.padding(.bottom, safeAreaInsets?.bottom)
|
||||
.padding(
|
||||
.bottom,
|
||||
UIApplication
|
||||
.shared
|
||||
.connectedScenes
|
||||
.flatMap { ($0 as? UIWindowScene)?.windows ?? [] }
|
||||
.first { $0.isKeyWindow }?.safeAreaInsets.bottom
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,84 +7,6 @@
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct InvoiceView: View {
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
@Environment(\.openURL) private var openURL
|
||||
let our_pubkey: String
|
||||
let invoice: Invoice
|
||||
@State var showing_select_wallet: Bool = false
|
||||
@State var copied = false
|
||||
|
||||
var CopyButton: some View {
|
||||
Button {
|
||||
copied = true
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
|
||||
copied = false
|
||||
}
|
||||
UIImpactFeedbackGenerator(style: .medium).impactOccurred()
|
||||
UIPasteboard.general.string = invoice.string
|
||||
} label: {
|
||||
if !copied {
|
||||
Image(systemName: "doc.on.clipboard")
|
||||
.foregroundColor(.gray)
|
||||
} else {
|
||||
Image(systemName: "checkmark.circle")
|
||||
.foregroundColor(Color("DamusGreen"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var PayButton: some View {
|
||||
Button {
|
||||
if should_show_wallet_selector(our_pubkey) {
|
||||
showing_select_wallet = true
|
||||
} else {
|
||||
open_with_wallet(wallet: get_default_wallet(our_pubkey).model, invoice: invoice.string)
|
||||
}
|
||||
} label: {
|
||||
RoundedRectangle(cornerRadius: 20, style: .circular)
|
||||
.foregroundColor(colorScheme == .light ? .black : .white)
|
||||
.overlay {
|
||||
Text("Pay", comment: "Button to pay a Lightning invoice.")
|
||||
.fontWeight(.medium)
|
||||
.foregroundColor(colorScheme == .light ? .white : .black)
|
||||
}
|
||||
}
|
||||
.onTapGesture {
|
||||
// Temporary solution so that the "pay" button can be clicked (Yes we need an empty tap gesture)
|
||||
print("pay button tap")
|
||||
}
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
RoundedRectangle(cornerRadius: 10)
|
||||
.foregroundColor(.secondary.opacity(0.1))
|
||||
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
HStack {
|
||||
Label("", systemImage: "bolt.fill")
|
||||
.foregroundColor(.orange)
|
||||
Text("Lightning Invoice", comment: "Indicates that the view is for paying a Lightning invoice.")
|
||||
Spacer()
|
||||
CopyButton
|
||||
}
|
||||
Divider()
|
||||
Text(invoice.description_string)
|
||||
Text(invoice.amount.amount_sats_str())
|
||||
.font(.title)
|
||||
PayButton
|
||||
.frame(height: 50)
|
||||
.zIndex(10.0)
|
||||
}
|
||||
.padding(30)
|
||||
}
|
||||
.sheet(isPresented: $showing_select_wallet, onDismiss: {showing_select_wallet = false}) {
|
||||
SelectWalletView(showingSelectWallet: $showing_select_wallet, our_pubkey: our_pubkey, invoice: invoice.string)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func open_with_wallet(wallet: Wallet.Model, invoice: String) {
|
||||
if let url = URL(string: "\(wallet.link)\(invoice)"), UIApplication.shared.canOpenURL(url) {
|
||||
UIApplication.shared.open(url)
|
||||
@@ -106,12 +28,68 @@ func open_with_wallet(wallet: Wallet.Model, invoice: String) {
|
||||
}
|
||||
}
|
||||
|
||||
struct InvoiceView: View {
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
@Environment(\.openURL) private var openURL
|
||||
|
||||
let invoice: Invoice
|
||||
@State var showing_select_wallet: Bool = false
|
||||
@ObservedObject var user_settings = UserSettingsStore()
|
||||
|
||||
var PayButton: some View {
|
||||
Button {
|
||||
if user_settings.show_wallet_selector {
|
||||
showing_select_wallet = true
|
||||
} else {
|
||||
open_with_wallet(wallet: user_settings.default_wallet.model, invoice: invoice.string)
|
||||
}
|
||||
} label: {
|
||||
RoundedRectangle(cornerRadius: 20)
|
||||
.foregroundColor(colorScheme == .light ? .black : .white)
|
||||
.overlay {
|
||||
Text("Pay", comment: "Button to pay a Lightning invoice.")
|
||||
.fontWeight(.medium)
|
||||
.foregroundColor(colorScheme == .light ? .white : .black)
|
||||
}
|
||||
}
|
||||
//.buttonStyle(.bordered)
|
||||
.onTapGesture {
|
||||
// Temporary solution so that the "pay" button can be clicked (Yes we need an empty tap gesture)
|
||||
}
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
RoundedRectangle(cornerRadius: 10)
|
||||
.foregroundColor(.secondary.opacity(0.1))
|
||||
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
HStack {
|
||||
Label("", systemImage: "bolt.fill")
|
||||
.foregroundColor(.orange)
|
||||
Text("Lightning Invoice", comment: "Indicates that the view is for paying a Lightning invoice.")
|
||||
}
|
||||
Divider()
|
||||
Text(invoice.description)
|
||||
Text(invoice.amount.amount_sats_str())
|
||||
.font(.title)
|
||||
PayButton
|
||||
.frame(height: 50)
|
||||
.zIndex(10.0)
|
||||
}
|
||||
.padding(30)
|
||||
}
|
||||
.sheet(isPresented: $showing_select_wallet, onDismiss: {showing_select_wallet = false}) {
|
||||
SelectWalletView(showingSelectWallet: $showing_select_wallet, invoice: invoice.string).environmentObject(user_settings)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let test_invoice = Invoice(description: .description("this is a description"), amount: .specific(10000), string: "lnbc100n1p357sl0sp5t9n56wdztun39lgdqlr30xqwksg3k69q4q2rkr52aplujw0esn0qpp5mrqgljk62z20q4nvgr6lzcyn6fhylzccwdvu4k77apg3zmrkujjqdpzw35xjueqd9ejqcfqv3jhxcmjd9c8g6t0dcxqyjw5qcqpjrzjqt56h4gvp5yx36u2uzqa6qwcsk3e2duunfxppzj9vhypc3wfe2wswz607uqq3xqqqsqqqqqqqqqqqlqqyg9qyysgqagx5h20aeulj3gdwx3kxs8u9f4mcakdkwuakasamm9562ffyr9en8yg20lg0ygnr9zpwp68524kmda0t5xp2wytex35pu8hapyjajxqpsql29r", expiry: 604800, payment_hash: Data(), created_at: 1666139119)
|
||||
let test_invoice = Invoice(description: "this is a description", amount: .specific(10000), string: "lnbc100n1p357sl0sp5t9n56wdztun39lgdqlr30xqwksg3k69q4q2rkr52aplujw0esn0qpp5mrqgljk62z20q4nvgr6lzcyn6fhylzccwdvu4k77apg3zmrkujjqdpzw35xjueqd9ejqcfqv3jhxcmjd9c8g6t0dcxqyjw5qcqpjrzjqt56h4gvp5yx36u2uzqa6qwcsk3e2duunfxppzj9vhypc3wfe2wswz607uqq3xqqqsqqqqqqqqqqqlqqyg9qyysgqagx5h20aeulj3gdwx3kxs8u9f4mcakdkwuakasamm9562ffyr9en8yg20lg0ygnr9zpwp68524kmda0t5xp2wytex35pu8hapyjajxqpsql29r", expiry: 604800, payment_hash: Data(), created_at: 1666139119)
|
||||
|
||||
struct InvoiceView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
InvoiceView(our_pubkey: "", invoice: test_invoice)
|
||||
.frame(width: 300, height: 200)
|
||||
InvoiceView(invoice: test_invoice)
|
||||
.frame(width: 200, height: 200)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct InvoicesView: View {
|
||||
let our_pubkey: String
|
||||
var invoices: [Invoice]
|
||||
|
||||
@State var open_sheet: Bool = false
|
||||
@@ -17,7 +16,7 @@ struct InvoicesView: View {
|
||||
var body: some View {
|
||||
TabView {
|
||||
ForEach(invoices, id: \.string) { invoice in
|
||||
InvoiceView(our_pubkey: our_pubkey, invoice: invoice)
|
||||
InvoiceView(invoice: invoice)
|
||||
.tabItem {
|
||||
Text(invoice.string)
|
||||
}
|
||||
@@ -31,7 +30,7 @@ struct InvoicesView: View {
|
||||
|
||||
struct InvoicesView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
InvoicesView(our_pubkey: "", invoices: [Invoice.init(description: .description("description"), amount: .specific(10000), string: "invstr", expiry: 100000, payment_hash: Data(), created_at: 1000000)])
|
||||
InvoicesView(invoices: [Invoice.init(description: "description", amount: .specific(10000), string: "invstr", expiry: 100000, payment_hash: Data(), created_at: 1000000)])
|
||||
.frame(width: 300)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,139 +0,0 @@
|
||||
//
|
||||
// TranslateButton.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-02-02.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import NaturalLanguage
|
||||
|
||||
struct TranslateView: View {
|
||||
let damus_state: DamusState
|
||||
let event: NostrEvent
|
||||
let size: EventViewKind
|
||||
|
||||
@State var checkingTranslationStatus: Bool = false
|
||||
@State var currentLanguage: String = "en"
|
||||
@State var noteLanguage: String? = nil
|
||||
@State var translated_note: String? = nil
|
||||
@State var show_translated_note: Bool = false
|
||||
@State var translated_artifacts: NoteArtifacts? = nil
|
||||
|
||||
var TranslateButton: some View {
|
||||
Button(NSLocalizedString("Translate Note", comment: "Button to translate note from different language.")) {
|
||||
show_translated_note = true
|
||||
}
|
||||
.translate_button_style()
|
||||
}
|
||||
|
||||
func Translated(lang: String, artifacts: NoteArtifacts) -> some View {
|
||||
return Group {
|
||||
Button(NSLocalizedString("Translated from \(lang)", comment: "Button to indicate that the note has been translated from a different language.")) {
|
||||
show_translated_note = false
|
||||
}
|
||||
.translate_button_style()
|
||||
|
||||
Text(artifacts.content)
|
||||
.font(eventviewsize_to_font(size))
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
}
|
||||
|
||||
func CheckingStatus(lang: String) -> some View {
|
||||
return Button(NSLocalizedString("Translating from \(lang)...", comment: "Button to indicate that the note is in the process of being translated from a different language.")) {
|
||||
show_translated_note = false
|
||||
}
|
||||
.translate_button_style()
|
||||
}
|
||||
|
||||
func MainContent(note_lang: String) -> some View {
|
||||
return Group {
|
||||
let languageName = Locale.current.localizedString(forLanguageCode: note_lang)
|
||||
if let lang = languageName, show_translated_note {
|
||||
if checkingTranslationStatus {
|
||||
CheckingStatus(lang: lang)
|
||||
} else if let artifacts = translated_artifacts {
|
||||
Translated(lang: lang, artifacts: artifacts)
|
||||
}
|
||||
} else {
|
||||
TranslateButton
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
Group {
|
||||
if let note_lang = noteLanguage, noteLanguage != currentLanguage {
|
||||
MainContent(note_lang: note_lang)
|
||||
} else {
|
||||
Text("")
|
||||
}
|
||||
}
|
||||
.task {
|
||||
let translate_url = damus_state.settings.libretranslate_url
|
||||
let api_key = damus_state.settings.libretranslate_api_key
|
||||
|
||||
guard noteLanguage == nil && !checkingTranslationStatus && translate_url != "" else {
|
||||
return
|
||||
}
|
||||
|
||||
checkingTranslationStatus = true
|
||||
|
||||
if #available(iOS 16, *) {
|
||||
currentLanguage = Locale.current.language.languageCode?.identifier ?? "en"
|
||||
} else {
|
||||
currentLanguage = Locale.current.languageCode ?? "en"
|
||||
}
|
||||
|
||||
// Rely on Apple's NLLanguageRecognizer to tell us which language it thinks the note is in.
|
||||
let content = event.get_content(damus_state.keypair.privkey)
|
||||
noteLanguage = NLLanguageRecognizer.dominantLanguage(for: content)?.rawValue ?? currentLanguage
|
||||
|
||||
if let lang = noteLanguage, noteLanguage != currentLanguage {
|
||||
// If the detected dominant language is a variant, remove the variant component and just take the language part as LibreTranslate typically only supports the variant-less language.
|
||||
if #available(iOS 16, *) {
|
||||
noteLanguage = Locale.LanguageCode(stringLiteral: lang).identifier(.alpha2)
|
||||
} else {
|
||||
noteLanguage = Locale.canonicalLanguageIdentifier(from: lang)
|
||||
}
|
||||
}
|
||||
|
||||
guard let note_lang = noteLanguage else {
|
||||
noteLanguage = currentLanguage
|
||||
translated_note = nil
|
||||
checkingTranslationStatus = false
|
||||
return
|
||||
}
|
||||
|
||||
if note_lang != currentLanguage {
|
||||
do {
|
||||
// If the note language is different from our language, send a translation request.
|
||||
let translator = Translator(translate_url, apiKey: api_key)
|
||||
translated_note = try await translator.translate(content, from: note_lang, to: currentLanguage)
|
||||
} catch {
|
||||
// If for whatever reason we're not able to figure out the language of the note, or translate the note, fail gracefully and do not retry. It's not the end of the world. Don't want to take down someone's translation server with an accidental denial of service attack.
|
||||
noteLanguage = currentLanguage
|
||||
translated_note = nil
|
||||
}
|
||||
}
|
||||
|
||||
if let translated = translated_note {
|
||||
// Render translated note.
|
||||
let blocks = event.get_blocks(content: translated)
|
||||
let show_images = should_show_images(contacts: damus_state.contacts, ev: event, our_pubkey: damus_state.pubkey)
|
||||
translated_artifacts = render_blocks(blocks: blocks, profiles: damus_state.profiles, privkey: damus_state.keypair.privkey, show_images: show_images)
|
||||
}
|
||||
|
||||
checkingTranslationStatus = false
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct TranslateView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
let ds = test_damus_state()
|
||||
TranslateView(damus_state: ds, event: test_event, size: .selected)
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
//
|
||||
// UserView.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-25.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct UserView: View {
|
||||
let damus_state: DamusState
|
||||
let pubkey: String
|
||||
|
||||
var body: some View {
|
||||
let pmodel = ProfileModel(pubkey: pubkey, damus: damus_state)
|
||||
let followers = FollowersModel(damus_state: damus_state, target: pubkey)
|
||||
let pv = ProfileView(damus_state: damus_state, profile: pmodel, followers: followers)
|
||||
|
||||
NavigationLink(destination: pv) {
|
||||
ProfilePicView(pubkey: pubkey, size: PFP_SIZE, highlight: .none, profiles: damus_state.profiles, contacts: damus_state.contacts)
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
let profile = damus_state.profiles.lookup(id: pubkey)
|
||||
ProfileName(pubkey: pubkey, profile: profile, damus: damus_state, show_friend_confirmed: false, show_nip5_domain: false)
|
||||
if let about = profile?.about {
|
||||
Text(about)
|
||||
.lineLimit(3)
|
||||
.font(.footnote)
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
}
|
||||
}
|
||||
|
||||
struct UserView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
UserView(damus_state: test_damus_state(), pubkey: "pk")
|
||||
}
|
||||
}
|
||||
@@ -1,129 +0,0 @@
|
||||
//
|
||||
// ZapButton.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-17.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ZapButton: View {
|
||||
let damus_state: DamusState
|
||||
let event: NostrEvent
|
||||
let lnurl: String
|
||||
|
||||
@ObservedObject var bar: ActionBarModel
|
||||
|
||||
@State var zapping: Bool = false
|
||||
@State var invoice: String = ""
|
||||
@State var slider_value: Double = 0.0
|
||||
@State var slider_visible: Bool = false
|
||||
@State var showing_select_wallet: Bool = false
|
||||
|
||||
func send_zap() {
|
||||
guard let privkey = damus_state.keypair.privkey else {
|
||||
return
|
||||
}
|
||||
|
||||
// Only take the first 10 because reasons
|
||||
let relays = Array(damus_state.pool.descriptors.prefix(10))
|
||||
let target = ZapTarget.note(id: event.id, author: event.pubkey)
|
||||
// TODO: gather comment?
|
||||
let content = ""
|
||||
let zapreq = make_zap_request_event(pubkey: damus_state.pubkey, privkey: privkey, content: content, relays: relays, target: target)
|
||||
|
||||
zapping = true
|
||||
|
||||
Task {
|
||||
var mpayreq = damus_state.lnurls.lookup(target.pubkey)
|
||||
if mpayreq == nil {
|
||||
mpayreq = await fetch_static_payreq(lnurl)
|
||||
}
|
||||
|
||||
guard let payreq = mpayreq else {
|
||||
// TODO: show error
|
||||
DispatchQueue.main.async {
|
||||
zapping = false
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
DispatchQueue.main.async {
|
||||
damus_state.lnurls.endpoints[target.pubkey] = payreq
|
||||
}
|
||||
|
||||
guard let inv = await fetch_zap_invoice(payreq, zapreq: zapreq, amount: 1000000) else {
|
||||
DispatchQueue.main.async {
|
||||
zapping = false
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
DispatchQueue.main.async {
|
||||
zapping = false
|
||||
|
||||
if should_show_wallet_selector(damus_state.pubkey) {
|
||||
self.invoice = inv
|
||||
self.showing_select_wallet = true
|
||||
} else {
|
||||
open_with_wallet(wallet: get_default_wallet(damus_state.pubkey).model, invoice: inv)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//damus_state.pool.send(.event(zapreq))
|
||||
}
|
||||
|
||||
var zap_img: String {
|
||||
if bar.zapped {
|
||||
return "bolt.fill"
|
||||
}
|
||||
|
||||
if !zapping {
|
||||
return "bolt"
|
||||
}
|
||||
|
||||
return "bolt.horizontal.fill"
|
||||
}
|
||||
|
||||
var zap_color: Color? {
|
||||
if bar.zapped {
|
||||
return Color.orange
|
||||
}
|
||||
|
||||
if !zapping {
|
||||
return nil
|
||||
}
|
||||
|
||||
return Color.yellow
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
EventActionButton(img: zap_img, col: zap_color) {
|
||||
if bar.zapped {
|
||||
//notify(.delete, bar.our_tip)
|
||||
} else if !zapping {
|
||||
send_zap()
|
||||
}
|
||||
}
|
||||
|
||||
Text("\(bar.zap_total > 0 ? "\(format_msats_abbrev(bar.zap_total))" : "")")
|
||||
.offset(x: 22)
|
||||
.font(.footnote)
|
||||
.foregroundColor(bar.zapped ? Color.orange : Color.gray)
|
||||
}
|
||||
.sheet(isPresented: $showing_select_wallet, onDismiss: {showing_select_wallet = false}) {
|
||||
SelectWalletView(showingSelectWallet: $showing_select_wallet, our_pubkey: damus_state.pubkey, invoice: invoice)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
struct ZapButton_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
let bar = ActionBarModel(likes: 0, boosts: 0, zaps: 10, zap_total: 15623414, our_like: nil, our_boost: nil, our_zap: nil)
|
||||
ZapButton(damus_state: test_damus_state(), event: test_event, lnurl: "lnurl", bar: bar)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
//
|
||||
// ZoomableScrollView.swift
|
||||
// damus
|
||||
//
|
||||
// Created by Oleg Abalonski on 1/25/23.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ZoomableScrollView<Content: View>: UIViewRepresentable {
|
||||
|
||||
private var content: Content
|
||||
|
||||
init(@ViewBuilder content: () -> Content) {
|
||||
self.content = content()
|
||||
}
|
||||
|
||||
func makeUIView(context: Context) -> UIScrollView {
|
||||
let scrollView = GesturedScrollView()
|
||||
scrollView.delegate = context.coordinator
|
||||
scrollView.maximumZoomScale = 20
|
||||
scrollView.minimumZoomScale = 1
|
||||
scrollView.bouncesZoom = true
|
||||
scrollView.showsVerticalScrollIndicator = false
|
||||
scrollView.showsHorizontalScrollIndicator = false
|
||||
|
||||
let hostedView = context.coordinator.hostingController.view!
|
||||
hostedView.translatesAutoresizingMaskIntoConstraints = true
|
||||
hostedView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
||||
hostedView.frame = scrollView.bounds
|
||||
hostedView.backgroundColor = .clear
|
||||
scrollView.addSubview(hostedView)
|
||||
|
||||
return scrollView
|
||||
}
|
||||
|
||||
func makeCoordinator() -> Coordinator {
|
||||
return Coordinator(hostingController: UIHostingController(rootView: self.content, ignoreSafeArea: true))
|
||||
}
|
||||
|
||||
func updateUIView(_ uiView: UIScrollView, context: Context) {
|
||||
context.coordinator.hostingController.rootView = self.content
|
||||
assert(context.coordinator.hostingController.view.superview == uiView)
|
||||
}
|
||||
|
||||
class Coordinator: NSObject, UIScrollViewDelegate {
|
||||
var hostingController: UIHostingController<Content>
|
||||
|
||||
init(hostingController: UIHostingController<Content>) {
|
||||
self.hostingController = hostingController
|
||||
}
|
||||
|
||||
func viewForZooming(in scrollView: UIScrollView) -> UIView? {
|
||||
return hostingController.view
|
||||
}
|
||||
|
||||
func scrollViewDidZoom(_ scrollView: UIScrollView) {
|
||||
let viewSize = hostingController.view.frame.size
|
||||
guard let imageSize = scrollView.subviews[0].subviews.last?.frame.size else { return }
|
||||
|
||||
if scrollView.zoomScale > 1 {
|
||||
|
||||
let ratioW = viewSize.width / imageSize.width
|
||||
let ratioH = viewSize.height / imageSize.height
|
||||
|
||||
let ratio = ratioW < ratioH ? ratioW:ratioH
|
||||
|
||||
let newWidth = imageSize.width * ratio
|
||||
let newHeight = imageSize.height * ratio
|
||||
|
||||
let left = 0.5 * (newWidth * scrollView.zoomScale > viewSize.width ? (newWidth - viewSize.width) : (scrollView.frame.width - scrollView.contentSize.width))
|
||||
let top = 0.5 * (newHeight * scrollView.zoomScale > viewSize.height ? (newHeight - viewSize.height) : (scrollView.frame.height - scrollView.contentSize.height))
|
||||
|
||||
scrollView.contentInset = UIEdgeInsets(top: top, left: left, bottom: top, right: left)
|
||||
} else {
|
||||
scrollView.contentInset = .zero
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate class GesturedScrollView: UIScrollView, UIGestureRecognizerDelegate {
|
||||
|
||||
let doubleTapGesture: UITapGestureRecognizer
|
||||
|
||||
override init(frame: CGRect) {
|
||||
doubleTapGesture = UITapGestureRecognizer()
|
||||
super.init(frame: frame)
|
||||
doubleTapGesture.addTarget(self, action: #selector(handleDoubleTap))
|
||||
doubleTapGesture.numberOfTapsRequired = 2
|
||||
addGestureRecognizer(doubleTapGesture)
|
||||
doubleTapGesture.delegate = self
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
@objc func handleDoubleTap(_ gesture: UITapGestureRecognizer) {
|
||||
if self.zoomScale == 1 {
|
||||
let pointInView = gesture.location(in: self.subviews.first)
|
||||
let newZoomScale = self.maximumZoomScale / 4.0
|
||||
let scrollViewSize = self.bounds.size
|
||||
let width = scrollViewSize.width / newZoomScale
|
||||
let height = scrollViewSize.height / newZoomScale
|
||||
let originX = pointInView.x - (width / 2.0)
|
||||
let originY = pointInView.y - (height / 2.0)
|
||||
let zoomRect = CGRect(x: originX, y: originY, width: width, height: height)
|
||||
self.zoom(to: zoomRect, animated: true)
|
||||
} else {
|
||||
self.setZoomScale(self.minimumZoomScale, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
|
||||
return gestureRecognizer == doubleTapGesture
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate extension UIHostingController {
|
||||
|
||||
convenience init(rootView: Content, ignoreSafeArea: Bool) {
|
||||
self.init(rootView: rootView)
|
||||
|
||||
if ignoreSafeArea {
|
||||
disableSafeArea()
|
||||
}
|
||||
}
|
||||
|
||||
func disableSafeArea() {
|
||||
guard let viewClass = object_getClass(view) else { return }
|
||||
|
||||
let viewSubclassName = String(cString: class_getName(viewClass)).appending("_IgnoreSafeArea")
|
||||
if let viewSubclass = NSClassFromString(viewSubclassName) {
|
||||
object_setClass(view, viewSubclass)
|
||||
}
|
||||
else {
|
||||
guard let viewClassNameUtf8 = (viewSubclassName as NSString).utf8String else { return }
|
||||
guard let viewSubclass = objc_allocateClassPair(viewClass, viewClassNameUtf8, 0) else { return }
|
||||
|
||||
if let method = class_getInstanceMethod(UIView.self, #selector(getter: UIView.safeAreaInsets)) {
|
||||
let safeAreaInsets: @convention(block) (AnyObject) -> UIEdgeInsets = { _ in
|
||||
return .zero
|
||||
}
|
||||
class_addMethod(viewSubclass, #selector(getter: UIView.safeAreaInsets), imp_implementationWithBlock(safeAreaInsets), method_getTypeEncoding(method))
|
||||
}
|
||||
|
||||
objc_registerClassPair(viewSubclass)
|
||||
object_setClass(view, viewSubclass)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,11 +11,11 @@ import Kingfisher
|
||||
|
||||
var BOOTSTRAP_RELAYS = [
|
||||
"wss://relay.damus.io",
|
||||
"wss://eden.nostr.land",
|
||||
"wss://relay.snort.social",
|
||||
"wss://nostr.orangepill.dev",
|
||||
"wss://nos.lol",
|
||||
"wss://relay.current.fyi",
|
||||
"wss://nostr-relay.wlvs.space",
|
||||
"wss://nostr.fmt.wiz.biz",
|
||||
"wss://relay.nostr.bg",
|
||||
"wss://nostr.oxtr.dev",
|
||||
"wss://nostr.v0l.io",
|
||||
"wss://brb.io",
|
||||
]
|
||||
|
||||
@@ -26,12 +26,10 @@ struct TimestampedProfile {
|
||||
|
||||
enum Sheets: Identifiable {
|
||||
case post
|
||||
case report(ReportTarget)
|
||||
case reply(NostrEvent)
|
||||
|
||||
var id: String {
|
||||
switch self {
|
||||
case .report: return "report"
|
||||
case .post: return "post"
|
||||
case .reply(let ev): return "reply-" + ev.id
|
||||
}
|
||||
@@ -73,7 +71,6 @@ struct ContentView: View {
|
||||
@State var damus_state: DamusState? = nil
|
||||
@State var selected_timeline: Timeline? = .home
|
||||
@State var is_thread_open: Bool = false
|
||||
@State var is_deleted_account: Bool = false
|
||||
@State var is_profile_open: Bool = false
|
||||
@State var event: NostrEvent? = nil
|
||||
@State var active_profile: String? = nil
|
||||
@@ -82,13 +79,10 @@ struct ContentView: View {
|
||||
@State var profile_open: Bool = false
|
||||
@State var thread_open: Bool = false
|
||||
@State var search_open: Bool = false
|
||||
@State var blocking: String? = nil
|
||||
@State var confirm_block: Bool = false
|
||||
@State var user_blocked_confirm: Bool = false
|
||||
@State var confirm_overwrite_mutelist: Bool = false
|
||||
@State var filter_state : FilterState = .posts_and_replies
|
||||
@State private var isSideBarOpened = false
|
||||
@StateObject var home: HomeModel = HomeModel()
|
||||
@StateObject var user_settings = UserSettingsStore()
|
||||
|
||||
// connect retry timer
|
||||
let timer = Timer.publish(every: 4, on: .main, in: .common).autoconnect()
|
||||
@@ -111,7 +105,7 @@ struct ContentView: View {
|
||||
.tabViewStyle(.page(indexDisplayMode: .never))
|
||||
|
||||
if privkey != nil {
|
||||
PostButtonContainer(is_left_handed: damus_state?.settings.left_handed ?? false) {
|
||||
PostButtonContainer(userSettings: user_settings) {
|
||||
self.active_sheet = .post
|
||||
}
|
||||
}
|
||||
@@ -119,10 +113,9 @@ struct ContentView: View {
|
||||
}
|
||||
.safeAreaInset(edge: .top, spacing: 0) {
|
||||
VStack(spacing: 0) {
|
||||
CustomPicker(selection: $filter_state, content: {
|
||||
Text("Posts", comment: "Label for filter for seeing only posts (instead of posts and replies).").tag(FilterState.posts)
|
||||
Text("Posts & Replies", comment: "Label for filter for seeing posts and replies (instead of only posts).").tag(FilterState.posts_and_replies)
|
||||
})
|
||||
FiltersView
|
||||
//.frame(maxWidth: 275)
|
||||
.padding()
|
||||
Divider()
|
||||
.frame(height: 1)
|
||||
}
|
||||
@@ -138,6 +131,16 @@ struct ContentView: View {
|
||||
}
|
||||
}
|
||||
|
||||
var FiltersView: some View {
|
||||
VStack{
|
||||
Picker(NSLocalizedString("Filter State", comment: "Filter state for seeing either only posts, or posts & replies."), selection: $filter_state) {
|
||||
Text("Posts", comment: "Label for filter for seeing only posts (instead of posts and replies).").tag(FilterState.posts)
|
||||
Text("Posts & Replies", comment: "Label for filter for seeing posts and replies (instead of only posts).").tag(FilterState.posts_and_replies)
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
}
|
||||
}
|
||||
|
||||
func MainContent(damus: DamusState) -> some View {
|
||||
VStack {
|
||||
NavigationLink(destination: MaybeProfileView, isActive: $profile_open) {
|
||||
@@ -226,20 +229,6 @@ struct ContentView: View {
|
||||
}
|
||||
}
|
||||
|
||||
func MaybeReportView(target: ReportTarget) -> some View {
|
||||
Group {
|
||||
if let ds = damus_state {
|
||||
if let sec = ds.keypair.privkey {
|
||||
ReportView(pool: ds.pool, target: target, privkey: sec)
|
||||
} else {
|
||||
EmptyView()
|
||||
}
|
||||
} else {
|
||||
EmptyView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
if let damus = self.damus_state {
|
||||
@@ -252,18 +241,16 @@ struct ContentView: View {
|
||||
Button {
|
||||
isSideBarOpened.toggle()
|
||||
} label: {
|
||||
ProfilePicView(pubkey: damus_state!.pubkey, size: 32, highlight: .none, profiles: damus_state!.profiles, contacts: damus_state!.contacts)
|
||||
ProfilePicView(pubkey: damus_state!.pubkey, size: 32, highlight: .none, profiles: damus_state!.profiles)
|
||||
}
|
||||
}
|
||||
|
||||
ToolbarItem(placement: .navigationBarTrailing) {
|
||||
HStack(alignment: .center) {
|
||||
if home.signal.signal != home.signal.max_signal {
|
||||
NavigationLink(destination: RelayConfigView(state: damus_state!)) {
|
||||
Text("\(home.signal.signal)/\(home.signal.max_signal)", comment: "Fraction of how many of the user's relay servers that are operational.")
|
||||
.font(.callout)
|
||||
.foregroundColor(.gray)
|
||||
}
|
||||
Text("\(home.signal.signal)/\(home.signal.max_signal)", comment: "Fraction of how many of the user's relay servers that are operational.")
|
||||
.font(.callout)
|
||||
.foregroundColor(.gray)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -292,10 +279,8 @@ struct ContentView: View {
|
||||
}
|
||||
.sheet(item: $active_sheet) { item in
|
||||
switch item {
|
||||
case .report(let target):
|
||||
MaybeReportView(target: target)
|
||||
case .post:
|
||||
PostView(replying_to: nil, references: [], damus_state: damus_state!)
|
||||
PostView(replying_to: nil, references: [])
|
||||
case .reply(let event):
|
||||
ReplyView(replying_to: event, damus: damus_state!)
|
||||
}
|
||||
@@ -341,18 +326,6 @@ struct ContentView: View {
|
||||
}
|
||||
.onReceive(handle_notify(.like)) { like in
|
||||
}
|
||||
.onReceive(handle_notify(.deleted_account)) { notif in
|
||||
self.is_deleted_account = true
|
||||
}
|
||||
.onReceive(handle_notify(.report)) { notif in
|
||||
let target = notif.object as! ReportTarget
|
||||
self.active_sheet = .report(target)
|
||||
}
|
||||
.onReceive(handle_notify(.block)) { notif in
|
||||
let pubkey = notif.object as! String
|
||||
self.blocking = pubkey
|
||||
self.confirm_block = true
|
||||
}
|
||||
.onReceive(handle_notify(.broadcast_event)) { obj in
|
||||
let ev = obj.object as! NostrEvent
|
||||
self.damus_state?.pool.send(.event(ev))
|
||||
@@ -427,96 +400,6 @@ struct ContentView: View {
|
||||
.onReceive(timer) { n in
|
||||
self.damus_state?.pool.connect_to_disconnected()
|
||||
}
|
||||
.onReceive(handle_notify(.new_mutes)) { notif in
|
||||
home.filter_muted()
|
||||
}
|
||||
.alert(NSLocalizedString("Deleted Account", comment: "Alert message to indicate this is a deleted account"), isPresented: $is_deleted_account) {
|
||||
Button(NSLocalizedString("Logout", comment: "Button to close the alert that informs that the current account has been deleted.")) {
|
||||
is_deleted_account = false
|
||||
notify(.logout, ())
|
||||
}
|
||||
}
|
||||
.alert(NSLocalizedString("User blocked", comment: "Alert message to indicate the user has been blocked"), isPresented: $user_blocked_confirm, actions: {
|
||||
Button(NSLocalizedString("Thanks!", comment: "Button to close out of alert that informs that the action to block a user was successful.")) {
|
||||
user_blocked_confirm = false
|
||||
}
|
||||
}, message: {
|
||||
if let pubkey = self.blocking {
|
||||
let profile = damus_state!.profiles.lookup(id: pubkey)
|
||||
let name = Profile.displayName(profile: profile, pubkey: pubkey)
|
||||
Text("\(name) has been blocked", comment: "Alert message that informs a user was blocked.")
|
||||
} else {
|
||||
Text("User has been blocked", comment: "Alert message that informs a user was blocked.")
|
||||
}
|
||||
})
|
||||
.alert(NSLocalizedString("Create new mutelist", comment: "Title of alert prompting the user to create a new mutelist."), isPresented: $confirm_overwrite_mutelist, actions: {
|
||||
Button(NSLocalizedString("Cancel", comment: "Button to cancel out of alert that creates a new mutelist.")) {
|
||||
confirm_overwrite_mutelist = false
|
||||
confirm_block = false
|
||||
}
|
||||
|
||||
Button(NSLocalizedString("Yes, Overwrite", comment: "Text of button that confirms to overwrite the existing mutelist.")) {
|
||||
guard let ds = damus_state else {
|
||||
return
|
||||
}
|
||||
|
||||
guard let keypair = ds.keypair.to_full() else {
|
||||
return
|
||||
}
|
||||
|
||||
guard let pubkey = blocking else {
|
||||
return
|
||||
}
|
||||
|
||||
guard let mutelist = create_or_update_mutelist(keypair: keypair, mprev: nil, to_add: pubkey) else {
|
||||
return
|
||||
}
|
||||
|
||||
damus_state?.contacts.set_mutelist(mutelist)
|
||||
ds.pool.send(.event(mutelist))
|
||||
|
||||
confirm_overwrite_mutelist = false
|
||||
confirm_block = false
|
||||
user_blocked_confirm = true
|
||||
}
|
||||
}, message: {
|
||||
Text("No block list found, create a new one? This will overwrite any previous block lists.", comment: "Alert message prompt that asks if the user wants to create a new block list, overwriting previous block lists.")
|
||||
})
|
||||
.alert(NSLocalizedString("Block User", comment: "Title of alert for blocking a user."), isPresented: $confirm_block, actions: {
|
||||
Button(NSLocalizedString("Cancel", comment: "Alert button to cancel out of alert for blocking a user."), role: .cancel) {
|
||||
confirm_block = false
|
||||
}
|
||||
Button(NSLocalizedString("Block", comment: "Alert button to block a user."), role: .destructive) {
|
||||
guard let ds = damus_state else {
|
||||
return
|
||||
}
|
||||
|
||||
if ds.contacts.mutelist == nil {
|
||||
confirm_overwrite_mutelist = true
|
||||
} else {
|
||||
guard let keypair = ds.keypair.to_full() else {
|
||||
return
|
||||
}
|
||||
guard let pubkey = blocking else {
|
||||
return
|
||||
}
|
||||
|
||||
guard let ev = create_or_update_mutelist(keypair: keypair, mprev: ds.contacts.mutelist, to_add: pubkey) else {
|
||||
return
|
||||
}
|
||||
damus_state?.contacts.set_mutelist(ev)
|
||||
ds.pool.send(.event(ev))
|
||||
}
|
||||
}
|
||||
}, message: {
|
||||
if let pubkey = blocking {
|
||||
let profile = damus_state?.profiles.lookup(id: pubkey)
|
||||
let name = Profile.displayName(profile: profile, pubkey: pubkey)
|
||||
Text("Block \(name)?", comment: "Alert message prompt to ask if a user should be blocked.")
|
||||
} else {
|
||||
Text("Could not find user to block...", comment: "Alert message to indicate that the blocked user could not be found.")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func switch_timeline(_ timeline: Timeline) {
|
||||
@@ -559,10 +442,7 @@ struct ContentView: View {
|
||||
tips: TipCounter(our_pubkey: pubkey),
|
||||
profiles: Profiles(),
|
||||
dms: home.dms,
|
||||
previews: PreviewCache(),
|
||||
zaps: Zaps(our_pubkey: pubkey),
|
||||
lnurls: LNUrls(),
|
||||
settings: UserSettingsStore()
|
||||
previews: PreviewCache()
|
||||
)
|
||||
home.damus_state = self.damus_state!
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<string>zeusln</string>
|
||||
<string>zebedee</string>
|
||||
<string>lightning</string>
|
||||
<string>squarecash</string>
|
||||
<string>phoenix</string>
|
||||
<string>lnlink</string>
|
||||
<string>strike</string>
|
||||
|
||||
@@ -11,32 +11,30 @@ import Foundation
|
||||
class ActionBarModel: ObservableObject {
|
||||
@Published var our_like: NostrEvent?
|
||||
@Published var our_boost: NostrEvent?
|
||||
@Published var our_zap: Zap?
|
||||
@Published var our_tip: NostrEvent?
|
||||
@Published var likes: Int
|
||||
@Published var boosts: Int
|
||||
@Published var zaps: Int
|
||||
@Published var zap_total: Int64
|
||||
@Published var tips: Int64
|
||||
|
||||
static func empty() -> ActionBarModel {
|
||||
return ActionBarModel(likes: 0, boosts: 0, zaps: 0, zap_total: 0, our_like: nil, our_boost: nil, our_zap: nil)
|
||||
return ActionBarModel(likes: 0, boosts: 0, tips: 0, our_like: nil, our_boost: nil, our_tip: nil)
|
||||
}
|
||||
|
||||
init(likes: Int, boosts: Int, zaps: Int, zap_total: Int64, our_like: NostrEvent?, our_boost: NostrEvent?, our_zap: Zap?) {
|
||||
init(likes: Int, boosts: Int, tips: Int64, our_like: NostrEvent?, our_boost: NostrEvent?, our_tip: NostrEvent?) {
|
||||
self.likes = likes
|
||||
self.boosts = boosts
|
||||
self.zaps = zaps
|
||||
self.zap_total = zap_total
|
||||
self.tips = tips
|
||||
self.our_like = our_like
|
||||
self.our_boost = our_boost
|
||||
self.our_zap = our_zap
|
||||
self.our_tip = our_tip
|
||||
}
|
||||
|
||||
var is_empty: Bool {
|
||||
return likes == 0 && boosts == 0 && zaps == 0
|
||||
return likes == 0 && boosts == 0 && tips == 0
|
||||
}
|
||||
|
||||
var zapped: Bool {
|
||||
return our_zap != nil
|
||||
var tipped: Bool {
|
||||
return our_tip != nil
|
||||
}
|
||||
|
||||
var liked: Bool {
|
||||
|
||||
@@ -11,51 +11,13 @@ import Foundation
|
||||
class Contacts {
|
||||
private var friends: Set<String> = Set()
|
||||
private var friend_of_friends: Set<String> = Set()
|
||||
private var muted: Set<String> = Set()
|
||||
|
||||
let our_pubkey: String
|
||||
var event: NostrEvent?
|
||||
var mutelist: NostrEvent?
|
||||
|
||||
init(our_pubkey: String) {
|
||||
self.our_pubkey = our_pubkey
|
||||
}
|
||||
|
||||
func is_muted(_ pk: String) -> Bool {
|
||||
return muted.contains(pk)
|
||||
}
|
||||
|
||||
func set_mutelist(_ ev: NostrEvent) {
|
||||
let oldlist = self.mutelist
|
||||
self.mutelist = ev
|
||||
|
||||
let old = Set(oldlist?.referenced_pubkeys.map({ $0.ref_id }) ?? [])
|
||||
let new = Set(ev.referenced_pubkeys.map({ $0.ref_id }))
|
||||
let diff = old.symmetricDifference(new)
|
||||
|
||||
var new_mutes = Array<String>()
|
||||
var new_unmutes = Array<String>()
|
||||
|
||||
for d in diff {
|
||||
if new.contains(d) {
|
||||
new_mutes.append(d)
|
||||
} else {
|
||||
new_unmutes.append(d)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: set local mutelist here
|
||||
self.muted = Set(ev.referenced_pubkeys.map({ $0.ref_id }))
|
||||
|
||||
if new_mutes.count > 0 {
|
||||
notify(.new_mutes, new_mutes)
|
||||
}
|
||||
|
||||
if new_unmutes.count > 0 {
|
||||
notify(.new_unmutes, new_unmutes)
|
||||
}
|
||||
}
|
||||
|
||||
func get_friendosphere() -> [String] {
|
||||
var fs = get_friend_list()
|
||||
fs.append(contentsOf: get_friend_of_friend_list())
|
||||
|
||||
@@ -18,20 +18,17 @@ struct DamusState {
|
||||
let profiles: Profiles
|
||||
let dms: DirectMessagesModel
|
||||
let previews: PreviewCache
|
||||
let zaps: Zaps
|
||||
let lnurls: LNUrls
|
||||
let settings: UserSettingsStore
|
||||
|
||||
var pubkey: String {
|
||||
return keypair.pubkey
|
||||
}
|
||||
|
||||
|
||||
var is_privkey_user: Bool {
|
||||
keypair.privkey != nil
|
||||
}
|
||||
|
||||
|
||||
static var empty: DamusState {
|
||||
return DamusState.init(pool: RelayPool(), keypair: Keypair(pubkey: "", privkey: ""), likes: EventCounter(our_pubkey: ""), boosts: EventCounter(our_pubkey: ""), contacts: Contacts(our_pubkey: ""), tips: TipCounter(our_pubkey: ""), profiles: Profiles(), dms: DirectMessagesModel(our_pubkey: ""), previews: PreviewCache(), zaps: Zaps(our_pubkey: ""), lnurls: LNUrls(), settings: UserSettingsStore())
|
||||
return DamusState.init(pool: RelayPool(), keypair: Keypair(pubkey: "", privkey: ""), likes: EventCounter(our_pubkey: ""), boosts: EventCounter(our_pubkey: ""), contacts: Contacts(our_pubkey: ""), tips: TipCounter(our_pubkey: ""), profiles: Profiles(), dms: DirectMessagesModel(our_pubkey: ""), previews: PreviewCache())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ class FollowersModel: ObservableObject {
|
||||
if ev.known_kind == .contacts {
|
||||
handle_contact_event(ev)
|
||||
} else if ev.known_kind == .metadata {
|
||||
process_metadata_event(our_pubkey: damus_state.pubkey, profiles: damus_state.profiles, ev: ev)
|
||||
process_metadata_event(profiles: damus_state.profiles, ev: ev)
|
||||
}
|
||||
|
||||
case .notice(let msg):
|
||||
|
||||
@@ -60,7 +60,7 @@ class FollowingModel {
|
||||
switch nev {
|
||||
case .event(_, let ev):
|
||||
if ev.kind == 0 {
|
||||
process_metadata_event(our_pubkey: damus_state.pubkey, profiles: damus_state.profiles, ev: ev)
|
||||
process_metadata_event(profiles: damus_state.profiles, ev: ev)
|
||||
}
|
||||
case .notice(let msg):
|
||||
print("followingmodel notice: \(msg)")
|
||||
|
||||
@@ -98,8 +98,6 @@ class HomeModel: ObservableObject {
|
||||
handle_contact_event(sub_id: sub_id, relay_id: relay_id, ev: ev)
|
||||
case .metadata:
|
||||
handle_metadata_event(ev)
|
||||
case .list:
|
||||
handle_list_event(ev)
|
||||
case .boost:
|
||||
handle_boost_event(sub_id: sub_id, ev)
|
||||
case .like:
|
||||
@@ -112,61 +110,9 @@ class HomeModel: ObservableObject {
|
||||
handle_channel_create(ev)
|
||||
case .channel_meta:
|
||||
handle_channel_meta(ev)
|
||||
case .zap:
|
||||
handle_zap_event(ev)
|
||||
}
|
||||
}
|
||||
|
||||
func handle_zap_event_with_zapper(_ ev: NostrEvent, zapper: String) {
|
||||
guard let zap = Zap.from_zap_event(zap_ev: ev, zapper: zapper) else {
|
||||
return
|
||||
}
|
||||
|
||||
damus_state.zaps.add_zap(zap: zap)
|
||||
|
||||
if !insert_uniq_sorted_event(events: ¬ifications, new_ev: ev, cmp: { $0.created_at > $1.created_at }) {
|
||||
return
|
||||
}
|
||||
|
||||
handle_last_event(ev: ev, timeline: .notifications)
|
||||
return
|
||||
}
|
||||
|
||||
func handle_zap_event(_ ev: NostrEvent) {
|
||||
// These are zap notifications
|
||||
guard let ptag = event_tag(ev, name: "p") else {
|
||||
return
|
||||
}
|
||||
|
||||
guard ptag == damus_state.pubkey else {
|
||||
return
|
||||
}
|
||||
|
||||
if let local_zapper = damus_state.profiles.lookup_zapper(pubkey: damus_state.pubkey) {
|
||||
handle_zap_event_with_zapper(ev, zapper: local_zapper)
|
||||
return
|
||||
}
|
||||
|
||||
guard let profile = damus_state.profiles.lookup(id: damus_state.pubkey) else {
|
||||
return
|
||||
}
|
||||
|
||||
guard let lnurl = profile.lnurl else {
|
||||
return
|
||||
}
|
||||
|
||||
Task {
|
||||
guard let zapper = await fetch_zapper_from_lnurl(lnurl) else {
|
||||
return
|
||||
}
|
||||
|
||||
DispatchQueue.main.async {
|
||||
self.handle_zap_event_with_zapper(ev, zapper: zapper)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func handle_channel_create(_ ev: NostrEvent) {
|
||||
guard ev.is_valid else {
|
||||
return
|
||||
@@ -178,12 +124,6 @@ class HomeModel: ObservableObject {
|
||||
func handle_channel_meta(_ ev: NostrEvent) {
|
||||
}
|
||||
|
||||
func filter_muted() {
|
||||
self.events = events.filter { !damus_state.contacts.is_muted($0.pubkey) }
|
||||
self.dms.dms = dms.dms.filter { !damus_state.contacts.is_muted($0.0) }
|
||||
self.notifications = notifications.filter { !damus_state.contacts.is_muted($0.pubkey) }
|
||||
}
|
||||
|
||||
func handle_delete_event(_ ev: NostrEvent) {
|
||||
guard ev.is_valid else {
|
||||
return
|
||||
@@ -286,7 +226,7 @@ class HomeModel: ObservableObject {
|
||||
switch ev {
|
||||
case .event(let sub_id, let ev):
|
||||
// globally handle likes
|
||||
let always_process = sub_id == notifications_subid || sub_id == contacts_subid || sub_id == home_subid || sub_id == dms_subid || sub_id == init_subid || ev.known_kind == .like || ev.known_kind == .zap || ev.known_kind == .contacts || ev.known_kind == .metadata
|
||||
let always_process = sub_id == notifications_subid || sub_id == contacts_subid || sub_id == home_subid || sub_id == dms_subid || sub_id == init_subid || ev.known_kind == .like || ev.known_kind == .contacts || ev.known_kind == .metadata
|
||||
if !always_process {
|
||||
// TODO: other views like threads might have their own sub ids, so ignore those events... or should we?
|
||||
return
|
||||
@@ -334,11 +274,7 @@ class HomeModel: ObservableObject {
|
||||
|
||||
var our_contacts_filter = NostrFilter.filter_kinds([3, 0])
|
||||
our_contacts_filter.authors = [damus_state.pubkey]
|
||||
|
||||
var our_blocklist_filter = NostrFilter.filter_kinds([30000])
|
||||
our_blocklist_filter.parameter = ["mute"]
|
||||
our_blocklist_filter.authors = [damus_state.pubkey]
|
||||
|
||||
|
||||
var dms_filter = NostrFilter.filter_kinds([
|
||||
NostrKind.dm.rawValue,
|
||||
])
|
||||
@@ -369,14 +305,13 @@ class HomeModel: ObservableObject {
|
||||
NostrKind.chat.rawValue,
|
||||
NostrKind.like.rawValue,
|
||||
NostrKind.boost.rawValue,
|
||||
NostrKind.zap.rawValue,
|
||||
])
|
||||
notifications_filter.pubkeys = [damus_state.pubkey]
|
||||
notifications_filter.limit = 100
|
||||
|
||||
var home_filters = [home_filter]
|
||||
var notifications_filters = [notifications_filter]
|
||||
var contacts_filters = [contacts_filter, our_contacts_filter, our_blocklist_filter]
|
||||
var contacts_filters = [contacts_filter, our_contacts_filter]
|
||||
var dms_filters = [dms_filter, our_dms_filter]
|
||||
|
||||
let last_of_kind = relay_id.flatMap { last_event_of_kind[$0] } ?? [:]
|
||||
@@ -400,32 +335,9 @@ class HomeModel: ObservableObject {
|
||||
pool.send(.subscribe(.init(filters: dms_filters, sub_id: dms_subid)))
|
||||
}
|
||||
}
|
||||
|
||||
func handle_list_event(_ ev: NostrEvent) {
|
||||
// we only care about our lists
|
||||
guard ev.pubkey == damus_state.pubkey else {
|
||||
return
|
||||
}
|
||||
|
||||
if let mutelist = damus_state.contacts.mutelist {
|
||||
if ev.created_at <= mutelist.created_at {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
guard let name = get_referenced_ids(tags: ev.tags, key: "d").first else {
|
||||
return
|
||||
}
|
||||
|
||||
guard name.ref_id == "mute" else {
|
||||
return
|
||||
}
|
||||
|
||||
damus_state.contacts.set_mutelist(ev)
|
||||
}
|
||||
|
||||
|
||||
func handle_metadata_event(_ ev: NostrEvent) {
|
||||
process_metadata_event(our_pubkey: damus_state.pubkey, profiles: damus_state.profiles, ev: ev)
|
||||
process_metadata_event(profiles: damus_state.profiles, ev: ev)
|
||||
}
|
||||
|
||||
func get_last_event_of_kind(relay_id: String, kind: Int) -> NostrEvent? {
|
||||
@@ -463,8 +375,12 @@ class HomeModel: ObservableObject {
|
||||
return ok
|
||||
}
|
||||
|
||||
func should_hide_event(_ ev: NostrEvent) -> Bool {
|
||||
return !ev.should_show_event
|
||||
}
|
||||
|
||||
func handle_text_event(sub_id: String, _ ev: NostrEvent) {
|
||||
if should_hide_event(contacts: damus_state.contacts, ev: ev) {
|
||||
if should_hide_event(ev) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -583,17 +499,10 @@ func print_filters(relay_id: String?, filters groups: [[NostrFilter]]) {
|
||||
print("-----")
|
||||
}
|
||||
|
||||
func process_metadata_event(our_pubkey: String, profiles: Profiles, ev: NostrEvent) {
|
||||
func process_metadata_event(profiles: Profiles, ev: NostrEvent) {
|
||||
guard let profile: Profile = decode_data(Data(ev.content.utf8)) else {
|
||||
return
|
||||
}
|
||||
|
||||
if our_pubkey == ev.pubkey && (profile.deleted ?? false) {
|
||||
DispatchQueue.main.async {
|
||||
notify(.deleted_account, ())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
var old_nip05: String? = nil
|
||||
if let mprof = profiles.lookup_with_timestamp(id: ev.pubkey) {
|
||||
@@ -779,12 +688,3 @@ func event_has_our_pubkey(_ ev: NostrEvent, our_pubkey: String) -> Bool {
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
func should_hide_event(contacts: Contacts, ev: NostrEvent) -> Bool {
|
||||
if contacts.is_muted(ev.pubkey) {
|
||||
return true
|
||||
}
|
||||
return !ev.should_show_event
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
// Created by Oleg Abalonski on 1/11/23.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import Foundation
|
||||
import Kingfisher
|
||||
import SVGKit
|
||||
|
||||
class KFImageModel: ObservableObject {
|
||||
|
||||
@@ -79,15 +80,8 @@ struct CustomImageProcessor: ImageProcessor {
|
||||
}
|
||||
|
||||
// Handle SVG image
|
||||
if let dataString = String(data: data, encoding: .utf8),
|
||||
let svg = SVG(dataString) {
|
||||
|
||||
let render = UIGraphicsImageRenderer(size: svg.size)
|
||||
let image = render.image { context in
|
||||
svg.draw(in: context.cgContext)
|
||||
}
|
||||
|
||||
return image.kf.scaled(to: options.scaleFactor)
|
||||
if let svgImage = SVGKImage(data: data), let image = svgImage.uiImage {
|
||||
return image.kf.scaled(to: options.scaleFactor)
|
||||
}
|
||||
|
||||
return DefaultImageProcessor.default.process(item: item, options: options)
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
//
|
||||
// LibreTranslateServer.swift
|
||||
// damus
|
||||
//
|
||||
// Created by Terry Yiu on 1/21/23.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
enum LibreTranslateServer: String, CaseIterable, Identifiable {
|
||||
var id: String { self.rawValue }
|
||||
|
||||
struct Model: Identifiable, Hashable {
|
||||
var id: String { self.tag }
|
||||
var tag: String
|
||||
var displayName: String
|
||||
var url: String?
|
||||
}
|
||||
|
||||
case none
|
||||
case argosopentech
|
||||
case terraprint
|
||||
case vern
|
||||
case custom
|
||||
|
||||
var model: Model {
|
||||
switch self {
|
||||
case .none:
|
||||
return .init(tag: self.rawValue, displayName: NSLocalizedString("None", comment: "Dropdown option for selecting no translation server."), url: nil)
|
||||
case .argosopentech:
|
||||
return .init(tag: self.rawValue, displayName: "translate.argosopentech.com", url: "https://translate.argosopentech.com")
|
||||
case .terraprint:
|
||||
return .init(tag: self.rawValue, displayName: "translate.terraprint.co", url: "https://translate.terraprint.co")
|
||||
case .vern:
|
||||
return .init(tag: self.rawValue, displayName: "lt.vern.cc", url: "https://lt.vern.cc")
|
||||
case .custom:
|
||||
return .init(tag: self.rawValue, displayName: NSLocalizedString("Custom", comment: "Dropdown option for selecting a custom translation server."), url: nil)
|
||||
}
|
||||
}
|
||||
|
||||
static var allModels: [Model] {
|
||||
return Self.allCases.map { $0.model }
|
||||
}
|
||||
}
|
||||
@@ -7,10 +7,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
enum CountResult {
|
||||
case already_counted
|
||||
case success(Int)
|
||||
}
|
||||
|
||||
class EventCounter {
|
||||
var counts: [String: Int] = [:]
|
||||
@@ -18,6 +14,11 @@ class EventCounter {
|
||||
var our_events: [String: NostrEvent] = [:]
|
||||
var our_pubkey: String
|
||||
|
||||
enum CountResult {
|
||||
case already_counted
|
||||
case success(Int)
|
||||
}
|
||||
|
||||
init (our_pubkey: String) {
|
||||
self.our_pubkey = our_pubkey
|
||||
}
|
||||
|
||||
@@ -32,30 +32,13 @@ struct IdBlock: Identifiable {
|
||||
let block: Block
|
||||
}
|
||||
|
||||
typealias Invoice = LightningInvoice<Amount>
|
||||
typealias ZapInvoice = LightningInvoice<Int64>
|
||||
|
||||
enum InvoiceDescription {
|
||||
case description(String)
|
||||
case description_hash(Data)
|
||||
}
|
||||
|
||||
struct LightningInvoice<T> {
|
||||
let description: InvoiceDescription
|
||||
let amount: T
|
||||
struct Invoice {
|
||||
let description: String
|
||||
let amount: Amount
|
||||
let string: String
|
||||
let expiry: UInt64
|
||||
let payment_hash: Data
|
||||
let created_at: UInt64
|
||||
|
||||
var description_string: String {
|
||||
switch description {
|
||||
case .description(let string):
|
||||
return string
|
||||
case .description_hash:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum Block {
|
||||
@@ -206,50 +189,20 @@ enum Amount: Equatable {
|
||||
case .any:
|
||||
return NSLocalizedString("Any", comment: "Any amount of sats")
|
||||
case .specific(let amt):
|
||||
return format_msats(amt)
|
||||
let numberFormatter = NumberFormatter()
|
||||
numberFormatter.numberStyle = .decimal
|
||||
numberFormatter.minimumFractionDigits = 0
|
||||
numberFormatter.maximumFractionDigits = 3
|
||||
numberFormatter.roundingMode = .down
|
||||
|
||||
let sats = NSNumber(value: (Double(amt) / 1000.0))
|
||||
let formattedSats = numberFormatter.string(from: sats) ?? sats.stringValue
|
||||
|
||||
return String(format: NSLocalizedString("sats_count", comment: "Amount of sats."), sats.decimalValue as NSDecimalNumber, formattedSats)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func format_msats_abbrev(_ msats: Int64) -> String {
|
||||
let formatter = NumberFormatter()
|
||||
formatter.numberStyle = .decimal
|
||||
formatter.positiveSuffix = "m"
|
||||
formatter.positivePrefix = ""
|
||||
formatter.minimumFractionDigits = 0
|
||||
formatter.maximumFractionDigits = 3
|
||||
formatter.roundingMode = .down
|
||||
formatter.roundingIncrement = 0.1
|
||||
formatter.multiplier = 1
|
||||
|
||||
let sats = NSNumber(value: (Double(msats) / 1000.0))
|
||||
|
||||
if msats >= 1_000_000*1000 {
|
||||
formatter.positiveSuffix = "m"
|
||||
formatter.multiplier = 0.000001
|
||||
} else if msats >= 1000*1000 {
|
||||
formatter.positiveSuffix = "k"
|
||||
formatter.multiplier = 0.001
|
||||
} else {
|
||||
return sats.stringValue
|
||||
}
|
||||
|
||||
return formatter.string(from: sats) ?? sats.stringValue
|
||||
}
|
||||
|
||||
func format_msats(_ msat: Int64) -> String {
|
||||
let numberFormatter = NumberFormatter()
|
||||
numberFormatter.numberStyle = .decimal
|
||||
numberFormatter.minimumFractionDigits = 0
|
||||
numberFormatter.maximumFractionDigits = 3
|
||||
numberFormatter.roundingMode = .down
|
||||
|
||||
let sats = NSNumber(value: (Double(msat) / 1000.0))
|
||||
let formattedSats = numberFormatter.string(from: sats) ?? sats.stringValue
|
||||
|
||||
return String(format: NSLocalizedString("sats_count", comment: "Amount of sats."), sats.decimalValue as NSDecimalNumber, formattedSats)
|
||||
}
|
||||
|
||||
func convert_invoice_block(_ b: invoice_block) -> Block? {
|
||||
guard let invstr = strblock_to_string(b.invstr) else {
|
||||
return nil
|
||||
@@ -259,8 +212,9 @@ func convert_invoice_block(_ b: invoice_block) -> Block? {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard let description = convert_invoice_description(b11: b11) else {
|
||||
return nil
|
||||
var description = ""
|
||||
if b11.description != nil {
|
||||
description = String(cString: b11.description)
|
||||
}
|
||||
|
||||
let amount: Amount = maybe_pointee(b11.msat).map { .specific(Int64($0.millisatoshis)) } ?? .any
|
||||
@@ -271,18 +225,6 @@ func convert_invoice_block(_ b: invoice_block) -> Block? {
|
||||
return .invoice(Invoice(description: description, amount: amount, string: invstr, expiry: b11.expiry, payment_hash: payment_hash, created_at: created_at))
|
||||
}
|
||||
|
||||
func convert_invoice_description(b11: bolt11) -> InvoiceDescription? {
|
||||
if let desc = b11.description {
|
||||
return .description(String(cString: desc))
|
||||
}
|
||||
|
||||
if var deschash = maybe_pointee(b11.description_hash) {
|
||||
return .description_hash(Data(bytes: &deschash, count: 32))
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_mention_block(ind: Int32, tags: [[String]]) -> Block?
|
||||
{
|
||||
let ind = Int(ind)
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
//
|
||||
// ListModel.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-25.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
/*
|
||||
class MutelistModel: ObservableObject {
|
||||
let contacts: Contacts
|
||||
|
||||
@Published var users: [String]
|
||||
|
||||
}
|
||||
*/
|
||||
@@ -97,7 +97,7 @@ class ProfileModel: ObservableObject, Equatable {
|
||||
} else if ev.known_kind == .contacts {
|
||||
handle_profile_contact_event(ev)
|
||||
} else if ev.known_kind == .metadata {
|
||||
process_metadata_event(our_pubkey: damus.pubkey, profiles: damus.profiles, ev: ev)
|
||||
process_metadata_event(profiles: damus.profiles, ev: ev)
|
||||
}
|
||||
seen_event.insert(ev.id)
|
||||
}
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
//
|
||||
// Report.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-24.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
enum ReportType: String {
|
||||
case explicit
|
||||
case illegal
|
||||
case spam
|
||||
case impersonation
|
||||
}
|
||||
|
||||
struct ReportNoteTarget {
|
||||
let pubkey: String
|
||||
let note_id: String
|
||||
}
|
||||
|
||||
enum ReportTarget {
|
||||
case user(String)
|
||||
case note(ReportNoteTarget)
|
||||
}
|
||||
|
||||
struct Report {
|
||||
let type: ReportType
|
||||
let target: ReportTarget
|
||||
let message: String
|
||||
}
|
||||
|
||||
func create_report_tags(target: ReportTarget, type: ReportType) -> [[String]] {
|
||||
var tags: [[String]]
|
||||
switch target {
|
||||
case .user(let pubkey):
|
||||
tags = [["p", pubkey]]
|
||||
case .note(let notet):
|
||||
tags = [["e", notet.note_id], ["p", notet.pubkey]]
|
||||
}
|
||||
|
||||
tags.append(["report", type.rawValue])
|
||||
return tags
|
||||
}
|
||||
|
||||
func create_report_event(privkey: String, report: Report) -> NostrEvent? {
|
||||
guard let pubkey = privkey_to_pubkey(privkey: privkey) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
let kind = 1984
|
||||
let tags = create_report_tags(target: report.target, type: report.type)
|
||||
let ev = NostrEvent(content: report.message, pubkey: pubkey, kind: kind, tags: tags)
|
||||
|
||||
ev.id = calculate_event_id(ev: ev)
|
||||
ev.sig = sign_event(privkey: privkey, ev: ev)
|
||||
|
||||
return ev
|
||||
}
|
||||
@@ -30,10 +30,6 @@ class SearchHomeModel: ObservableObject {
|
||||
return filter
|
||||
}
|
||||
|
||||
func filter_muted() {
|
||||
events = events.filter { !should_hide_event(contacts: damus_state.contacts, ev: $0) }
|
||||
}
|
||||
|
||||
func subscribe() {
|
||||
loading = true
|
||||
damus_state.pool.subscribe(sub_id: base_subid, filters: [get_base_filter()], handler: handle_event)
|
||||
@@ -54,7 +50,7 @@ class SearchHomeModel: ObservableObject {
|
||||
guard sub_id == self.base_subid || sub_id == self.profiles_subid else {
|
||||
return
|
||||
}
|
||||
if ev.is_textlike && !should_hide_event(contacts: damus_state.contacts, ev: ev) && !ev.is_reply(nil) {
|
||||
if ev.is_textlike && ev.should_show_event && !ev.is_reply(nil) {
|
||||
if seen_pubkey.contains(ev.pubkey) {
|
||||
return
|
||||
}
|
||||
@@ -129,7 +125,7 @@ func load_profiles(profiles_subid: String, relay_id: String, events: [NostrEvent
|
||||
}
|
||||
|
||||
if ev.known_kind == .metadata {
|
||||
process_metadata_event(our_pubkey: damus_state.pubkey, profiles: damus_state.profiles, ev: ev)
|
||||
process_metadata_event(profiles: damus_state.profiles, ev: ev)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ class ThreadModel: ObservableObject {
|
||||
}
|
||||
|
||||
if ev.known_kind == .metadata {
|
||||
process_metadata_event(our_pubkey: damus_state.pubkey, profiles: damus_state.profiles, ev: ev)
|
||||
process_metadata_event(profiles: damus_state.profiles, ev: ev)
|
||||
} else if ev.is_textlike {
|
||||
self.add_event(ev, privkey: self.damus_state.keypair.privkey)
|
||||
} else if ev.known_kind == .channel_meta || ev.known_kind == .channel_create {
|
||||
|
||||
@@ -6,37 +6,6 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import Vault
|
||||
|
||||
func should_show_wallet_selector(_ pubkey: String) -> Bool {
|
||||
return UserDefaults.standard.object(forKey: "show_wallet_selector") as? Bool ?? true
|
||||
}
|
||||
|
||||
func get_default_wallet(_ pubkey: String) -> Wallet {
|
||||
if let defaultWalletName = UserDefaults.standard.string(forKey: "default_wallet"),
|
||||
let default_wallet = Wallet(rawValue: defaultWalletName)
|
||||
{
|
||||
return default_wallet
|
||||
} else {
|
||||
return .system_default_wallet
|
||||
}
|
||||
}
|
||||
|
||||
func get_libretranslate_server(_ pubkey: String) -> LibreTranslateServer? {
|
||||
guard let server_name = UserDefaults.standard.string(forKey: "libretranslate_server") else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return LibreTranslateServer(rawValue: server_name)
|
||||
}
|
||||
|
||||
func get_libretranslate_url(_ pubkey: String, server: LibreTranslateServer) -> String? {
|
||||
if let url = server.model.url {
|
||||
return url
|
||||
}
|
||||
|
||||
return UserDefaults.standard.object(forKey: "libretranslate_url") as? String
|
||||
}
|
||||
|
||||
class UserSettingsStore: ObservableObject {
|
||||
@Published var default_wallet: Wallet {
|
||||
@@ -57,84 +26,16 @@ class UserSettingsStore: ObservableObject {
|
||||
}
|
||||
}
|
||||
|
||||
@Published var libretranslate_server: LibreTranslateServer {
|
||||
didSet {
|
||||
if oldValue == libretranslate_server {
|
||||
return
|
||||
}
|
||||
|
||||
UserDefaults.standard.set(libretranslate_server.rawValue, forKey: "libretranslate_server")
|
||||
|
||||
libretranslate_api_key = ""
|
||||
|
||||
if libretranslate_server == .custom || libretranslate_server == .none {
|
||||
libretranslate_url = ""
|
||||
} else {
|
||||
libretranslate_url = libretranslate_server.model.url!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Published var libretranslate_url: String {
|
||||
didSet {
|
||||
UserDefaults.standard.set(libretranslate_url, forKey: "libretranslate_url")
|
||||
}
|
||||
}
|
||||
|
||||
@Published var libretranslate_api_key: String {
|
||||
didSet {
|
||||
do {
|
||||
if libretranslate_api_key == "" {
|
||||
try clearLibreTranslateApiKey()
|
||||
} else {
|
||||
try saveLibreTranslateApiKey(libretranslate_api_key)
|
||||
}
|
||||
} catch {
|
||||
// No-op.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
// TODO: pubkey-scoped settings
|
||||
let pubkey = ""
|
||||
self.default_wallet = get_default_wallet(pubkey)
|
||||
show_wallet_selector = should_show_wallet_selector(pubkey)
|
||||
if let defaultWalletName = UserDefaults.standard.string(forKey: "default_wallet"),
|
||||
let default_wallet = Wallet(rawValue: defaultWalletName)
|
||||
{
|
||||
self.default_wallet = default_wallet
|
||||
} else {
|
||||
default_wallet = .system_default_wallet
|
||||
}
|
||||
show_wallet_selector = UserDefaults.standard.object(forKey: "show_wallet_selector") as? Bool ?? true
|
||||
|
||||
left_handed = UserDefaults.standard.object(forKey: "left_handed") as? Bool ?? false
|
||||
|
||||
if let server = get_libretranslate_server(pubkey) {
|
||||
self.libretranslate_server = server
|
||||
self.libretranslate_url = get_libretranslate_url(pubkey, server: server) ?? ""
|
||||
} else {
|
||||
// Note from @tyiu:
|
||||
// Default server is disabled by default for now until we gain some confidence that it is working well in production.
|
||||
// Instead of throwing all Damus users onto feature immediately, allow for discovery of feature organically.
|
||||
// Also, we are connecting to servers listed as mirrors on the official LibreTranslate GitHub README that do not require API keys.
|
||||
// However, we have not asked them for permission to use, so we're trying to be good neighbors for now.
|
||||
// Opportunity: spin up dedicated trusted LibreTranslate server that requires an API key for any access (or higher rate limit access).
|
||||
libretranslate_server = .none
|
||||
libretranslate_url = ""
|
||||
}
|
||||
|
||||
do {
|
||||
libretranslate_api_key = try Vault.getPrivateKey(keychainConfiguration: DamusLibreTranslateKeychainConfiguration())
|
||||
} catch {
|
||||
libretranslate_api_key = ""
|
||||
}
|
||||
}
|
||||
|
||||
func saveLibreTranslateApiKey(_ apiKey: String) throws {
|
||||
try Vault.savePrivateKey(apiKey, keychainConfiguration: DamusLibreTranslateKeychainConfiguration())
|
||||
}
|
||||
|
||||
func clearLibreTranslateApiKey() throws {
|
||||
try Vault.deletePrivateKey(keychainConfiguration: DamusLibreTranslateKeychainConfiguration())
|
||||
}
|
||||
}
|
||||
|
||||
struct DamusLibreTranslateKeychainConfiguration: KeychainConfiguration {
|
||||
var serviceName = "damus"
|
||||
var accessGroup: String? = nil
|
||||
var accountName = "libretranslate_apikey"
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ enum Wallet: String, CaseIterable, Identifiable {
|
||||
return .init(index: 0, tag: "strike", displayName: NSLocalizedString("Strike", comment: "Dropdown option label for Lightning wallet, Strike."), link: "strike:",
|
||||
appStoreLink: "https://apps.apple.com/us/app/strike-bitcoin-payments/id1488724463", image: "strike")
|
||||
case .cashapp:
|
||||
return .init(index: 1, tag: "cashapp", displayName: NSLocalizedString("Cash App", comment: "Dropdown option label for Lightning wallet, Cash App."), link: "https://cash.app/launch/lightning/",
|
||||
return .init(index: 1, tag: "cashapp", displayName: NSLocalizedString("Cash App", comment: "Dropdown option label for Lightning wallet, Cash App."), link: "squarecash://",
|
||||
appStoreLink: "https://apps.apple.com/us/app/cash-app/id711923939", image: "cashapp")
|
||||
case .muun:
|
||||
return .init(index: 2, tag: "muun", displayName: NSLocalizedString("Muun", comment: "Dropdown option label for Lightning wallet, Muun."), link: "muun:", appStoreLink: "https://apps.apple.com/us/app/muun-wallet/id1482037683", image: "muun")
|
||||
@@ -53,7 +53,7 @@ enum Wallet: String, CaseIterable, Identifiable {
|
||||
return .init(index: 3, tag: "bluewallet", displayName: NSLocalizedString("Blue Wallet", comment: "Dropdown option label for Lightning wallet, Blue Wallet."), link: "bluewallet:lightning:",
|
||||
appStoreLink: "https://apps.apple.com/us/app/bluewallet-bitcoin-wallet/id1376878040", image: "bluewallet")
|
||||
case .walletofsatoshi:
|
||||
return .init(index: 4, tag: "walletofsatoshi", displayName: NSLocalizedString("Wallet of Satoshi", comment: "Dropdown option label for Lightning wallet, Wallet of Satoshi."), link: "walletofsatoshi:lightning:",
|
||||
return .init(index: 4, tag: "walletofsatoshi", displayName: NSLocalizedString("Wallet Of Satoshi", comment: "Dropdown option label for Lightning wallet, Wallet Of Satoshi."), link: "walletofsatoshi:lightning:",
|
||||
appStoreLink: "https://apps.apple.com/us/app/wallet-of-satoshi/id1438599608", image: "walletofsatoshi")
|
||||
case .zebedee:
|
||||
return .init(index: 5, tag: "zebedee", displayName: NSLocalizedString("Zebedee", comment: "Dropdown option label for Lightning wallet, Zebedee."), link: "zebedee:lightning:",
|
||||
|
||||
@@ -11,17 +11,13 @@ struct SwipeToDismissModifier: ViewModifier {
|
||||
let minDistance: CGFloat?
|
||||
var onDismiss: () -> Void
|
||||
@State private var offset: CGSize = .zero
|
||||
@GestureState private var viewOffset: CGSize = .zero
|
||||
|
||||
func body(content: Content) -> some View {
|
||||
content
|
||||
.offset(y: viewOffset.height)
|
||||
.animation(.interactiveSpring(), value: viewOffset)
|
||||
.offset(y: offset.height)
|
||||
.animation(.interactiveSpring(), value: offset)
|
||||
.simultaneousGesture(
|
||||
DragGesture(minimumDistance: minDistance ?? 10)
|
||||
.updating($viewOffset, body: { value, gestureState, transaction in
|
||||
gestureState = CGSize(width: value.location.x - value.startLocation.x, height: value.location.y - value.startLocation.y)
|
||||
})
|
||||
.onChanged { gesture in
|
||||
if gesture.translation.width < 50 {
|
||||
offset = gesture.translation
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import Foundation
|
||||
|
||||
struct Profile: Codable {
|
||||
var value: [String: AnyCodable]
|
||||
var value: [String: String]
|
||||
|
||||
init (name: String?, display_name: String?, about: String?, picture: String?, banner: String?, website: String?, lud06: String?, lud16: String?, nip05: String?) {
|
||||
self.value = [:]
|
||||
@@ -23,84 +23,50 @@ struct Profile: Codable {
|
||||
self.nip05 = nip05
|
||||
}
|
||||
|
||||
private func str(_ str: String) -> String? {
|
||||
return get_val(str)
|
||||
}
|
||||
|
||||
private func get_val<T>(_ v: String) -> T? {
|
||||
guard let val = self.value[v] else{
|
||||
return nil
|
||||
}
|
||||
|
||||
guard let s = val.value as? T else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
private mutating func set_val<T>(_ key: String, _ val: T?) {
|
||||
if val == nil {
|
||||
self.value.removeValue(forKey: key)
|
||||
return
|
||||
}
|
||||
|
||||
self.value[key] = AnyCodable.init(val)
|
||||
}
|
||||
|
||||
private mutating func set_str(_ key: String, _ val: String?) {
|
||||
set_val(key, val)
|
||||
}
|
||||
|
||||
var deleted: Bool? {
|
||||
get { return get_val("deleted"); }
|
||||
set(s) { set_val("deleted", s) }
|
||||
}
|
||||
|
||||
var display_name: String? {
|
||||
get { return str("display_name"); }
|
||||
set(s) { set_str("display_name", s) }
|
||||
get { return value["display_name"]; }
|
||||
set(s) { value["display_name"] = s }
|
||||
}
|
||||
|
||||
var name: String? {
|
||||
get { return str("name"); }
|
||||
set(s) { set_str("name", s) }
|
||||
get { return value["name"]; }
|
||||
set(s) { value["name"] = s }
|
||||
}
|
||||
|
||||
var about: String? {
|
||||
get { return str("about"); }
|
||||
set(s) { set_str("about", s) }
|
||||
get { return value["about"]; }
|
||||
set(s) { value["about"] = s }
|
||||
}
|
||||
|
||||
var picture: String? {
|
||||
get { return str("picture"); }
|
||||
set(s) { set_str("picture", s) }
|
||||
get { return value["picture"]; }
|
||||
set(s) { value["picture"] = s }
|
||||
}
|
||||
|
||||
var banner: String? {
|
||||
get { return str("banner"); }
|
||||
set(s) { set_str("banner", s) }
|
||||
get { return value["banner"]; }
|
||||
set(s) { value["banner"] = s }
|
||||
}
|
||||
|
||||
var website: String? {
|
||||
get { return str("website"); }
|
||||
set(s) { set_str("website", s) }
|
||||
}
|
||||
|
||||
var lud06: String? {
|
||||
get { return str("lud06"); }
|
||||
set(s) { set_str("lud06", s) }
|
||||
}
|
||||
|
||||
var lud16: String? {
|
||||
get { return str("lud16"); }
|
||||
set(s) { set_str("lud16", s) }
|
||||
get { return value["website"]; }
|
||||
set(s) { value["website"] = s }
|
||||
}
|
||||
|
||||
var website_url: URL? {
|
||||
return self.website.flatMap { URL(string: $0) }
|
||||
}
|
||||
|
||||
var lud06: String? {
|
||||
get { return value["lud06"]; }
|
||||
set(s) { value["lud06"] = s }
|
||||
}
|
||||
|
||||
var lud16: String? {
|
||||
get { return value["lud16"]; }
|
||||
set(s) { value["lud16"] = s }
|
||||
}
|
||||
|
||||
var lnurl: String? {
|
||||
guard let addr = lud06 ?? lud16 else {
|
||||
return nil;
|
||||
@@ -110,29 +76,21 @@ struct Profile: Codable {
|
||||
return lnaddress_to_lnurl(addr);
|
||||
}
|
||||
|
||||
if !addr.lowercased().hasPrefix("lnurl") {
|
||||
return nil
|
||||
}
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
||||
var nip05: String? {
|
||||
get { return str("nip05"); }
|
||||
set(s) { set_str("nip05", s) }
|
||||
get { return value["nip05"]; }
|
||||
set(s) { value["nip05"] = s }
|
||||
}
|
||||
|
||||
var lightning_uri: URL? {
|
||||
return make_ln_url(self.lnurl)
|
||||
}
|
||||
|
||||
init() {
|
||||
self.value = [:]
|
||||
}
|
||||
|
||||
init(from decoder: Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
self.value = try container.decode([String: AnyCodable].self)
|
||||
self.value = try container.decode([String: String].self)
|
||||
}
|
||||
|
||||
func encode(to encoder: Encoder) throws {
|
||||
|
||||
@@ -11,8 +11,6 @@ import secp256k1
|
||||
import secp256k1_implementation
|
||||
import CryptoKit
|
||||
|
||||
|
||||
|
||||
enum ValidationResult: Decodable {
|
||||
case ok
|
||||
case bad_id
|
||||
@@ -29,7 +27,7 @@ struct KeyEvent {
|
||||
let relay_url: String
|
||||
}
|
||||
|
||||
struct ReferencedId: Identifiable, Hashable, Equatable {
|
||||
struct ReferencedId: Identifiable, Hashable {
|
||||
let ref_id: String
|
||||
let relay_id: String?
|
||||
let key: String
|
||||
@@ -81,7 +79,7 @@ class NostrEvent: Codable, Identifiable, CustomStringConvertible, Equatable, Has
|
||||
}
|
||||
|
||||
var too_big: Bool {
|
||||
return self.content.count > 16000
|
||||
return self.content.count > 32000
|
||||
}
|
||||
|
||||
var should_show_event: Bool {
|
||||
@@ -105,15 +103,11 @@ class NostrEvent: Codable, Identifiable, CustomStringConvertible, Equatable, Has
|
||||
if let bs = _blocks {
|
||||
return bs
|
||||
}
|
||||
let blocks = get_blocks(content: self.get_content(privkey))
|
||||
let blocks = parse_mentions(content: self.get_content(privkey), tags: self.tags)
|
||||
self._blocks = blocks
|
||||
return blocks
|
||||
}
|
||||
|
||||
func get_blocks(content: String) -> [Block] {
|
||||
return parse_mentions(content: content, tags: self.tags)
|
||||
}
|
||||
|
||||
lazy var inner_event: NostrEvent? = {
|
||||
// don't try to deserialize an inner event if we know there won't be one
|
||||
if self.known_kind == .boost {
|
||||
@@ -373,10 +367,6 @@ func encode_json<T: Encodable>(_ val: T) -> String? {
|
||||
return (try? encoder.encode(val)).map { String(decoding: $0, as: UTF8.self) }
|
||||
}
|
||||
|
||||
func decode_nostr_event_json(json: String) -> NostrEvent? {
|
||||
return decode_json(json)
|
||||
}
|
||||
|
||||
func decode_json<T: Decodable>(_ val: String) -> T? {
|
||||
return try? JSONDecoder().decode(T.self, from: Data(val.utf8))
|
||||
}
|
||||
@@ -577,26 +567,6 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent) -> Nost
|
||||
return ev
|
||||
}
|
||||
|
||||
func zap_target_to_tags(_ target: ZapTarget) -> [[String]] {
|
||||
switch target {
|
||||
case .profile(let pk):
|
||||
return [["p", pk]]
|
||||
case .note(let note_target):
|
||||
return [["e", note_target.note_id], ["p", note_target.author]]
|
||||
}
|
||||
}
|
||||
|
||||
func make_zap_request_event(pubkey: String, privkey: String, content: String, relays: [RelayDescriptor], target: ZapTarget) -> NostrEvent {
|
||||
var tags = zap_target_to_tags(target)
|
||||
var relay_tag = ["relays"]
|
||||
relay_tag.append(contentsOf: relays.map { $0.url.absoluteString })
|
||||
tags.append(relay_tag)
|
||||
let ev = NostrEvent(content: content, pubkey: pubkey, kind: 9734, tags: tags)
|
||||
ev.id = calculate_event_id(ev: ev)
|
||||
ev.sig = sign_event(privkey: privkey, ev: ev)
|
||||
return ev
|
||||
}
|
||||
|
||||
func gather_reply_ids(our_pubkey: String, from: NostrEvent) -> [ReferencedId] {
|
||||
var ids = get_referenced_ids(tags: from.tags, key: "e").first.map { [$0] } ?? []
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
struct NostrFilter: Codable, Equatable {
|
||||
struct NostrFilter: Codable {
|
||||
var ids: [String]?
|
||||
var kinds: [Int]?
|
||||
var referenced_ids: [String]?
|
||||
@@ -17,7 +17,6 @@ struct NostrFilter: Codable, Equatable {
|
||||
var limit: UInt32?
|
||||
var authors: [String]?
|
||||
var hashtag: [String]? = nil
|
||||
var parameter: [String]? = nil
|
||||
|
||||
private enum CodingKeys : String, CodingKey {
|
||||
case ids
|
||||
@@ -25,7 +24,6 @@ struct NostrFilter: Codable, Equatable {
|
||||
case referenced_ids = "#e"
|
||||
case pubkeys = "#p"
|
||||
case hashtag = "#t"
|
||||
case parameter = "#d"
|
||||
case since
|
||||
case until
|
||||
case authors
|
||||
|
||||
@@ -19,6 +19,4 @@ enum NostrKind: Int {
|
||||
case channel_create = 40
|
||||
case channel_meta = 41
|
||||
case chat = 42
|
||||
case list = 30000
|
||||
case zap = 9735
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
enum NostrLink: Equatable {
|
||||
enum NostrLink {
|
||||
case ref(ReferencedId)
|
||||
case filter(NostrFilter)
|
||||
}
|
||||
@@ -101,24 +101,6 @@ func decode_universal_link(_ s: String) -> NostrLink? {
|
||||
return nil
|
||||
}
|
||||
|
||||
func decode_nostr_bech32_uri(_ s: String) -> NostrLink? {
|
||||
guard let obj = Bech32Object.parse(s) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
switch obj {
|
||||
case .nsec(let privkey):
|
||||
guard let pubkey = privkey_to_pubkey(privkey: privkey) else {
|
||||
return nil
|
||||
}
|
||||
return .ref(ReferencedId(ref_id: pubkey, relay_id: nil, key: "p"))
|
||||
case .npub(let pubkey):
|
||||
return .ref(ReferencedId(ref_id: pubkey, relay_id: nil, key: "p"))
|
||||
case .note(let id):
|
||||
return .ref(ReferencedId(ref_id: id, relay_id: nil, key: "e"))
|
||||
}
|
||||
}
|
||||
|
||||
func decode_nostr_uri(_ s: String) -> NostrLink? {
|
||||
if s.starts(with: "https://damus.io/") {
|
||||
return decode_universal_link(s)
|
||||
@@ -140,15 +122,5 @@ func decode_nostr_uri(_ s: String) -> NostrLink? {
|
||||
return .filter(NostrFilter.filter_hashtag([parts[1].lowercased()]))
|
||||
}
|
||||
|
||||
if let rid = tag_to_refid(parts) {
|
||||
return .ref(rid)
|
||||
}
|
||||
|
||||
guard parts.count == 1 else {
|
||||
return nil
|
||||
}
|
||||
|
||||
let part = parts[0]
|
||||
|
||||
return decode_nostr_bech32_uri(part)
|
||||
return tag_to_refid(parts).map { .ref($0) }
|
||||
}
|
||||
|
||||
@@ -12,20 +12,11 @@ import UIKit
|
||||
class Profiles {
|
||||
var profiles: [String: TimestampedProfile] = [:]
|
||||
var validated: [String: NIP05] = [:]
|
||||
var zappers: [String: String] = [:]
|
||||
|
||||
func is_validated(_ pk: String) -> NIP05? {
|
||||
return validated[pk]
|
||||
}
|
||||
|
||||
func lookup_zapper(pubkey: String) -> String? {
|
||||
if let zapper = zappers[pubkey] {
|
||||
return zapper
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func add(id: String, profile: TimestampedProfile) {
|
||||
profiles[id] = profile
|
||||
}
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct RelayInfo: Codable {
|
||||
struct RelayInfo: Codable {
|
||||
let read: Bool
|
||||
let write: Bool
|
||||
|
||||
static let rw = RelayInfo(read: true, write: true)
|
||||
}
|
||||
|
||||
public struct RelayDescriptor: Codable {
|
||||
public let url: URL
|
||||
public let info: RelayInfo
|
||||
struct RelayDescriptor: Codable {
|
||||
let url: URL
|
||||
let info: RelayInfo
|
||||
}
|
||||
|
||||
enum RelayFlags: Int {
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// AccountDeletion.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-30.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
func created_deleted_account_profile(keypair: FullKeypair) -> NostrEvent {
|
||||
var profile = Profile()
|
||||
profile.deleted = true
|
||||
profile.about = "account deleted"
|
||||
profile.name = "nobody"
|
||||
|
||||
let content = encode_json(profile)!
|
||||
let ev = NostrEvent(content: content, pubkey: keypair.pubkey, kind: 0)
|
||||
ev.id = calculate_event_id(ev: ev)
|
||||
ev.sig = sign_event(privkey: keypair.privkey, ev: ev)
|
||||
return ev
|
||||
}
|
||||
@@ -1,147 +0,0 @@
|
||||
import Foundation
|
||||
/**
|
||||
A type-erased `Codable` value.
|
||||
|
||||
The `AnyCodable` type forwards encoding and decoding responsibilities
|
||||
to an underlying value, hiding its specific underlying type.
|
||||
|
||||
You can encode or decode mixed-type values in dictionaries
|
||||
and other collections that require `Encodable` or `Decodable` conformance
|
||||
by declaring their contained type to be `AnyCodable`.
|
||||
|
||||
- SeeAlso: `AnyEncodable`
|
||||
- SeeAlso: `AnyDecodable`
|
||||
*/
|
||||
@frozen public struct AnyCodable: Codable {
|
||||
public let value: Any
|
||||
|
||||
public init<T>(_ value: T?) {
|
||||
self.value = value ?? ()
|
||||
}
|
||||
}
|
||||
|
||||
extension AnyCodable: _AnyEncodable, _AnyDecodable {}
|
||||
|
||||
extension AnyCodable: Equatable {
|
||||
public static func == (lhs: AnyCodable, rhs: AnyCodable) -> Bool {
|
||||
switch (lhs.value, rhs.value) {
|
||||
case is (Void, Void):
|
||||
return true
|
||||
case let (lhs as Bool, rhs as Bool):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int, rhs as Int):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int8, rhs as Int8):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int16, rhs as Int16):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int32, rhs as Int32):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int64, rhs as Int64):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt, rhs as UInt):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt8, rhs as UInt8):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt16, rhs as UInt16):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt32, rhs as UInt32):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt64, rhs as UInt64):
|
||||
return lhs == rhs
|
||||
case let (lhs as Float, rhs as Float):
|
||||
return lhs == rhs
|
||||
case let (lhs as Double, rhs as Double):
|
||||
return lhs == rhs
|
||||
case let (lhs as String, rhs as String):
|
||||
return lhs == rhs
|
||||
case let (lhs as [String: AnyCodable], rhs as [String: AnyCodable]):
|
||||
return lhs == rhs
|
||||
case let (lhs as [AnyCodable], rhs as [AnyCodable]):
|
||||
return lhs == rhs
|
||||
case let (lhs as [String: Any], rhs as [String: Any]):
|
||||
return NSDictionary(dictionary: lhs) == NSDictionary(dictionary: rhs)
|
||||
case let (lhs as [Any], rhs as [Any]):
|
||||
return NSArray(array: lhs) == NSArray(array: rhs)
|
||||
case is (NSNull, NSNull):
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AnyCodable: CustomStringConvertible {
|
||||
public var description: String {
|
||||
switch value {
|
||||
case is Void:
|
||||
return String(describing: nil as Any?)
|
||||
case let value as CustomStringConvertible:
|
||||
return value.description
|
||||
default:
|
||||
return String(describing: value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AnyCodable: CustomDebugStringConvertible {
|
||||
public var debugDescription: String {
|
||||
switch value {
|
||||
case let value as CustomDebugStringConvertible:
|
||||
return "AnyCodable(\(value.debugDescription))"
|
||||
default:
|
||||
return "AnyCodable(\(description))"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AnyCodable: ExpressibleByNilLiteral {}
|
||||
extension AnyCodable: ExpressibleByBooleanLiteral {}
|
||||
extension AnyCodable: ExpressibleByIntegerLiteral {}
|
||||
extension AnyCodable: ExpressibleByFloatLiteral {}
|
||||
extension AnyCodable: ExpressibleByStringLiteral {}
|
||||
extension AnyCodable: ExpressibleByStringInterpolation {}
|
||||
extension AnyCodable: ExpressibleByArrayLiteral {}
|
||||
extension AnyCodable: ExpressibleByDictionaryLiteral {}
|
||||
|
||||
|
||||
extension AnyCodable: Hashable {
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
switch value {
|
||||
case let value as Bool:
|
||||
hasher.combine(value)
|
||||
case let value as Int:
|
||||
hasher.combine(value)
|
||||
case let value as Int8:
|
||||
hasher.combine(value)
|
||||
case let value as Int16:
|
||||
hasher.combine(value)
|
||||
case let value as Int32:
|
||||
hasher.combine(value)
|
||||
case let value as Int64:
|
||||
hasher.combine(value)
|
||||
case let value as UInt:
|
||||
hasher.combine(value)
|
||||
case let value as UInt8:
|
||||
hasher.combine(value)
|
||||
case let value as UInt16:
|
||||
hasher.combine(value)
|
||||
case let value as UInt32:
|
||||
hasher.combine(value)
|
||||
case let value as UInt64:
|
||||
hasher.combine(value)
|
||||
case let value as Float:
|
||||
hasher.combine(value)
|
||||
case let value as Double:
|
||||
hasher.combine(value)
|
||||
case let value as String:
|
||||
hasher.combine(value)
|
||||
case let value as [String: AnyCodable]:
|
||||
hasher.combine(value)
|
||||
case let value as [AnyCodable]:
|
||||
hasher.combine(value)
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
#if canImport(Foundation)
|
||||
import Foundation
|
||||
#endif
|
||||
|
||||
/**
|
||||
A type-erased `Decodable` value.
|
||||
|
||||
The `AnyDecodable` type forwards decoding responsibilities
|
||||
to an underlying value, hiding its specific underlying type.
|
||||
|
||||
You can decode mixed-type values in dictionaries
|
||||
and other collections that require `Decodable` conformance
|
||||
by declaring their contained type to be `AnyDecodable`:
|
||||
|
||||
let json = """
|
||||
{
|
||||
"boolean": true,
|
||||
"integer": 42,
|
||||
"double": 3.141592653589793,
|
||||
"string": "string",
|
||||
"array": [1, 2, 3],
|
||||
"nested": {
|
||||
"a": "alpha",
|
||||
"b": "bravo",
|
||||
"c": "charlie"
|
||||
},
|
||||
"null": null
|
||||
}
|
||||
""".data(using: .utf8)!
|
||||
|
||||
let decoder = JSONDecoder()
|
||||
let dictionary = try! decoder.decode([String: AnyDecodable].self, from: json)
|
||||
*/
|
||||
@frozen public struct AnyDecodable: Decodable {
|
||||
public let value: Any
|
||||
|
||||
public init<T>(_ value: T?) {
|
||||
self.value = value ?? ()
|
||||
}
|
||||
}
|
||||
|
||||
@usableFromInline
|
||||
protocol _AnyDecodable {
|
||||
var value: Any { get }
|
||||
init<T>(_ value: T?)
|
||||
}
|
||||
|
||||
extension AnyDecodable: _AnyDecodable {}
|
||||
|
||||
extension _AnyDecodable {
|
||||
public init(from decoder: Decoder) throws {
|
||||
let container = try decoder.singleValueContainer()
|
||||
|
||||
if container.decodeNil() {
|
||||
#if canImport(Foundation)
|
||||
self.init(NSNull())
|
||||
#else
|
||||
self.init(Optional<Self>.none)
|
||||
#endif
|
||||
} else if let bool = try? container.decode(Bool.self) {
|
||||
self.init(bool)
|
||||
} else if let int = try? container.decode(Int.self) {
|
||||
self.init(int)
|
||||
} else if let uint = try? container.decode(UInt.self) {
|
||||
self.init(uint)
|
||||
} else if let double = try? container.decode(Double.self) {
|
||||
self.init(double)
|
||||
} else if let string = try? container.decode(String.self) {
|
||||
self.init(string)
|
||||
} else if let array = try? container.decode([AnyDecodable].self) {
|
||||
self.init(array.map { $0.value })
|
||||
} else if let dictionary = try? container.decode([String: AnyDecodable].self) {
|
||||
self.init(dictionary.mapValues { $0.value })
|
||||
} else {
|
||||
throw DecodingError.dataCorruptedError(in: container, debugDescription: "AnyDecodable value cannot be decoded")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AnyDecodable: Equatable {
|
||||
public static func == (lhs: AnyDecodable, rhs: AnyDecodable) -> Bool {
|
||||
switch (lhs.value, rhs.value) {
|
||||
#if canImport(Foundation)
|
||||
case is (NSNull, NSNull), is (Void, Void):
|
||||
return true
|
||||
#endif
|
||||
case let (lhs as Bool, rhs as Bool):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int, rhs as Int):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int8, rhs as Int8):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int16, rhs as Int16):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int32, rhs as Int32):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int64, rhs as Int64):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt, rhs as UInt):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt8, rhs as UInt8):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt16, rhs as UInt16):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt32, rhs as UInt32):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt64, rhs as UInt64):
|
||||
return lhs == rhs
|
||||
case let (lhs as Float, rhs as Float):
|
||||
return lhs == rhs
|
||||
case let (lhs as Double, rhs as Double):
|
||||
return lhs == rhs
|
||||
case let (lhs as String, rhs as String):
|
||||
return lhs == rhs
|
||||
case let (lhs as [String: AnyDecodable], rhs as [String: AnyDecodable]):
|
||||
return lhs == rhs
|
||||
case let (lhs as [AnyDecodable], rhs as [AnyDecodable]):
|
||||
return lhs == rhs
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AnyDecodable: CustomStringConvertible {
|
||||
public var description: String {
|
||||
switch value {
|
||||
case is Void:
|
||||
return String(describing: nil as Any?)
|
||||
case let value as CustomStringConvertible:
|
||||
return value.description
|
||||
default:
|
||||
return String(describing: value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AnyDecodable: CustomDebugStringConvertible {
|
||||
public var debugDescription: String {
|
||||
switch value {
|
||||
case let value as CustomDebugStringConvertible:
|
||||
return "AnyDecodable(\(value.debugDescription))"
|
||||
default:
|
||||
return "AnyDecodable(\(description))"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AnyDecodable: Hashable {
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
switch value {
|
||||
case let value as Bool:
|
||||
hasher.combine(value)
|
||||
case let value as Int:
|
||||
hasher.combine(value)
|
||||
case let value as Int8:
|
||||
hasher.combine(value)
|
||||
case let value as Int16:
|
||||
hasher.combine(value)
|
||||
case let value as Int32:
|
||||
hasher.combine(value)
|
||||
case let value as Int64:
|
||||
hasher.combine(value)
|
||||
case let value as UInt:
|
||||
hasher.combine(value)
|
||||
case let value as UInt8:
|
||||
hasher.combine(value)
|
||||
case let value as UInt16:
|
||||
hasher.combine(value)
|
||||
case let value as UInt32:
|
||||
hasher.combine(value)
|
||||
case let value as UInt64:
|
||||
hasher.combine(value)
|
||||
case let value as Float:
|
||||
hasher.combine(value)
|
||||
case let value as Double:
|
||||
hasher.combine(value)
|
||||
case let value as String:
|
||||
hasher.combine(value)
|
||||
case let value as [String: AnyDecodable]:
|
||||
hasher.combine(value)
|
||||
case let value as [AnyDecodable]:
|
||||
hasher.combine(value)
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,291 +0,0 @@
|
||||
#if canImport(Foundation)
|
||||
import Foundation
|
||||
#endif
|
||||
|
||||
/**
|
||||
A type-erased `Encodable` value.
|
||||
|
||||
The `AnyEncodable` type forwards encoding responsibilities
|
||||
to an underlying value, hiding its specific underlying type.
|
||||
|
||||
You can encode mixed-type values in dictionaries
|
||||
and other collections that require `Encodable` conformance
|
||||
by declaring their contained type to be `AnyEncodable`:
|
||||
|
||||
let dictionary: [String: AnyEncodable] = [
|
||||
"boolean": true,
|
||||
"integer": 42,
|
||||
"double": 3.141592653589793,
|
||||
"string": "string",
|
||||
"array": [1, 2, 3],
|
||||
"nested": [
|
||||
"a": "alpha",
|
||||
"b": "bravo",
|
||||
"c": "charlie"
|
||||
],
|
||||
"null": nil
|
||||
]
|
||||
|
||||
let encoder = JSONEncoder()
|
||||
let json = try! encoder.encode(dictionary)
|
||||
*/
|
||||
@frozen public struct AnyEncodable: Encodable {
|
||||
public let value: Any
|
||||
|
||||
public init<T>(_ value: T?) {
|
||||
self.value = value ?? ()
|
||||
}
|
||||
}
|
||||
|
||||
@usableFromInline
|
||||
protocol _AnyEncodable {
|
||||
var value: Any { get }
|
||||
init<T>(_ value: T?)
|
||||
}
|
||||
|
||||
extension AnyEncodable: _AnyEncodable {}
|
||||
|
||||
// MARK: - Encodable
|
||||
|
||||
extension _AnyEncodable {
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.singleValueContainer()
|
||||
|
||||
switch value {
|
||||
#if canImport(Foundation)
|
||||
case is NSNull:
|
||||
try container.encodeNil()
|
||||
#endif
|
||||
case is Void:
|
||||
try container.encodeNil()
|
||||
case let bool as Bool:
|
||||
try container.encode(bool)
|
||||
case let int as Int:
|
||||
try container.encode(int)
|
||||
case let int8 as Int8:
|
||||
try container.encode(int8)
|
||||
case let int16 as Int16:
|
||||
try container.encode(int16)
|
||||
case let int32 as Int32:
|
||||
try container.encode(int32)
|
||||
case let int64 as Int64:
|
||||
try container.encode(int64)
|
||||
case let uint as UInt:
|
||||
try container.encode(uint)
|
||||
case let uint8 as UInt8:
|
||||
try container.encode(uint8)
|
||||
case let uint16 as UInt16:
|
||||
try container.encode(uint16)
|
||||
case let uint32 as UInt32:
|
||||
try container.encode(uint32)
|
||||
case let uint64 as UInt64:
|
||||
try container.encode(uint64)
|
||||
case let float as Float:
|
||||
try container.encode(float)
|
||||
case let double as Double:
|
||||
try container.encode(double)
|
||||
case let string as String:
|
||||
try container.encode(string)
|
||||
#if canImport(Foundation)
|
||||
case let number as NSNumber:
|
||||
try encode(nsnumber: number, into: &container)
|
||||
case let date as Date:
|
||||
try container.encode(date)
|
||||
case let url as URL:
|
||||
try container.encode(url)
|
||||
#endif
|
||||
case let array as [Any?]:
|
||||
try container.encode(array.map { AnyEncodable($0) })
|
||||
case let dictionary as [String: Any?]:
|
||||
try container.encode(dictionary.mapValues { AnyEncodable($0) })
|
||||
case let encodable as Encodable:
|
||||
try encodable.encode(to: encoder)
|
||||
default:
|
||||
let context = EncodingError.Context(codingPath: container.codingPath, debugDescription: "AnyEncodable value cannot be encoded")
|
||||
throw EncodingError.invalidValue(value, context)
|
||||
}
|
||||
}
|
||||
|
||||
#if canImport(Foundation)
|
||||
private func encode(nsnumber: NSNumber, into container: inout SingleValueEncodingContainer) throws {
|
||||
switch Character(Unicode.Scalar(UInt8(nsnumber.objCType.pointee))) {
|
||||
case "B":
|
||||
try container.encode(nsnumber.boolValue)
|
||||
case "c":
|
||||
try container.encode(nsnumber.int8Value)
|
||||
case "s":
|
||||
try container.encode(nsnumber.int16Value)
|
||||
case "i", "l":
|
||||
try container.encode(nsnumber.int32Value)
|
||||
case "q":
|
||||
try container.encode(nsnumber.int64Value)
|
||||
case "C":
|
||||
try container.encode(nsnumber.uint8Value)
|
||||
case "S":
|
||||
try container.encode(nsnumber.uint16Value)
|
||||
case "I", "L":
|
||||
try container.encode(nsnumber.uint32Value)
|
||||
case "Q":
|
||||
try container.encode(nsnumber.uint64Value)
|
||||
case "f":
|
||||
try container.encode(nsnumber.floatValue)
|
||||
case "d":
|
||||
try container.encode(nsnumber.doubleValue)
|
||||
default:
|
||||
let context = EncodingError.Context(codingPath: container.codingPath, debugDescription: "NSNumber cannot be encoded because its type is not handled")
|
||||
throw EncodingError.invalidValue(nsnumber, context)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
extension AnyEncodable: Equatable {
|
||||
public static func == (lhs: AnyEncodable, rhs: AnyEncodable) -> Bool {
|
||||
switch (lhs.value, rhs.value) {
|
||||
case is (Void, Void):
|
||||
return true
|
||||
case let (lhs as Bool, rhs as Bool):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int, rhs as Int):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int8, rhs as Int8):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int16, rhs as Int16):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int32, rhs as Int32):
|
||||
return lhs == rhs
|
||||
case let (lhs as Int64, rhs as Int64):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt, rhs as UInt):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt8, rhs as UInt8):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt16, rhs as UInt16):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt32, rhs as UInt32):
|
||||
return lhs == rhs
|
||||
case let (lhs as UInt64, rhs as UInt64):
|
||||
return lhs == rhs
|
||||
case let (lhs as Float, rhs as Float):
|
||||
return lhs == rhs
|
||||
case let (lhs as Double, rhs as Double):
|
||||
return lhs == rhs
|
||||
case let (lhs as String, rhs as String):
|
||||
return lhs == rhs
|
||||
case let (lhs as [String: AnyEncodable], rhs as [String: AnyEncodable]):
|
||||
return lhs == rhs
|
||||
case let (lhs as [AnyEncodable], rhs as [AnyEncodable]):
|
||||
return lhs == rhs
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AnyEncodable: CustomStringConvertible {
|
||||
public var description: String {
|
||||
switch value {
|
||||
case is Void:
|
||||
return String(describing: nil as Any?)
|
||||
case let value as CustomStringConvertible:
|
||||
return value.description
|
||||
default:
|
||||
return String(describing: value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AnyEncodable: CustomDebugStringConvertible {
|
||||
public var debugDescription: String {
|
||||
switch value {
|
||||
case let value as CustomDebugStringConvertible:
|
||||
return "AnyEncodable(\(value.debugDescription))"
|
||||
default:
|
||||
return "AnyEncodable(\(description))"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension AnyEncodable: ExpressibleByNilLiteral {}
|
||||
extension AnyEncodable: ExpressibleByBooleanLiteral {}
|
||||
extension AnyEncodable: ExpressibleByIntegerLiteral {}
|
||||
extension AnyEncodable: ExpressibleByFloatLiteral {}
|
||||
extension AnyEncodable: ExpressibleByStringLiteral {}
|
||||
extension AnyEncodable: ExpressibleByStringInterpolation {}
|
||||
extension AnyEncodable: ExpressibleByArrayLiteral {}
|
||||
extension AnyEncodable: ExpressibleByDictionaryLiteral {}
|
||||
|
||||
extension _AnyEncodable {
|
||||
public init(nilLiteral _: ()) {
|
||||
self.init(nil as Any?)
|
||||
}
|
||||
|
||||
public init(booleanLiteral value: Bool) {
|
||||
self.init(value)
|
||||
}
|
||||
|
||||
public init(integerLiteral value: Int) {
|
||||
self.init(value)
|
||||
}
|
||||
|
||||
public init(floatLiteral value: Double) {
|
||||
self.init(value)
|
||||
}
|
||||
|
||||
public init(extendedGraphemeClusterLiteral value: String) {
|
||||
self.init(value)
|
||||
}
|
||||
|
||||
public init(stringLiteral value: String) {
|
||||
self.init(value)
|
||||
}
|
||||
|
||||
public init(arrayLiteral elements: Any...) {
|
||||
self.init(elements)
|
||||
}
|
||||
|
||||
public init(dictionaryLiteral elements: (AnyHashable, Any)...) {
|
||||
self.init([AnyHashable: Any](elements, uniquingKeysWith: { first, _ in first }))
|
||||
}
|
||||
}
|
||||
|
||||
extension AnyEncodable: Hashable {
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
switch value {
|
||||
case let value as Bool:
|
||||
hasher.combine(value)
|
||||
case let value as Int:
|
||||
hasher.combine(value)
|
||||
case let value as Int8:
|
||||
hasher.combine(value)
|
||||
case let value as Int16:
|
||||
hasher.combine(value)
|
||||
case let value as Int32:
|
||||
hasher.combine(value)
|
||||
case let value as Int64:
|
||||
hasher.combine(value)
|
||||
case let value as UInt:
|
||||
hasher.combine(value)
|
||||
case let value as UInt8:
|
||||
hasher.combine(value)
|
||||
case let value as UInt16:
|
||||
hasher.combine(value)
|
||||
case let value as UInt32:
|
||||
hasher.combine(value)
|
||||
case let value as UInt64:
|
||||
hasher.combine(value)
|
||||
case let value as Float:
|
||||
hasher.combine(value)
|
||||
case let value as Double:
|
||||
hasher.combine(value)
|
||||
case let value as String:
|
||||
hasher.combine(value)
|
||||
case let value as [String: AnyEncodable]:
|
||||
hasher.combine(value)
|
||||
case let value as [AnyEncodable]:
|
||||
hasher.combine(value)
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
//
|
||||
// Bech32Object.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-28.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
enum Bech32Object {
|
||||
case nsec(String)
|
||||
case npub(String)
|
||||
case note(String)
|
||||
|
||||
static func parse(_ str: String) -> Bech32Object? {
|
||||
guard let decoded = try? bech32_decode(str) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
if decoded.hrp == "npub" {
|
||||
return .npub(hex_encode(decoded.data))
|
||||
} else if decoded.hrp == "nsec" {
|
||||
return .nsec(hex_encode(decoded.data))
|
||||
} else if decoded.hrp == "note" {
|
||||
return .note(hex_encode(decoded.data))
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
//
|
||||
// CoreSVG.swift
|
||||
// damus
|
||||
//
|
||||
// Created by Oleg Abalonski on 1/27/23.
|
||||
// Ref: https://gist.github.com/ollieatkinson/eb87a82fcb5500d5561fed8b0900a9f7
|
||||
|
||||
import Darwin
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
@objc
|
||||
class CGSVGDocument: NSObject { }
|
||||
|
||||
var CGSVGDocumentRetain: (@convention(c) (CGSVGDocument?) -> Unmanaged<CGSVGDocument>?) = load("CGSVGDocumentRetain")
|
||||
var CGSVGDocumentRelease: (@convention(c) (CGSVGDocument?) -> Void) = load("CGSVGDocumentRelease")
|
||||
var CGSVGDocumentCreateFromData: (@convention(c) (CFData?, CFDictionary?) -> Unmanaged<CGSVGDocument>?) = load("CGSVGDocumentCreateFromData")
|
||||
var CGContextDrawSVGDocument: (@convention(c) (CGContext?, CGSVGDocument?) -> Void) = load("CGContextDrawSVGDocument")
|
||||
var CGSVGDocumentGetCanvasSize: (@convention(c) (CGSVGDocument?) -> CGSize) = load("CGSVGDocumentGetCanvasSize")
|
||||
|
||||
typealias ImageWithCGSVGDocument = @convention(c) (AnyObject, Selector, CGSVGDocument) -> UIImage
|
||||
var ImageWithCGSVGDocumentSEL: Selector = NSSelectorFromString("_imageWithCGSVGDocument:")
|
||||
|
||||
let CoreSVG = dlopen("/System/Library/PrivateFrameworks/CoreSVG.framework/CoreSVG", RTLD_NOW)
|
||||
|
||||
func load<T>(_ name: String) -> T {
|
||||
unsafeBitCast(dlsym(CoreSVG, name), to: T.self)
|
||||
}
|
||||
|
||||
public class SVG {
|
||||
|
||||
deinit { CGSVGDocumentRelease(document) }
|
||||
|
||||
let document: CGSVGDocument
|
||||
|
||||
public convenience init?(_ value: String) {
|
||||
guard let data = value.data(using: .utf8) else { return nil }
|
||||
self.init(data)
|
||||
}
|
||||
|
||||
public init?(_ data: Data) {
|
||||
guard let document = CGSVGDocumentCreateFromData(data as CFData, nil)?.takeUnretainedValue() else { return nil }
|
||||
guard CGSVGDocumentGetCanvasSize(document) != .zero else { return nil }
|
||||
self.document = document
|
||||
}
|
||||
|
||||
public var size: CGSize {
|
||||
CGSVGDocumentGetCanvasSize(document)
|
||||
}
|
||||
|
||||
public func image() -> UIImage? {
|
||||
let ImageWithCGSVGDocument = unsafeBitCast(UIImage.self.method(for: ImageWithCGSVGDocumentSEL), to: ImageWithCGSVGDocument.self)
|
||||
let image = ImageWithCGSVGDocument(UIImage.self, ImageWithCGSVGDocumentSEL, document)
|
||||
return image
|
||||
}
|
||||
|
||||
public func draw(in context: CGContext) {
|
||||
draw(in: context, size: size)
|
||||
}
|
||||
|
||||
public func draw(in context: CGContext, size target: CGSize) {
|
||||
|
||||
var target = target
|
||||
|
||||
let ratio = (
|
||||
x: target.width / size.width,
|
||||
y: target.height / size.height
|
||||
)
|
||||
|
||||
let rect = (
|
||||
document: CGRect(origin: .zero, size: size), ()
|
||||
)
|
||||
|
||||
let scale: (x: CGFloat, y: CGFloat)
|
||||
|
||||
if target.width <= 0 {
|
||||
scale = (ratio.y, ratio.y)
|
||||
target.width = size.width * scale.x
|
||||
} else if target.height <= 0 {
|
||||
scale = (ratio.x, ratio.x)
|
||||
target.width = size.width * scale.y
|
||||
} else {
|
||||
let min = min(ratio.x, ratio.y)
|
||||
scale = (min, min)
|
||||
target.width = size.width * scale.x
|
||||
target.height = size.height * scale.y
|
||||
}
|
||||
|
||||
let transform = (
|
||||
scale: CGAffineTransform(scaleX: scale.x, y: scale.y),
|
||||
aspect: CGAffineTransform(translationX: (target.width / scale.x - rect.document.width) / 2, y: (target.height / scale.y - rect.document.height) / 2)
|
||||
)
|
||||
|
||||
context.translateBy(x: 0, y: target.height)
|
||||
context.scaleBy(x: 1, y: -1)
|
||||
context.concatenate(transform.scale)
|
||||
context.concatenate(transform.aspect)
|
||||
|
||||
CGContextDrawSVGDocument(context, document)
|
||||
}
|
||||
}
|
||||
@@ -38,26 +38,6 @@ func insert_uniq_by_pubkey(events: inout [NostrEvent], new_ev: NostrEvent, cmp:
|
||||
return true
|
||||
}
|
||||
|
||||
func insert_uniq_sorted_zap(zaps: inout [Zap], new_zap: Zap) -> Bool {
|
||||
var i: Int = 0
|
||||
|
||||
for zap in zaps {
|
||||
// don't insert duplicate events
|
||||
if new_zap.event.id == zap.event.id {
|
||||
return false
|
||||
}
|
||||
|
||||
if new_zap.invoice.amount > zap.invoice.amount {
|
||||
zaps.insert(new_zap, at: i)
|
||||
return true
|
||||
}
|
||||
i += 1
|
||||
}
|
||||
|
||||
zaps.append(new_zap)
|
||||
return true
|
||||
}
|
||||
|
||||
func insert_uniq_sorted_event(events: inout [NostrEvent], new_ev: NostrEvent, cmp: (NostrEvent, NostrEvent) -> Bool) -> Bool {
|
||||
var i: Int = 0
|
||||
|
||||
|
||||
@@ -12,25 +12,12 @@ import Vault
|
||||
let PUBKEY_HRP = "npub"
|
||||
let PRIVKEY_HRP = "nsec"
|
||||
|
||||
struct FullKeypair {
|
||||
let pubkey: String
|
||||
let privkey: String
|
||||
}
|
||||
|
||||
struct Keypair {
|
||||
let pubkey: String
|
||||
let privkey: String?
|
||||
let pubkey_bech32: String
|
||||
let privkey_bech32: String?
|
||||
|
||||
func to_full() -> FullKeypair? {
|
||||
guard let privkey = self.privkey else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return FullKeypair(pubkey: pubkey, privkey: privkey)
|
||||
}
|
||||
|
||||
init(pubkey: String, privkey: String?) {
|
||||
self.pubkey = pubkey
|
||||
self.privkey = privkey
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
//
|
||||
// LNUrl.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-16.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct LNUrlPayRequest: Decodable {
|
||||
let allowsNostr: Bool?
|
||||
let nostrPubkey: String?
|
||||
|
||||
let minSendable: Int64?
|
||||
let maxSendable: Int64?
|
||||
let status: String?
|
||||
let callback: String?
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct LNUrlPayResponse: Decodable {
|
||||
let pr: String
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// LNUrls.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-17.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
class LNUrls {
|
||||
var endpoints: [String: LNUrlPayRequest]
|
||||
|
||||
init() {
|
||||
self.endpoints = [:]
|
||||
}
|
||||
|
||||
func lookup(_ id: String) -> LNUrlPayRequest? {
|
||||
return self.endpoints[id]
|
||||
}
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
//
|
||||
// Mute.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-25.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
func create_or_update_mutelist(keypair: FullKeypair, mprev: NostrEvent?, to_add: String) -> NostrEvent? {
|
||||
return create_or_update_list_event(keypair: keypair, mprev: mprev, to_add: to_add, list_name: "mute", list_type: "p")
|
||||
}
|
||||
|
||||
func remove_from_mutelist(keypair: FullKeypair, prev: NostrEvent, to_remove: String) -> NostrEvent? {
|
||||
return remove_from_list_event(keypair: keypair, prev: prev, to_remove: to_remove, tag_type: "p")
|
||||
}
|
||||
|
||||
func create_or_update_list_event(keypair: FullKeypair, mprev: NostrEvent?, to_add: String, list_name: String, list_type: String) -> NostrEvent? {
|
||||
let pubkey = keypair.pubkey
|
||||
|
||||
if let prev = mprev {
|
||||
if let okprev = ensure_list_name(list: prev, name: list_name), prev.pubkey == keypair.pubkey {
|
||||
return add_to_list_event(keypair: keypair, prev: okprev, to_add: to_add, tag_type: list_type)
|
||||
}
|
||||
}
|
||||
|
||||
let tags = [["d", list_name], [list_type, to_add]]
|
||||
let ev = NostrEvent(content: "", pubkey: pubkey, kind: 30000, tags: tags)
|
||||
|
||||
ev.tags = tags
|
||||
ev.id = calculate_event_id(ev: ev)
|
||||
ev.sig = sign_event(privkey: keypair.privkey, ev: ev)
|
||||
|
||||
return ev
|
||||
}
|
||||
|
||||
func remove_from_list_event(keypair: FullKeypair, prev: NostrEvent, to_remove: String, tag_type: String) -> NostrEvent? {
|
||||
var exists = false
|
||||
for tag in prev.tags {
|
||||
if tag.count >= 2 && tag[0] == tag_type && tag[1] == to_remove {
|
||||
exists = true
|
||||
}
|
||||
}
|
||||
|
||||
// make sure we actually have the pubkey to remove
|
||||
guard exists else {
|
||||
return nil
|
||||
}
|
||||
|
||||
let new_tags = prev.tags.filter { tag in
|
||||
!(tag.count >= 2 && tag[0] == tag_type && tag[1] == to_remove)
|
||||
}
|
||||
|
||||
let ev = NostrEvent(content: prev.content, pubkey: keypair.pubkey, kind: 30000, tags: new_tags)
|
||||
ev.id = calculate_event_id(ev: ev)
|
||||
ev.sig = sign_event(privkey: keypair.privkey, ev: ev)
|
||||
|
||||
return ev
|
||||
}
|
||||
|
||||
func add_to_list_event(keypair: FullKeypair, prev: NostrEvent, to_add: String, tag_type: String) -> NostrEvent? {
|
||||
for tag in prev.tags {
|
||||
// we are already muting this user
|
||||
if tag.count >= 2 && tag[0] == tag_type && tag[1] == to_add {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
let new = NostrEvent(content: prev.content, pubkey: keypair.pubkey, kind: 30000, tags: prev.tags)
|
||||
new.tags.append([tag_type, to_add])
|
||||
new.id = calculate_event_id(ev: new)
|
||||
new.sig = sign_event(privkey: keypair.privkey, ev: new)
|
||||
|
||||
return new
|
||||
}
|
||||
|
||||
func ensure_list_name(list: NostrEvent, name: String) -> NostrEvent? {
|
||||
for tag in list.tags {
|
||||
if tag.count >= 2 && tag[0] == "d" {
|
||||
if tag[1] != name {
|
||||
return nil
|
||||
} else {
|
||||
return list
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
list.tags.insert(["d", name], at: 0)
|
||||
|
||||
return list
|
||||
}
|
||||
@@ -11,93 +11,150 @@ extension Notification.Name {
|
||||
static var thread_focus: Notification.Name {
|
||||
return Notification.Name("thread focus")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var relays_changed: Notification.Name {
|
||||
return Notification.Name("relays_changed")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var select_event: Notification.Name {
|
||||
return Notification.Name("select_event")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var select_quote: Notification.Name {
|
||||
return Notification.Name("select quote")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var reply: Notification.Name {
|
||||
return Notification.Name("reply")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var profile_updated: Notification.Name {
|
||||
return Notification.Name("profile_updated")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var switched_timeline: Notification.Name {
|
||||
return Notification.Name("switched_timeline")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var liked: Notification.Name {
|
||||
return Notification.Name("liked")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var open_profile: Notification.Name {
|
||||
return Notification.Name("open_profile")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var scroll_to_top: Notification.Name {
|
||||
return Notification.Name("scroll_to_to")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var broadcast_event: Notification.Name {
|
||||
return Notification.Name("broadcast event")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var open_thread: Notification.Name {
|
||||
return Notification.Name("open thread")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var notice: Notification.Name {
|
||||
return Notification.Name("notice")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var like: Notification.Name {
|
||||
return Notification.Name("like note")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var delete: Notification.Name {
|
||||
return Notification.Name("delete note")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var post: Notification.Name {
|
||||
return Notification.Name("send post")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var boost: Notification.Name {
|
||||
return Notification.Name("boost")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var boosted: Notification.Name {
|
||||
return Notification.Name("boosted")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var follow: Notification.Name {
|
||||
return Notification.Name("follow")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var unfollow: Notification.Name {
|
||||
return Notification.Name("unfollow")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var login: Notification.Name {
|
||||
return Notification.Name("login")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var logout: Notification.Name {
|
||||
return Notification.Name("logout")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var followed: Notification.Name {
|
||||
return Notification.Name("followed")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var chatroom_meta: Notification.Name {
|
||||
return Notification.Name("chatroom_meta")
|
||||
}
|
||||
}
|
||||
|
||||
extension Notification.Name {
|
||||
static var unfollowed: Notification.Name {
|
||||
return Notification.Name("unfollowed")
|
||||
}
|
||||
static var report: Notification.Name {
|
||||
return Notification.Name("report")
|
||||
}
|
||||
static var block: Notification.Name {
|
||||
return Notification.Name("block")
|
||||
}
|
||||
static var new_mutes: Notification.Name {
|
||||
return Notification.Name("new_mutes")
|
||||
}
|
||||
static var new_unmutes: Notification.Name {
|
||||
return Notification.Name("new_unmutes")
|
||||
}
|
||||
static var deleted_account: Notification.Name {
|
||||
return Notification.Name("deleted_account")
|
||||
}
|
||||
}
|
||||
|
||||
func handle_notify(_ name: Notification.Name) -> NotificationCenter.Publisher {
|
||||
|
||||
@@ -1,322 +0,0 @@
|
||||
//
|
||||
// Zap.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-15.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
enum ZapSource {
|
||||
case author(String)
|
||||
// TODO: anonymous
|
||||
//case anonymous
|
||||
}
|
||||
|
||||
public struct NoteZapTarget: Equatable {
|
||||
public let note_id: String
|
||||
public let author: String
|
||||
}
|
||||
|
||||
public enum ZapTarget: Equatable {
|
||||
case profile(String)
|
||||
case note(NoteZapTarget)
|
||||
|
||||
public static func note(id: String, author: String) -> ZapTarget {
|
||||
return .note(NoteZapTarget(note_id: id, author: author))
|
||||
}
|
||||
|
||||
var pubkey: String {
|
||||
switch self {
|
||||
case .profile(let pk):
|
||||
return pk
|
||||
case .note(let note_target):
|
||||
return note_target.author
|
||||
}
|
||||
}
|
||||
|
||||
var id: String {
|
||||
switch self {
|
||||
case .note(let note_target):
|
||||
return note_target.note_id
|
||||
case .profile(let pk):
|
||||
return pk
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ZapRequest {
|
||||
let ev: NostrEvent
|
||||
}
|
||||
|
||||
struct Zap {
|
||||
public let event: NostrEvent
|
||||
public let invoice: ZapInvoice
|
||||
public let zapper: String /// zap authorizer
|
||||
public let target: ZapTarget
|
||||
public let request: ZapRequest
|
||||
|
||||
public static func from_zap_event(zap_ev: NostrEvent, zapper: String) -> Zap? {
|
||||
/// Make sure that we only create a zap event if it is authorized by the profile or event
|
||||
guard zapper == zap_ev.pubkey else {
|
||||
return nil
|
||||
}
|
||||
guard let bolt11_str = event_tag(zap_ev, name: "bolt11") else {
|
||||
return nil
|
||||
}
|
||||
guard let bolt11 = decode_bolt11(bolt11_str) else {
|
||||
return nil
|
||||
}
|
||||
/// Any amount invoices are not allowed
|
||||
guard let zap_invoice = invoice_to_zap_invoice(bolt11) else {
|
||||
return nil
|
||||
}
|
||||
// Some endpoints don't have this, let's skip the check for now. We're mostly trusting the zapper anyways
|
||||
/*
|
||||
guard let preimage = event_tag(zap_ev, name: "preimage") else {
|
||||
return nil
|
||||
}
|
||||
guard preimage_matches_invoice(preimage, inv: zap_invoice) else {
|
||||
return nil
|
||||
}
|
||||
*/
|
||||
guard let desc = get_zap_description(zap_ev, inv_desc: zap_invoice.description) else {
|
||||
return nil
|
||||
}
|
||||
guard let zap_req = decode_nostr_event_json(desc) else {
|
||||
return nil
|
||||
}
|
||||
guard let target = determine_zap_target(zap_req) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return Zap(event: zap_ev, invoice: zap_invoice, zapper: zapper, target: target, request: ZapRequest(ev: zap_req))
|
||||
}
|
||||
}
|
||||
|
||||
/// Fetches the description from either the invoice, or tags, depending on the type of invoice
|
||||
func get_zap_description(_ ev: NostrEvent, inv_desc: InvoiceDescription) -> String? {
|
||||
switch inv_desc {
|
||||
case .description(let string):
|
||||
return string
|
||||
case .description_hash(let deschash):
|
||||
guard let desc = event_tag(ev, name: "description") else {
|
||||
return nil
|
||||
}
|
||||
guard let data = desc.data(using: .utf8) else {
|
||||
return nil
|
||||
}
|
||||
guard sha256(data) == deschash else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return desc
|
||||
}
|
||||
}
|
||||
|
||||
func invoice_to_zap_invoice(_ invoice: Invoice) -> ZapInvoice? {
|
||||
guard case .specific(let amt) = invoice.amount else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return ZapInvoice(description: invoice.description, amount: amt, string: invoice.string, expiry: invoice.expiry, payment_hash: invoice.payment_hash, created_at: invoice.created_at)
|
||||
}
|
||||
|
||||
func preimage_matches_invoice<T>(_ preimage: String, inv: LightningInvoice<T>) -> Bool {
|
||||
guard let raw_preimage = hex_decode(preimage) else {
|
||||
return false
|
||||
}
|
||||
|
||||
let hashed = sha256(Data(raw_preimage))
|
||||
|
||||
return inv.payment_hash == hashed
|
||||
}
|
||||
|
||||
func determine_zap_target(_ ev: NostrEvent) -> ZapTarget? {
|
||||
guard let ptag = event_tag(ev, name: "p") else {
|
||||
return nil
|
||||
}
|
||||
|
||||
if let etag = event_tag(ev, name: "e") {
|
||||
return ZapTarget.note(id: etag, author: ptag)
|
||||
}
|
||||
|
||||
return .profile(ptag)
|
||||
}
|
||||
|
||||
func decode_bolt11(_ s: String) -> Invoice? {
|
||||
var bs = blocks()
|
||||
bs.num_blocks = 0
|
||||
blocks_init(&bs)
|
||||
|
||||
let bytes = s.utf8CString
|
||||
let _ = bytes.withUnsafeBufferPointer { p in
|
||||
damus_parse_content(&bs, p.baseAddress)
|
||||
}
|
||||
|
||||
guard bs.num_blocks == 1 else {
|
||||
blocks_free(&bs)
|
||||
return nil
|
||||
}
|
||||
|
||||
let block = bs.blocks[0]
|
||||
|
||||
guard let converted = convert_block(block, tags: []) else {
|
||||
blocks_free(&bs)
|
||||
return nil
|
||||
}
|
||||
|
||||
guard case .invoice(let invoice) = converted else {
|
||||
blocks_free(&bs)
|
||||
return nil
|
||||
}
|
||||
|
||||
blocks_free(&bs)
|
||||
return invoice
|
||||
}
|
||||
|
||||
func event_tag(_ ev: NostrEvent, name: String) -> String? {
|
||||
for tag in ev.tags {
|
||||
if tag.count >= 2 && tag[0] == name {
|
||||
return tag[1]
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func decode_nostr_event_json(_ desc: String) -> NostrEvent? {
|
||||
let decoder = JSONDecoder()
|
||||
guard let dat = desc.data(using: .utf8) else {
|
||||
return nil
|
||||
}
|
||||
guard let ev = try? decoder.decode(NostrEvent.self, from: dat) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return ev
|
||||
}
|
||||
|
||||
func decode_zap_request(_ desc: String) -> ZapRequest? {
|
||||
let decoder = JSONDecoder()
|
||||
guard let jsonData = desc.data(using: .utf8) else {
|
||||
return nil
|
||||
}
|
||||
guard let jsonArray = try? JSONSerialization.jsonObject(with: jsonData) as? [[Any]] else {
|
||||
return nil
|
||||
}
|
||||
|
||||
for array in jsonArray {
|
||||
guard array.count == 2 else {
|
||||
continue
|
||||
}
|
||||
let mkey = array.first.flatMap { $0 as? String }
|
||||
if let key = mkey, key == "application/nostr" {
|
||||
guard let dat = try? JSONSerialization.data(withJSONObject: array[1], options: []) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard let zap_req = try? decoder.decode(NostrEvent.self, from: dat) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard zap_req.kind == 9734 else {
|
||||
return nil
|
||||
}
|
||||
|
||||
/// Ensure the signature on the zap request is correct
|
||||
guard case .ok = validate_event(ev: zap_req) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return ZapRequest(ev: zap_req)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
|
||||
func fetch_zapper_from_lnurl(_ lnurl: String) async -> String? {
|
||||
guard let endpoint = await fetch_static_payreq(lnurl) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard let allows = endpoint.allowsNostr, allows else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard let key = endpoint.nostrPubkey, key.count == 64 else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return endpoint.nostrPubkey
|
||||
}
|
||||
|
||||
func decode_lnurl(_ lnurl: String) -> URL? {
|
||||
guard let decoded = try? bech32_decode(lnurl) else {
|
||||
return nil
|
||||
}
|
||||
guard decoded.hrp == "lnurl" else {
|
||||
return nil
|
||||
}
|
||||
guard let url = URL(string: String(decoding: decoded.data, as: UTF8.self)) else {
|
||||
return nil
|
||||
}
|
||||
return url
|
||||
}
|
||||
|
||||
func fetch_static_payreq(_ lnurl: String) async -> LNUrlPayRequest? {
|
||||
guard let url = decode_lnurl(lnurl) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard let ret = try? await URLSession.shared.data(from: url) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
let json_str = String(decoding: ret.0, as: UTF8.self)
|
||||
|
||||
guard let endpoint: LNUrlPayRequest = decode_json(json_str) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return endpoint
|
||||
}
|
||||
|
||||
func fetch_zap_invoice(_ payreq: LNUrlPayRequest, zapreq: NostrEvent, amount: Int64) async -> String? {
|
||||
guard var base_url = payreq.callback.flatMap({ URLComponents(string: $0) }) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
let zappable = payreq.allowsNostr ?? false
|
||||
|
||||
var query = [URLQueryItem(name: "amount", value: "\(amount)")]
|
||||
|
||||
if zappable {
|
||||
if let json = encode_json(zapreq) {
|
||||
query.append(URLQueryItem(name: "nostr", value: json))
|
||||
}
|
||||
}
|
||||
|
||||
base_url.queryItems = query
|
||||
|
||||
guard let url = base_url.url else {
|
||||
return nil
|
||||
}
|
||||
|
||||
print("url \(url)")
|
||||
|
||||
guard let ret = try? await URLSession.shared.data(from: url) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
let json_str = String(decoding: ret.0, as: UTF8.self)
|
||||
guard let result: LNUrlPayResponse = decode_json(json_str) else {
|
||||
print("fetch_zap_invoice error: \(json_str)")
|
||||
return nil
|
||||
}
|
||||
|
||||
return result.pr
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
//
|
||||
// Zaps.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-16.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
class Zaps {
|
||||
var zaps: [String: Zap]
|
||||
let our_pubkey: String
|
||||
var our_zaps: [String: [Zap]]
|
||||
|
||||
var event_counts: [String: Int]
|
||||
var event_totals: [String: Int64]
|
||||
|
||||
init(our_pubkey: String) {
|
||||
self.zaps = [:]
|
||||
self.our_pubkey = our_pubkey
|
||||
self.our_zaps = [:]
|
||||
self.event_counts = [:]
|
||||
self.event_totals = [:]
|
||||
}
|
||||
|
||||
func add_zap(zap: Zap) {
|
||||
if zaps[zap.event.id] != nil {
|
||||
return
|
||||
}
|
||||
self.zaps[zap.event.id] = zap
|
||||
|
||||
// record our zaps for an event
|
||||
if zap.request.ev.pubkey == our_pubkey {
|
||||
switch zap.target {
|
||||
case .note(let note_target):
|
||||
if our_zaps[note_target.note_id] == nil {
|
||||
our_zaps[note_target.note_id] = [zap]
|
||||
} else {
|
||||
let _ = insert_uniq_sorted_zap(zaps: &(our_zaps[note_target.note_id]!), new_zap: zap)
|
||||
}
|
||||
case .profile(_):
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// don't count tips to self. lame.
|
||||
guard zap.request.ev.pubkey != zap.target.pubkey else {
|
||||
return
|
||||
}
|
||||
|
||||
let id = zap.target.id
|
||||
if event_counts[id] == nil {
|
||||
event_counts[id] = 0
|
||||
}
|
||||
|
||||
if event_totals[id] == nil {
|
||||
event_totals[id] = 0
|
||||
}
|
||||
|
||||
event_counts[id] = event_counts[id]! + 1
|
||||
event_totals[id] = event_totals[id]! + zap.invoice.amount
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -21,26 +21,12 @@ enum ActionBarSheet: Identifiable {
|
||||
struct EventActionBar: View {
|
||||
let damus_state: DamusState
|
||||
let event: NostrEvent
|
||||
let test_lnurl: String?
|
||||
let generator = UIImpactFeedbackGenerator(style: .medium)
|
||||
|
||||
// just used for previews
|
||||
@State var sheet: ActionBarSheet? = nil
|
||||
@State var confirm_boost: Bool = false
|
||||
@State var show_share_sheet: Bool = false
|
||||
@StateObject var bar: ActionBarModel
|
||||
|
||||
init(damus_state: DamusState, event: NostrEvent, bar: ActionBarModel, test_lnurl: String? = nil) {
|
||||
self.damus_state = damus_state
|
||||
self.event = event
|
||||
self.test_lnurl = test_lnurl
|
||||
_bar = StateObject.init(wrappedValue: bar)
|
||||
}
|
||||
|
||||
var lnurl: String? {
|
||||
test_lnurl ?? damus_state.profiles.lookup(id: event.pubkey)?.lnurl
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
if damus_state.keypair.privkey != nil {
|
||||
@@ -64,7 +50,6 @@ struct EventActionBar: View {
|
||||
.foregroundColor(bar.boosted ? Color.green : Color.gray)
|
||||
}
|
||||
Spacer()
|
||||
|
||||
ZStack {
|
||||
LikeButton(liked: bar.liked) {
|
||||
if bar.liked {
|
||||
@@ -79,12 +64,6 @@ struct EventActionBar: View {
|
||||
.foregroundColor(bar.liked ? Color.accentColor : Color.gray)
|
||||
|
||||
}
|
||||
|
||||
if let lnurl = self.lnurl {
|
||||
Spacer()
|
||||
ZapButton(damus_state: damus_state, event: event, lnurl: lnurl, bar: bar)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
EventActionButton(img: "square.and.arrow.up", col: Color.gray) {
|
||||
show_share_sheet = true
|
||||
@@ -176,11 +155,10 @@ struct EventActionBar_Previews: PreviewProvider {
|
||||
let ds = test_damus_state()
|
||||
let ev = NostrEvent(content: "hi", pubkey: pk)
|
||||
|
||||
let bar = ActionBarModel.empty()
|
||||
let likedbar = ActionBarModel(likes: 10, boosts: 0, zaps: 0, zap_total: 0, our_like: nil, our_boost: nil, our_zap: nil)
|
||||
let likedbar_ours = ActionBarModel(likes: 10, boosts: 0, zaps: 0, zap_total: 0, our_like: NostrEvent(id: "", content: "", pubkey: ""), our_boost: nil, our_zap: nil)
|
||||
let maxed_bar = ActionBarModel(likes: 999, boosts: 999, zaps: 999, zap_total: 99999999, our_like: NostrEvent(id: "", content: "", pubkey: ""), our_boost: NostrEvent(id: "", content: "", pubkey: ""), our_zap: nil)
|
||||
let zapbar = ActionBarModel(likes: 0, boosts: 0, zaps: 5, zap_total: 10000000, our_like: nil, our_boost: nil, our_zap: nil)
|
||||
let bar = ActionBarModel(likes: 0, boosts: 0, tips: 0, our_like: nil, our_boost: nil, our_tip: nil)
|
||||
let likedbar = ActionBarModel(likes: 10, boosts: 10, tips: 0, our_like: nil, our_boost: nil, our_tip: nil)
|
||||
let likedbar_ours = ActionBarModel(likes: 100, boosts: 100, tips: 0, our_like: NostrEvent(id: "", content: "", pubkey: ""), our_boost: nil, our_tip: nil)
|
||||
let maxed_bar = ActionBarModel(likes: 999, boosts: 999, tips: 0, our_like: NostrEvent(id: "", content: "", pubkey: ""), our_boost: NostrEvent(id: "", content: "", pubkey: ""), our_tip: nil)
|
||||
|
||||
VStack(spacing: 50) {
|
||||
EventActionBar(damus_state: ds, event: ev, bar: bar)
|
||||
@@ -190,8 +168,6 @@ struct EventActionBar_Previews: PreviewProvider {
|
||||
EventActionBar(damus_state: ds, event: ev, bar: likedbar_ours)
|
||||
|
||||
EventActionBar(damus_state: ds, event: ev, bar: maxed_bar)
|
||||
|
||||
EventActionBar(damus_state: ds, event: ev, bar: zapbar, test_lnurl: "lnurl")
|
||||
}
|
||||
.padding(20)
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@ struct EventDetailBar: View {
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
}
|
||||
|
||||
if bar.zaps > 0 {
|
||||
Text("\(Text("\(bar.zaps)", comment: "Number of zap payments on a post.").font(.body.bold())) \(Text(String(format: NSLocalizedString("zaps_count", comment: "Part of a larger sentence to describe how many zap payments there are on a post."), bar.boosts)).foregroundColor(.gray))", comment: "Sentence composed of 2 variables to describe how many zap payments there are on a post. In source English, the first variable is the number of zap payments, and the second variable is 'Zap' or 'Zaps'.")
|
||||
if bar.tips > 0 {
|
||||
Text("\(Text("\(bar.tips)", comment: "Number of tip payments on a post.").font(.body.bold())) \(Text(String(format: NSLocalizedString("tips_count", comment: "Part of a larger sentence to describe how many tip payments there are on a post."), bar.boosts)).foregroundColor(.gray))", comment: "Sentence composed of 2 variables to describe how many tip payments there are on a post. In source English, the first variable is the number of tip payments, and the second variable is 'Tip' or 'Tips'.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ struct InnerBannerImageView: View {
|
||||
self.imageModel = KFImageModel(
|
||||
url: url,
|
||||
fallbackUrl: nil,
|
||||
maxByteSize: 20_971_520, // 20 MiB
|
||||
maxByteSize: 5000000,
|
||||
downsampleSize: CGSize(width: 750, height: 250)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -55,7 +55,6 @@ struct CarouselItemView: View {
|
||||
.font(.title2)
|
||||
.foregroundColor(Color.white)
|
||||
.padding([.leading,.trailing], 50.0)
|
||||
.minimumScaleFactor(0.5)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ struct ChatView: View {
|
||||
HStack {
|
||||
VStack {
|
||||
if is_active || just_started {
|
||||
ProfilePicView(pubkey: event.pubkey, size: 32, highlight: is_active ? .main : .none, profiles: damus_state.profiles, contacts:damus_state.contacts)
|
||||
ProfilePicView(pubkey: event.pubkey, size: 32, highlight: is_active ? .main : .none, profiles: damus_state.profiles)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
@@ -96,24 +96,17 @@ struct ChatView: View {
|
||||
|
||||
if let ref_id = thread.replies.lookup(event.id) {
|
||||
if !is_reply_to_prev() {
|
||||
/*
|
||||
ReplyQuoteView(keypair: damus_state.keypair, quoter: event, event_id: ref_id, profiles: damus_state.profiles, previews: damus_state.previews, contacts: damus_state.contacts)
|
||||
ReplyQuoteView(privkey: damus_state.keypair.privkey, quoter: event, event_id: ref_id, profiles: damus_state.profiles, previews: damus_state.previews)
|
||||
.frame(maxHeight: expand_reply ? nil : 100)
|
||||
.environmentObject(thread)
|
||||
.onTapGesture {
|
||||
expand_reply = !expand_reply
|
||||
}
|
||||
*/
|
||||
ReplyDescription
|
||||
}
|
||||
}
|
||||
|
||||
let show_images = should_show_images(contacts: damus_state.contacts, ev: event, our_pubkey: damus_state.pubkey)
|
||||
NoteContentView(damus_state: damus_state,
|
||||
event: event,
|
||||
show_images: show_images,
|
||||
artifacts: .just_content(event.content),
|
||||
size: .normal)
|
||||
NoteContentView(privkey: damus_state.keypair.privkey, event: event, profiles: damus_state.profiles, previews: damus_state.previews, show_images: should_show_images(contacts: damus_state.contacts, ev: event, our_pubkey: damus_state.pubkey), artifacts: .just_content(event.content), size: .normal)
|
||||
|
||||
if is_active || next_ev == nil || next_ev!.pubkey != event.pubkey {
|
||||
let bar = make_actionbar_model(ev: event, damus: damus_state)
|
||||
|
||||
@@ -24,7 +24,7 @@ struct ChatroomView: View {
|
||||
next_ev: ind == count-1 ? nil : thread.events[ind+1],
|
||||
damus_state: damus
|
||||
)
|
||||
.event_context_menu(ev, keypair: damus.keypair, target_pubkey: ev.pubkey)
|
||||
.event_context_menu(ev, pubkey: ev.pubkey, privkey: damus.keypair.privkey)
|
||||
.onTapGesture {
|
||||
if thread.initial_event.id == ev.id {
|
||||
//dismiss()
|
||||
|
||||
@@ -5,51 +5,30 @@
|
||||
// Created by William Casarin on 2022-06-09.
|
||||
//
|
||||
import AVFoundation
|
||||
import Kingfisher
|
||||
import SwiftUI
|
||||
|
||||
enum RemoteImagePolicy: String, CaseIterable {
|
||||
case everyone
|
||||
case friendsOnly
|
||||
case friendsOfFriends
|
||||
case restricted
|
||||
}
|
||||
|
||||
func remoteImagePolicyText(_ fs: RemoteImagePolicy) -> String {
|
||||
switch fs {
|
||||
case .everyone:
|
||||
return "Everyone"
|
||||
case .friendsOnly:
|
||||
return "Friends Only"
|
||||
case .friendsOfFriends:
|
||||
return "Friends of Friends"
|
||||
case .restricted:
|
||||
return "Block Images"
|
||||
}
|
||||
}
|
||||
import Kingfisher
|
||||
|
||||
struct ConfigView: View {
|
||||
let state: DamusState
|
||||
@Environment(\.dismiss) var dismiss
|
||||
@State var show_add_relay: Bool = false
|
||||
@State var confirm_logout: Bool = false
|
||||
@State var confirm_delete_account: Bool = false
|
||||
@State var new_relay: String = ""
|
||||
@State var show_privkey: Bool = false
|
||||
@State var show_libretranslate_api_key: Bool = false
|
||||
@State var privkey: String
|
||||
@State var privkey_copied: Bool = false
|
||||
@State var pubkey_copied: Bool = false
|
||||
@State var delete_text: String = ""
|
||||
@ObservedObject var settings: UserSettingsStore
|
||||
@AppStorage("remote_image_policy") var remote_image_policy: RemoteImagePolicy = .everyone
|
||||
@State var relays: [RelayDescriptor]
|
||||
@EnvironmentObject var user_settings: UserSettingsStore
|
||||
|
||||
let generator = UIImpactFeedbackGenerator(style: .light)
|
||||
|
||||
init(state: DamusState) {
|
||||
self.state = state
|
||||
_privkey = State(initialValue: self.state.keypair.privkey_bech32 ?? "")
|
||||
_settings = ObservedObject(initialValue: state.settings)
|
||||
_relays = State(initialValue: state.pool.descriptors)
|
||||
}
|
||||
|
||||
|
||||
// TODO: (jb55) could be more general but not gonna worry about it atm
|
||||
func CopyButton(is_pk: Bool) -> some View {
|
||||
return Button(action: {
|
||||
@@ -62,19 +41,52 @@ struct ConfigView: View {
|
||||
Image(systemName: copied ? "checkmark.circle" : "doc.on.doc")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var recommended: [RelayDescriptor] {
|
||||
let rs: [RelayDescriptor] = []
|
||||
return BOOTSTRAP_RELAYS.reduce(into: rs) { (xs, x) in
|
||||
if let _ = state.pool.get_relay(x) {
|
||||
} else {
|
||||
xs.append(RelayDescriptor(url: URL(string: x)!, info: .rw))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack(alignment: .leading) {
|
||||
Form {
|
||||
Section {
|
||||
List(Array(relays), id: \.url) { relay in
|
||||
RelayView(state: state, relay: relay.url.absoluteString)
|
||||
}
|
||||
} header: {
|
||||
HStack {
|
||||
Text("Relays", comment: "Header text for relay server list for configuration.")
|
||||
Spacer()
|
||||
Button(action: { show_add_relay = true }) {
|
||||
Image(systemName: "plus")
|
||||
.foregroundColor(.accentColor)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if recommended.count > 0 {
|
||||
Section(NSLocalizedString("Recommended Relays", comment: "Section title for recommend relay servers that could be added as part of configuration")) {
|
||||
List(recommended, id: \.url) { r in
|
||||
RecommendedRelayView(damus: state, relay: r.url.absoluteString)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Section(NSLocalizedString("Public Account ID", comment: "Section title for the user's public account ID.")) {
|
||||
HStack {
|
||||
Text(state.keypair.pubkey_bech32)
|
||||
|
||||
|
||||
CopyButton(is_pk: true)
|
||||
}
|
||||
.clipShape(RoundedRectangle(cornerRadius: 5))
|
||||
}
|
||||
|
||||
|
||||
if let sec = state.keypair.privkey_bech32 {
|
||||
Section(NSLocalizedString("Secret Account Login Key", comment: "Section title for user's secret account login key.")) {
|
||||
HStack {
|
||||
@@ -85,18 +97,18 @@ struct ConfigView: View {
|
||||
Text(sec)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 5))
|
||||
}
|
||||
|
||||
|
||||
CopyButton(is_pk: false)
|
||||
}
|
||||
|
||||
|
||||
Toggle(NSLocalizedString("Show", comment: "Toggle to show or hide user's secret account login key."), isOn: $show_privkey)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Section(NSLocalizedString("Wallet Selector", comment: "Section title for selection of wallet.")) {
|
||||
Toggle(NSLocalizedString("Show wallet selector", comment: "Toggle to show or hide selection of wallet."), isOn: $settings.show_wallet_selector).toggleStyle(.switch)
|
||||
Toggle(NSLocalizedString("Show wallet selector", comment: "Toggle to show or hide selection of wallet."), isOn: $user_settings.show_wallet_selector).toggleStyle(.switch)
|
||||
Picker(NSLocalizedString("Select default wallet", comment: "Prompt selection of user's default wallet"),
|
||||
selection: $settings.default_wallet) {
|
||||
selection: $user_settings.default_wallet) {
|
||||
ForEach(Wallet.allCases, id: \.self) { wallet in
|
||||
Text(wallet.model.displayName)
|
||||
.tag(wallet.model.tag)
|
||||
@@ -104,41 +116,8 @@ struct ConfigView: View {
|
||||
}
|
||||
}
|
||||
|
||||
Section(NSLocalizedString("LibreTranslate Translations", comment: "Section title for selecting the server that hosts the LibreTranslate machine translation API.")) {
|
||||
Picker(NSLocalizedString("Server", comment: "Prompt selection of LibreTranslate server to perform machine translations on notes"), selection: $settings.libretranslate_server) {
|
||||
ForEach(LibreTranslateServer.allCases, id: \.self) { server in
|
||||
Text(server.model.displayName)
|
||||
.tag(server.model.tag)
|
||||
}
|
||||
}
|
||||
|
||||
if settings.libretranslate_server != .none {
|
||||
TextField(NSLocalizedString("URL", comment: "Example URL to LibreTranslate server"), text: $settings.libretranslate_url)
|
||||
.disableAutocorrection(true)
|
||||
.disabled(settings.libretranslate_server != .custom)
|
||||
.autocapitalization(UITextAutocapitalizationType.none)
|
||||
HStack {
|
||||
if show_libretranslate_api_key {
|
||||
TextField(NSLocalizedString("API Key (optional)", comment: "Example URL to LibreTranslate server"), text: $settings.libretranslate_api_key)
|
||||
.disableAutocorrection(true)
|
||||
.autocapitalization(UITextAutocapitalizationType.none)
|
||||
Button(NSLocalizedString("Hide API Key", comment: "Button to hide the LibreTranslate server API key.")) {
|
||||
show_libretranslate_api_key = false
|
||||
}
|
||||
} else {
|
||||
SecureField(NSLocalizedString("API Key (optional)", comment: "Example URL to LibreTranslate server"), text: $settings.libretranslate_api_key)
|
||||
.disableAutocorrection(true)
|
||||
.autocapitalization(UITextAutocapitalizationType.none)
|
||||
Button(NSLocalizedString("Show API Key", comment: "Button to hide the LibreTranslate server API key.")) {
|
||||
show_libretranslate_api_key = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Section(NSLocalizedString("Left Handed", comment: "Moves the post button to the left side of the screen")) {
|
||||
Toggle(NSLocalizedString("Left Handed", comment: "Moves the post button to the left side of the screen"), isOn: $settings.left_handed)
|
||||
Toggle(NSLocalizedString("Left Handed", comment: "Moves the post button to the left side of the screen"), isOn: $user_settings.left_handed)
|
||||
.toggleStyle(.switch)
|
||||
}
|
||||
|
||||
@@ -149,78 +128,71 @@ struct ConfigView: View {
|
||||
KingfisherManager.shared.cache.cleanExpiredDiskCache()
|
||||
}
|
||||
}
|
||||
|
||||
Section(NSLocalizedString("Remote Image Loading Policy", comment: "Section title for remote image loading policy")) {
|
||||
Menu {
|
||||
Button {
|
||||
self.remote_image_policy = .everyone
|
||||
} label: {
|
||||
Text(remoteImagePolicyText(.everyone))
|
||||
}
|
||||
Button {
|
||||
self.remote_image_policy = .friendsOfFriends
|
||||
} label: {
|
||||
Text(remoteImagePolicyText(.friendsOfFriends))
|
||||
}
|
||||
Button {
|
||||
self.remote_image_policy = .friendsOnly
|
||||
} label: {
|
||||
Text(remoteImagePolicyText(.friendsOnly))
|
||||
}
|
||||
Button {
|
||||
self.remote_image_policy = .restricted
|
||||
} label: {
|
||||
Text(remoteImagePolicyText(.restricted))
|
||||
}
|
||||
} label: {
|
||||
Text("\(remoteImagePolicyText(remote_image_policy))")
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
}
|
||||
|
||||
if state.is_privkey_user {
|
||||
Section(NSLocalizedString("Delete", comment: "Section title for deleting the user")) {
|
||||
Button(NSLocalizedString("Delete Account", comment: "Button to delete the user's account."), role: .destructive) {
|
||||
confirm_delete_account = true
|
||||
}
|
||||
|
||||
Section(NSLocalizedString("Reset", comment: "Section title for resetting the user")) {
|
||||
Button(NSLocalizedString("Logout", comment: "Button to logout the user.")) {
|
||||
confirm_logout = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationTitle(NSLocalizedString("Settings", comment: "Navigation title for Settings view."))
|
||||
.navigationBarTitleDisplayMode(.large)
|
||||
.alert(NSLocalizedString("Delete Account", comment: "Alert for deleting the users account."), isPresented: $confirm_delete_account) {
|
||||
TextField("Type DELETE to delete", text: $delete_text)
|
||||
Button(NSLocalizedString("Cancel", comment: "Cancel deleting the user."), role: .cancel) {
|
||||
confirm_delete_account = false
|
||||
}
|
||||
Button(NSLocalizedString("Delete", comment: "Button for deleting the users account."), role: .destructive) {
|
||||
guard let full_kp = state.keypair.to_full() else {
|
||||
return
|
||||
}
|
||||
|
||||
guard delete_text == "DELETE" else {
|
||||
return
|
||||
}
|
||||
|
||||
let ev = created_deleted_account_profile(keypair: full_kp)
|
||||
state.pool.send(.event(ev))
|
||||
notify(.logout, ())
|
||||
}
|
||||
}
|
||||
.alert(NSLocalizedString("Logout", comment: "Alert for logging out the user."), isPresented: $confirm_logout) {
|
||||
Button(NSLocalizedString("Cancel", comment: "Cancel out of logging out the user."), role: .cancel) {
|
||||
Button(NSLocalizedString("Cancel", comment: "Cancel out of logging out the user.")) {
|
||||
confirm_logout = false
|
||||
}
|
||||
Button(NSLocalizedString("Logout", comment: "Button for logging out the user."), role: .destructive) {
|
||||
Button(NSLocalizedString("Logout", comment: "Button for logging out the user.")) {
|
||||
notify(.logout, ())
|
||||
}
|
||||
} message: {
|
||||
Text("Make sure your nsec account key is saved before you logout or you will lose access to this account", comment: "Reminder message in alert to get customer to verify that their private security account key is saved saved before logging out.")
|
||||
}
|
||||
.sheet(isPresented: $show_add_relay) {
|
||||
AddRelayView(show_add_relay: $show_add_relay, relay: $new_relay) { m_relay in
|
||||
guard var relay = m_relay else {
|
||||
return
|
||||
}
|
||||
|
||||
if relay.starts(with: "wss://") == false {
|
||||
relay = "wss://" + relay
|
||||
}
|
||||
|
||||
guard let url = URL(string: relay) else {
|
||||
return
|
||||
}
|
||||
|
||||
guard let ev = state.contacts.event else {
|
||||
return
|
||||
}
|
||||
|
||||
guard let privkey = state.keypair.privkey else {
|
||||
return
|
||||
}
|
||||
|
||||
let info = RelayInfo.rw
|
||||
|
||||
guard (try? state.pool.add_relay(url, info: info)) != nil else {
|
||||
return
|
||||
}
|
||||
|
||||
state.pool.connect(to: [relay])
|
||||
|
||||
guard let new_ev = add_relay(ev: ev, privkey: privkey, current_relays: state.pool.descriptors, relay: relay, info: info) else {
|
||||
return
|
||||
}
|
||||
|
||||
process_contact_event(pool: state.pool, contacts: state.contacts, pubkey: state.pubkey, ev: ev)
|
||||
|
||||
state.pool.send(.event(new_ev))
|
||||
}
|
||||
}
|
||||
.onReceive(handle_notify(.switched_timeline)) { _ in
|
||||
dismiss()
|
||||
}
|
||||
.onReceive(handle_notify(.relays_changed)) { _ in
|
||||
self.relays = state.pool.descriptors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ struct CreateAccountView: View {
|
||||
@StateObject var account: CreateAccountModel = CreateAccountModel()
|
||||
@State var is_light: Bool = false
|
||||
@State var is_done: Bool = false
|
||||
@State var reading_eula: Bool = false
|
||||
|
||||
func SignupForm<FormContent: View>(@ViewBuilder content: () -> FormContent) -> some View {
|
||||
return VStack(alignment: .leading, spacing: 10.0, content: content)
|
||||
@@ -76,7 +75,6 @@ struct CreateAccountView: View {
|
||||
NavigationLink(destination: SaveKeysView(account: account), isActive: $is_done) {
|
||||
EmptyView()
|
||||
}
|
||||
|
||||
DamusWhiteButton(NSLocalizedString("Create", comment: "Button to create account.")) {
|
||||
self.is_done = true
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ struct DMChatView: View {
|
||||
VStack(alignment: .leading) {
|
||||
ForEach(Array(zip(dms.events, dms.events.indices)), id: \.0.id) { (ev, ind) in
|
||||
DMView(event: dms.events[ind], damus_state: damus_state)
|
||||
.event_context_menu(ev, keypair: damus_state.keypair, target_pubkey: ev.pubkey)
|
||||
.event_context_menu(ev, pubkey: ev.pubkey, privkey: damus_state.keypair.privkey)
|
||||
}
|
||||
EndBlock(height: 80)
|
||||
}
|
||||
@@ -42,7 +42,7 @@ struct DMChatView: View {
|
||||
let profile_page = ProfileView(damus_state: damus_state, profile: pmodel, followers: fmodel)
|
||||
return NavigationLink(destination: profile_page) {
|
||||
HStack {
|
||||
ProfilePicView(pubkey: pubkey, size: 24, highlight: .none, profiles: damus_state.profiles, contacts:damus_state.contacts)
|
||||
ProfilePicView(pubkey: pubkey, size: 24, highlight: .none, profiles: damus_state.profiles)
|
||||
|
||||
ProfileName(pubkey: pubkey, profile: profile, damus: damus_state, show_friend_confirmed: true)
|
||||
}
|
||||
@@ -63,8 +63,6 @@ struct DMChatView: View {
|
||||
)
|
||||
.padding(16)
|
||||
.foregroundColor(Color.primary)
|
||||
.frame(minHeight: 70, maxHeight: 150, alignment: .bottom)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
@@ -99,15 +97,22 @@ struct DMChatView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.frame(minHeight: 70, maxHeight: 150, alignment: .bottom)
|
||||
|
||||
Text(message).opacity(0).padding(.all, 8)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.frame(minHeight: 70, maxHeight: 150, alignment: .bottom)
|
||||
}
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.frame(minHeight: 70, maxHeight: 150, alignment: .bottom)
|
||||
.frame(height: 50 + 20 * CGFloat(text_lines))
|
||||
}
|
||||
|
||||
var text_lines: Int {
|
||||
var lines = 1
|
||||
for c in message {
|
||||
if lines > 4 {
|
||||
return lines
|
||||
}
|
||||
if c.isNewline {
|
||||
lines += 1
|
||||
}
|
||||
}
|
||||
|
||||
return lines
|
||||
}
|
||||
|
||||
func send_message() {
|
||||
@@ -137,13 +142,12 @@ struct DMChatView: View {
|
||||
|
||||
Footer
|
||||
}
|
||||
|
||||
Text("Send a message to start the conversation...", comment: "Text prompt for user to send a message to the other user.")
|
||||
.lineLimit(nil)
|
||||
.multilineTextAlignment(.center)
|
||||
.padding(.horizontal, 40)
|
||||
.opacity(((dms.events.count == 0) ? 1.0 : 0.0))
|
||||
.foregroundColor(.gray)
|
||||
.lineLimit(nil)
|
||||
.multilineTextAlignment(.center)
|
||||
.padding(.horizontal, 40)
|
||||
.opacity(((dms.events.count == 0) ? 1.0 : 0.0))
|
||||
.foregroundColor(.gray)
|
||||
}
|
||||
.navigationTitle(NSLocalizedString("DMs", comment: "Navigation title for DMs view, where DM is the English abbreviation for Direct Message."))
|
||||
.toolbar { Header }
|
||||
|
||||
@@ -23,7 +23,7 @@ struct DMView: View {
|
||||
|
||||
let should_show_img = should_show_images(contacts: damus_state.contacts, ev: event, our_pubkey: damus_state.pubkey)
|
||||
|
||||
NoteContentView(damus_state: damus_state, event: event, show_images: should_show_img, artifacts: .just_content(event.get_content(damus_state.keypair.privkey)), size: .normal)
|
||||
NoteContentView(privkey: damus_state.keypair.privkey, event: event, profiles: damus_state.profiles, previews: damus_state.previews, show_images: should_show_img, artifacts: .just_content(event.get_content(damus_state.keypair.privkey)), size: .normal)
|
||||
.foregroundColor(is_ours ? Color.white : Color.primary)
|
||||
.padding(10)
|
||||
.background(is_ours ? Color.accentColor : Color.secondary.opacity(0.15))
|
||||
|
||||
@@ -43,7 +43,6 @@ struct DirectMessagesView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(.horizontal)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,16 +62,16 @@ struct DirectMessagesView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
CustomPicker(selection: $dm_type, content: {
|
||||
VStack {
|
||||
Picker(NSLocalizedString("DM Type", comment: "DM selector for seeing either DMs or message requests, which are messages that have not been responded to yet. DM is the English abbreviation for Direct Message."), selection: $dm_type) {
|
||||
Text("DMs", comment: "Picker option for DM selector for seeing only DMs that have been responded to. DM is the English abbreviation for Direct Message.")
|
||||
.tag(DMType.friend)
|
||||
|
||||
Text("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). DM is the English abbreviation for Direct Message.")
|
||||
.tag(DMType.rando)
|
||||
})
|
||||
|
||||
Divider()
|
||||
.frame(height: 1)
|
||||
|
||||
}
|
||||
.pickerStyle(.segmented)
|
||||
|
||||
TabView(selection: $dm_type) {
|
||||
MainContent(requests: false)
|
||||
@@ -83,6 +82,8 @@ struct DirectMessagesView: View {
|
||||
}
|
||||
.tabViewStyle(.page(indexDisplayMode: .never))
|
||||
}
|
||||
.padding(.horizontal)
|
||||
.padding(.top)
|
||||
.navigationTitle(NSLocalizedString("DMs", comment: "Navigation title for view of DMs, where DM is an English abbreviation for Direct Message."))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
//
|
||||
// EULAView.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-25.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct EULAView: View {
|
||||
var state: SetupState?
|
||||
@Environment(\.dismiss) var dismiss
|
||||
@State var accepted = false
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
DamusGradient()
|
||||
|
||||
ScrollView {
|
||||
Text("EULA", comment: "Label indicating that the below text is the EULA, an acronym for End User License Agreement.")
|
||||
.font(.title.bold())
|
||||
.foregroundColor(.white)
|
||||
|
||||
Text(Markdown.parse(content: """
|
||||
End User License Agreement
|
||||
|
||||
## Introduction
|
||||
|
||||
This End User License Agreement ("EULA") is a legal agreement between you and Damus Nostr Inc. for the use of our mobile application Damus. By installing, accessing, or using our application, you agree to be bound by the terms and conditions of this EULA.
|
||||
|
||||
## Prohibited Content and Conduct
|
||||
|
||||
You agree not to use our application to create, upload, post, send, or store any content that:
|
||||
|
||||
* Is illegal, infringing, or fraudulent
|
||||
* Is defamatory, libelous, or threatening
|
||||
* Is pornographic, obscene, or offensive
|
||||
* Is discriminatory or promotes hate speech
|
||||
* Is harmful to minors
|
||||
* Is intended to harass or bully others
|
||||
* Is intended to impersonate others
|
||||
|
||||
## You also agree not to engage in any conduct that:
|
||||
|
||||
* Harasses or bullies others
|
||||
* Impersonates others
|
||||
* Is intended to intimidate or threaten others
|
||||
* Is intended to promote or incite violence
|
||||
|
||||
## Consequences of Violation
|
||||
|
||||
Any violation of this EULA, including the prohibited content and conduct outlined above, may result in the termination of your access to our application.
|
||||
|
||||
## Disclaimer of Warranties and Limitation of Liability
|
||||
|
||||
Our application is provided "as is" and "as available" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. We do not guarantee that our application will be uninterrupted or error-free. In no event shall Damus Nostr Inc. be liable for any damages whatsoever, including but not limited to direct, indirect, special, incidental, or consequential damages, arising out of or in connection with the use or inability to use our application.
|
||||
|
||||
## Changes to EULA
|
||||
|
||||
We reserve the right to update or modify this EULA at any time and without prior notice. Your continued use of our application following any changes to this EULA will be deemed to be your acceptance of such changes.
|
||||
|
||||
## Contact Information
|
||||
|
||||
If you have any questions about this EULA, please contact us at damus@jb55.com
|
||||
|
||||
## Acceptance of Terms
|
||||
|
||||
By using our Application, you signify your acceptance of this EULA. If you do not agree to this EULA, you may not use our Application.
|
||||
|
||||
"""))
|
||||
.padding()
|
||||
|
||||
if state == .create_account {
|
||||
NavigationLink(destination: CreateAccountView(), isActive: $accepted) {
|
||||
EmptyView()
|
||||
}
|
||||
} else {
|
||||
NavigationLink(destination: LoginView(), isActive: $accepted) {
|
||||
EmptyView()
|
||||
}
|
||||
}
|
||||
DamusWhiteButton(NSLocalizedString("Accept", comment: "Button to accept the end user license agreement before being allowed into the app.")) {
|
||||
accepted = true
|
||||
}
|
||||
|
||||
DamusWhiteButton(NSLocalizedString("Reject", comment: "Button to reject the end user license agreement, which disallows the user from being let into the app.")) {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.navigationBarBackButtonHidden(true)
|
||||
.navigationBarItems(leading: BackNav())
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
}
|
||||
|
||||
struct EULAView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
EULAView()
|
||||
}
|
||||
}
|
||||
@@ -120,7 +120,7 @@ struct EditMetadataView: View {
|
||||
let pfp_size: CGFloat = 90.0
|
||||
|
||||
HStack(alignment: .center) {
|
||||
ProfilePicView(pubkey: damus_state.pubkey, size: pfp_size, highlight: .custom(imageBorderColor(), 4.0), profiles: damus_state.profiles, contacts: damus_state.contacts)
|
||||
ProfilePicView(pubkey: damus_state.pubkey, size: pfp_size, highlight: .custom(imageBorderColor(), 4.0), profiles: damus_state.profiles)
|
||||
.offset(y: -(pfp_size/2.0)) // Increase if set a frame
|
||||
|
||||
Spacer()
|
||||
@@ -196,7 +196,7 @@ struct EditMetadataView: View {
|
||||
if let parts = nip05_parts {
|
||||
Text("'\(parts.username)' at '\(parts.host)' will be used for verification", comment: "Description of how the nip05 identifier would be used for verification.")
|
||||
} else {
|
||||
Text("'\(nip05)' is an invalid NIP-05 identifier. It should look like an email.", comment: "Description of why the nip05 identifier is invalid.")
|
||||
Text("'\(nip05)' is an invalid nip05 identifier. It should look like an email.", comment: "Description of why the nip05 identifier is invalid.")
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -71,8 +71,8 @@ struct EventDetailView: View {
|
||||
}
|
||||
toggle_thread_view()
|
||||
}
|
||||
case .event(let ev, _):
|
||||
EventView(damus: damus, event: ev, has_action_bar: true)
|
||||
case .event(let ev, let highlight):
|
||||
EventView(event: ev, has_action_bar: true, damus: damus)
|
||||
.onTapGesture {
|
||||
if thread.initial_event.id == ev.id {
|
||||
toggle_thread_view()
|
||||
|
||||
@@ -35,7 +35,7 @@ struct EventView: View {
|
||||
|
||||
@EnvironmentObject var action_bar: ActionBarModel
|
||||
|
||||
init(damus: DamusState, event: NostrEvent, has_action_bar: Bool) {
|
||||
init(event: NostrEvent, has_action_bar: Bool, damus: DamusState) {
|
||||
self.event = event
|
||||
self.has_action_bar = has_action_bar
|
||||
self.damus = damus
|
||||
@@ -57,40 +57,78 @@ struct EventView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
if event.known_kind == .boost {
|
||||
if let inner_ev = event.inner_event {
|
||||
VStack(alignment: .leading) {
|
||||
let prof_model = ProfileModel(pubkey: event.pubkey, damus: damus)
|
||||
let follow_model = FollowersModel(damus_state: damus, target: event.pubkey)
|
||||
let prof = damus.profiles.lookup(id: event.pubkey)
|
||||
let booster_profile = ProfileView(damus_state: damus, profile: prof_model, followers: follow_model)
|
||||
|
||||
NavigationLink(destination: booster_profile) {
|
||||
Reposted(damus: damus, pubkey: event.pubkey, profile: prof)
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
TextEvent(damus: damus, event: inner_ev, pubkey: inner_ev.pubkey, has_action_bar: has_action_bar, booster_pubkey: event.pubkey)
|
||||
.padding([.top], 1)
|
||||
return Group {
|
||||
if event.known_kind == .boost, let inner_ev = event.inner_event {
|
||||
VStack(alignment: .leading) {
|
||||
let prof_model = ProfileModel(pubkey: event.pubkey, damus: damus)
|
||||
let follow_model = FollowersModel(damus_state: damus, target: event.pubkey)
|
||||
let prof = damus.profiles.lookup(id: event.pubkey)
|
||||
let booster_profile = ProfileView(damus_state: damus, profile: prof_model, followers: follow_model)
|
||||
|
||||
NavigationLink(destination: booster_profile) {
|
||||
Reposted(damus: damus, pubkey: event.pubkey, profile: prof)
|
||||
}
|
||||
} else {
|
||||
EmptyView()
|
||||
}
|
||||
} else if event.known_kind == .zap {
|
||||
if let zap = damus.zaps.zaps[event.id] {
|
||||
ZapEvent(damus: damus, zap: zap)
|
||||
} else {
|
||||
EmptyView()
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
TextEvent(inner_ev, pubkey: inner_ev.pubkey, booster_pubkey: event.pubkey)
|
||||
.padding([.top], 1)
|
||||
}
|
||||
} else {
|
||||
TextEvent(damus: damus, event: event, pubkey: pubkey, has_action_bar: has_action_bar, booster_pubkey: nil)
|
||||
TextEvent(event, pubkey: pubkey)
|
||||
.padding([.top], 6)
|
||||
}
|
||||
|
||||
Divider()
|
||||
.padding([.top], 4)
|
||||
}
|
||||
}
|
||||
|
||||
func TextEvent(_ event: NostrEvent, pubkey: String, booster_pubkey: String? = nil) -> some View {
|
||||
return HStack(alignment: .top) {
|
||||
let profile = damus.profiles.lookup(id: pubkey)
|
||||
|
||||
VStack {
|
||||
let pmodel = ProfileModel(pubkey: pubkey, damus: damus)
|
||||
let pv = ProfileView(damus_state: damus, profile: pmodel, followers: FollowersModel(damus_state: damus, target: pubkey))
|
||||
|
||||
NavigationLink(destination: pv) {
|
||||
ProfilePicView(pubkey: pubkey, size: PFP_SIZE, highlight: .none, profiles: damus.profiles)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
HStack(alignment: .center) {
|
||||
EventProfileName(pubkey: pubkey, profile: profile, damus: damus, show_friend_confirmed: true, size: .normal)
|
||||
|
||||
Text("\(format_relative_time(event.created_at))")
|
||||
.foregroundColor(.gray)
|
||||
}
|
||||
|
||||
EventBody(damus_state: damus, event: event, size: .normal)
|
||||
|
||||
if let mention = first_eref_mention(ev: event, privkey: damus.keypair.privkey) {
|
||||
BuilderEventView(damus: damus, event_id: mention.ref.id)
|
||||
}
|
||||
|
||||
if has_action_bar {
|
||||
Rectangle().frame(height: 2).opacity(0)
|
||||
|
||||
let bar = make_actionbar_model(ev: event, damus: damus)
|
||||
|
||||
EventActionBar(damus_state: damus, event: event, bar: bar)
|
||||
.padding([.top], 4)
|
||||
}
|
||||
|
||||
Divider()
|
||||
.padding([.top], 4)
|
||||
}
|
||||
.padding([.leading], 2)
|
||||
}
|
||||
.contentShape(Rectangle())
|
||||
.background(event_validity_color(event.validity))
|
||||
.id(event.id)
|
||||
.frame(maxWidth: .infinity, minHeight: PFP_SIZE)
|
||||
.padding([.bottom], 2)
|
||||
.event_context_menu(event, pubkey: pubkey, privkey: damus.keypair.privkey)
|
||||
}
|
||||
}
|
||||
|
||||
// blame the porn bots for this code
|
||||
@@ -98,18 +136,12 @@ func should_show_images(contacts: Contacts, ev: NostrEvent, our_pubkey: String,
|
||||
if ev.pubkey == our_pubkey {
|
||||
return true
|
||||
}
|
||||
|
||||
let remote_image_policy: RemoteImagePolicy = RemoteImagePolicy(rawValue: UserDefaults.standard.string(forKey: "remote_image_policy") ?? "") ?? .friendsOfFriends
|
||||
if remote_image_policy == .everyone ||
|
||||
remote_image_policy == .friendsOnly && contacts.is_friend(ev.pubkey) ||
|
||||
remote_image_policy == .friendsOfFriends && contacts.is_in_friendosphere(ev.pubkey) {
|
||||
if contacts.is_in_friendosphere(ev.pubkey) {
|
||||
return true
|
||||
}
|
||||
|
||||
if let boost_key = booster_pubkey, contacts.is_in_friendosphere(boost_key) && remote_image_policy != .restricted {
|
||||
if let boost_key = booster_pubkey, contacts.is_in_friendosphere(boost_key) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -137,9 +169,37 @@ extension View {
|
||||
}
|
||||
}
|
||||
|
||||
func event_context_menu(_ event: NostrEvent, keypair: Keypair, target_pubkey: String) -> some View {
|
||||
func event_context_menu(_ event: NostrEvent, pubkey: String, privkey: String?) -> some View {
|
||||
return self.contextMenu {
|
||||
EventMenuContext(event: event, keypair: keypair, target_pubkey: target_pubkey)
|
||||
Button {
|
||||
UIPasteboard.general.string = event.get_content(privkey)
|
||||
} label: {
|
||||
Label(NSLocalizedString("Copy Text", comment: "Context menu option for copying the text from an note."), systemImage: "doc.on.doc")
|
||||
}
|
||||
|
||||
Button {
|
||||
UIPasteboard.general.string = bech32_pubkey(pubkey) ?? pubkey
|
||||
} label: {
|
||||
Label(NSLocalizedString("Copy User ID", comment: "Context menu option for copying the ID of the user who created the note."), systemImage: "person")
|
||||
}
|
||||
|
||||
Button {
|
||||
UIPasteboard.general.string = bech32_note_id(event.id) ?? event.id
|
||||
} label: {
|
||||
Label(NSLocalizedString("Copy Note ID", comment: "Context menu option for copying the ID of the note."), systemImage: "note.text")
|
||||
}
|
||||
|
||||
Button {
|
||||
UIPasteboard.general.string = event_to_json(ev: event)
|
||||
} label: {
|
||||
Label(NSLocalizedString("Copy Note JSON", comment: "Context menu option for copying the JSON text from the note."), systemImage: "j.square.on.square")
|
||||
}
|
||||
|
||||
Button {
|
||||
NotificationCenter.default.post(name: .broadcast_event, object: event)
|
||||
} label: {
|
||||
Label(NSLocalizedString("Broadcast", comment: "Context menu option for broadcasting the user's note to all of the user's connected relay servers."), systemImage: "globe")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -163,19 +223,17 @@ func format_date(_ created_at: Int64) -> String {
|
||||
func make_actionbar_model(ev: NostrEvent, damus: DamusState) -> ActionBarModel {
|
||||
let likes = damus.likes.counts[ev.id]
|
||||
let boosts = damus.boosts.counts[ev.id]
|
||||
let zaps = damus.zaps.event_counts[ev.id]
|
||||
let zap_total = damus.zaps.event_totals[ev.id]
|
||||
let tips = damus.tips.tips[ev.id]
|
||||
let our_like = damus.likes.our_events[ev.id]
|
||||
let our_boost = damus.boosts.our_events[ev.id]
|
||||
let our_zap = damus.zaps.our_zaps[ev.id]
|
||||
let our_tip = damus.tips.our_tips[ev.id]
|
||||
|
||||
return ActionBarModel(likes: likes ?? 0,
|
||||
boosts: boosts ?? 0,
|
||||
zaps: zaps ?? 0,
|
||||
zap_total: zap_total ?? 0,
|
||||
tips: tips ?? 0,
|
||||
our_like: our_like,
|
||||
our_boost: our_boost,
|
||||
our_zap: our_zap?.first
|
||||
our_tip: our_tip
|
||||
)
|
||||
}
|
||||
|
||||
@@ -190,9 +248,9 @@ struct EventView_Previews: PreviewProvider {
|
||||
|
||||
*/
|
||||
EventView(
|
||||
damus: test_damus_state(),
|
||||
event: test_event,
|
||||
has_action_bar: true
|
||||
has_action_bar: true,
|
||||
damus: test_damus_state()
|
||||
)
|
||||
}
|
||||
.padding()
|
||||
|
||||
@@ -31,30 +31,23 @@ struct BuilderEventView: View {
|
||||
return
|
||||
}
|
||||
|
||||
guard id == subscription_uuid else {
|
||||
return
|
||||
// Is current event
|
||||
if id == subscription_uuid {
|
||||
if event != nil {
|
||||
return
|
||||
}
|
||||
|
||||
event = nostr_event
|
||||
|
||||
unsubscribe()
|
||||
}
|
||||
|
||||
guard nostr_event.known_kind == .text else {
|
||||
return
|
||||
}
|
||||
|
||||
if event != nil {
|
||||
return
|
||||
}
|
||||
|
||||
event = nostr_event
|
||||
|
||||
unsubscribe()
|
||||
}
|
||||
|
||||
func load() {
|
||||
subscribe(filters: [
|
||||
NostrFilter(ids: [self.event_id], limit: 1),
|
||||
NostrFilter(
|
||||
kinds: [NostrKind.zap.rawValue],
|
||||
referenced_ids: [self.event_id],
|
||||
limit: 500
|
||||
ids: [self.event_id],
|
||||
limit: 1
|
||||
)
|
||||
])
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ struct EmbeddedEventView: View {
|
||||
|
||||
EventBody(damus_state: damus_state, event: event, size: .small)
|
||||
}
|
||||
.event_context_menu(event, keypair: damus_state.keypair, target_pubkey: pubkey)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ struct EventBody: View {
|
||||
|
||||
let should_show_img = should_show_images(contacts: damus_state.contacts, ev: event, our_pubkey: damus_state.pubkey, booster_pubkey: nil)
|
||||
|
||||
NoteContentView(damus_state: damus_state, event: event, show_images: should_show_img, artifacts: .just_content(content), size: size)
|
||||
NoteContentView(privkey: damus_state.keypair.privkey, event: event, profiles: damus_state.profiles, previews: damus_state.previews, show_images: should_show_img, artifacts: .just_content(content), size: size)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
//
|
||||
// EventMenu.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-23.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct EventMenuContext: View {
|
||||
let event: NostrEvent
|
||||
let keypair: Keypair
|
||||
let target_pubkey: String
|
||||
|
||||
var body: some View {
|
||||
|
||||
Button {
|
||||
UIPasteboard.general.string = event.get_content(keypair.privkey)
|
||||
} label: {
|
||||
Label(NSLocalizedString("Copy Text", comment: "Context menu option for copying the text from an note."), systemImage: "doc.on.doc")
|
||||
}
|
||||
|
||||
Button {
|
||||
UIPasteboard.general.string = bech32_pubkey(target_pubkey)
|
||||
} label: {
|
||||
Label(NSLocalizedString("Copy User Pubkey", comment: "Context menu option for copying the ID of the user who created the note."), systemImage: "person")
|
||||
}
|
||||
|
||||
Button {
|
||||
UIPasteboard.general.string = bech32_note_id(event.id) ?? event.id
|
||||
} label: {
|
||||
Label(NSLocalizedString("Copy Note ID", comment: "Context menu option for copying the ID of the note."), systemImage: "note.text")
|
||||
}
|
||||
|
||||
Button {
|
||||
UIPasteboard.general.string = event_to_json(ev: event)
|
||||
} label: {
|
||||
Label(NSLocalizedString("Copy Note JSON", comment: "Context menu option for copying the JSON text from the note."), systemImage: "square.on.square")
|
||||
}
|
||||
|
||||
Button {
|
||||
NotificationCenter.default.post(name: .broadcast_event, object: event)
|
||||
} label: {
|
||||
Label(NSLocalizedString("Broadcast", comment: "Context menu option for broadcasting the user's note to all of the user's connected relay servers."), systemImage: "globe")
|
||||
}
|
||||
|
||||
// Only allow reporting if logged in with private key and the currently viewed profile is not the logged in profile.
|
||||
if keypair.pubkey != target_pubkey && keypair.privkey != nil {
|
||||
Button(role: .destructive) {
|
||||
let target: ReportTarget = .note(ReportNoteTarget(pubkey: target_pubkey, note_id: event.id))
|
||||
notify(.report, target)
|
||||
} label: {
|
||||
Label(NSLocalizedString("Report", comment: "Context menu option for reporting content."), systemImage: "exclamationmark.bubble")
|
||||
}
|
||||
|
||||
Button(role: .destructive) {
|
||||
notify(.block, target_pubkey)
|
||||
} label: {
|
||||
Label(NSLocalizedString("Block", comment: "Context menu option for blocking users."), systemImage: "exclamationmark.octagon")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
struct EventMenu: UIViewRepresentable {
|
||||
|
||||
typealias UIViewType = UIButton
|
||||
|
||||
let saveAction = UIAction(title: "") { action in }
|
||||
let saveMenu = UIMenu(title: "", children: [
|
||||
UIAction(title: "First Menu Item", image: UIImage(systemName: "nameOfSFSymbol")) { action in
|
||||
//code action for menu item
|
||||
},
|
||||
UIAction(title: "First Menu Item", image: UIImage(systemName: "nameOfSFSymbol")) { action in
|
||||
//code action for menu item
|
||||
},
|
||||
UIAction(title: "First Menu Item", image: UIImage(systemName: "nameOfSFSymbol")) { action in
|
||||
//code action for menu item
|
||||
},
|
||||
])
|
||||
|
||||
func makeUIView(context: Context) -> UIButton {
|
||||
let button = UIButton(frame: CGRect(x: 0, y: 0, width: 20, height: 20))
|
||||
button.showsMenuAsPrimaryAction = true
|
||||
button.menu = saveMenu
|
||||
|
||||
return button
|
||||
}
|
||||
|
||||
func updateUIView(_ uiView: UIButton, context: Context) {
|
||||
uiView.setImage(UIImage(systemName: "plus"), for: .normal)
|
||||
}
|
||||
}
|
||||
|
||||
struct EventMenu_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
EventMenu(event: test_event, privkey: nil, pubkey: test_event.pubkey)
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
@@ -35,7 +35,7 @@ struct EventProfile: View {
|
||||
let pv = ProfileView(damus_state: damus_state, profile: pmodel, followers: FollowersModel(damus_state: damus_state, target: pubkey))
|
||||
|
||||
NavigationLink(destination: pv) {
|
||||
ProfilePicView(pubkey: pubkey, size: pfp_size, highlight: .none, profiles: damus_state.profiles, contacts: damus_state.contacts)
|
||||
ProfilePicView(pubkey: pubkey, size: pfp_size, highlight: .none, profiles: damus_state.profiles)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
//
|
||||
// MutedEventView.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-27.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct MutedEventView: View {
|
||||
let damus_state: DamusState
|
||||
let event: NostrEvent
|
||||
let scroller: ScrollViewProxy?
|
||||
|
||||
let selected: Bool
|
||||
@Binding var nav_target: String?
|
||||
@Binding var navigating: Bool
|
||||
@State var shown: Bool
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
|
||||
init(damus_state: DamusState, event: NostrEvent, scroller: ScrollViewProxy?, nav_target: Binding<String?>, navigating: Binding<Bool>, selected: Bool) {
|
||||
self.damus_state = damus_state
|
||||
self.event = event
|
||||
self.scroller = scroller
|
||||
self.selected = selected
|
||||
self._nav_target = nav_target
|
||||
self._navigating = navigating
|
||||
self._shown = State(initialValue: !should_hide_event(contacts: damus_state.contacts, ev: event))
|
||||
}
|
||||
|
||||
var should_mute: Bool {
|
||||
return should_hide_event(contacts: damus_state.contacts, ev: event)
|
||||
}
|
||||
|
||||
var FillColor: Color {
|
||||
colorScheme == .light ? Color("DamusLightGrey") : Color("DamusDarkGrey")
|
||||
}
|
||||
|
||||
var MutedBox: some View {
|
||||
ZStack {
|
||||
RoundedRectangle(cornerRadius: 20)
|
||||
.foregroundColor(FillColor)
|
||||
|
||||
HStack {
|
||||
Text("Post from a user you've blocked", comment: "Text to indicate that what is being shown is a post from a user who has been blocked.")
|
||||
Spacer()
|
||||
Button(shown ? NSLocalizedString("Hide", comment: "Button to hide a post from a user who has been blocked.") : NSLocalizedString("Show", comment: "Button to show a post from a user who has been blocked.")) {
|
||||
shown.toggle()
|
||||
}
|
||||
}
|
||||
.padding(10)
|
||||
}
|
||||
}
|
||||
|
||||
var Event: some View {
|
||||
Group {
|
||||
if selected {
|
||||
SelectedEventView(damus: damus_state, event: event)
|
||||
} else {
|
||||
EventView(damus: damus_state, event: event, has_action_bar: true)
|
||||
.onTapGesture {
|
||||
nav_target = event.id
|
||||
navigating = true
|
||||
}
|
||||
.onAppear {
|
||||
// TODO: find another solution to prevent layout shifting and layout blocking on large responses
|
||||
scroller?.scrollTo("main", anchor: .bottom)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
Group {
|
||||
if should_mute {
|
||||
MutedBox
|
||||
}
|
||||
if shown {
|
||||
Event
|
||||
}
|
||||
}
|
||||
.onReceive(handle_notify(.new_mutes)) { notif in
|
||||
guard let mutes = notif.object as? [String] else {
|
||||
return
|
||||
}
|
||||
|
||||
if mutes.contains(event.pubkey) {
|
||||
shown = false
|
||||
}
|
||||
}
|
||||
.onReceive(handle_notify(.new_unmutes)) { notif in
|
||||
guard let unmutes = notif.object as? [String] else {
|
||||
return
|
||||
}
|
||||
|
||||
if unmutes.contains(event.pubkey) {
|
||||
shown = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct MutedEventView_Previews: PreviewProvider {
|
||||
@State static var nav_target: String? = nil
|
||||
@State static var navigating: Bool = false
|
||||
|
||||
static var previews: some View {
|
||||
|
||||
MutedEventView(damus_state: test_damus_state(), event: test_event, scroller: nil, nav_target: $nav_target, navigating: $navigating, selected: false)
|
||||
.frame(width: .infinity, height: 50)
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,6 @@ struct SelectedEventView: View {
|
||||
.padding([.top], 4)
|
||||
}
|
||||
.padding([.leading], 2)
|
||||
.event_context_menu(event, keypair: damus.keypair, target_pubkey: event.pubkey)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
//
|
||||
// TextEvent.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-02-03.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct TextEvent: View {
|
||||
let damus: DamusState
|
||||
let event: NostrEvent
|
||||
let pubkey: String
|
||||
let has_action_bar: Bool
|
||||
let booster_pubkey: String?
|
||||
|
||||
var body: some View {
|
||||
HStack(alignment: .top) {
|
||||
let profile = damus.profiles.lookup(id: pubkey)
|
||||
|
||||
VStack {
|
||||
let pmodel = ProfileModel(pubkey: pubkey, damus: damus)
|
||||
let pv = ProfileView(damus_state: damus, profile: pmodel, followers: FollowersModel(damus_state: damus, target: pubkey))
|
||||
|
||||
NavigationLink(destination: pv) {
|
||||
ProfilePicView(pubkey: pubkey, size: PFP_SIZE, highlight: .none, profiles: damus.profiles, contacts: damus.contacts)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
HStack(alignment: .center) {
|
||||
EventProfileName(pubkey: pubkey, profile: profile, damus: damus, show_friend_confirmed: true, size: .normal)
|
||||
|
||||
Text("\(format_relative_time(event.created_at))")
|
||||
.foregroundColor(.gray)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
|
||||
EventBody(damus_state: damus, event: event, size: .normal)
|
||||
|
||||
if let mention = first_eref_mention(ev: event, privkey: damus.keypair.privkey) {
|
||||
BuilderEventView(damus: damus, event_id: mention.ref.id)
|
||||
}
|
||||
|
||||
if has_action_bar {
|
||||
Rectangle().frame(height: 2).opacity(0)
|
||||
|
||||
let bar = make_actionbar_model(ev: event, damus: damus)
|
||||
|
||||
EventActionBar(damus_state: damus, event: event, bar: bar)
|
||||
.padding([.top], 4)
|
||||
}
|
||||
}
|
||||
.padding([.leading], 2)
|
||||
}
|
||||
.contentShape(Rectangle())
|
||||
.background(event_validity_color(event.validity))
|
||||
.id(event.id)
|
||||
.frame(maxWidth: .infinity, minHeight: PFP_SIZE)
|
||||
.padding([.bottom], 2)
|
||||
.event_context_menu(event, keypair: damus.keypair, target_pubkey: pubkey)
|
||||
}
|
||||
}
|
||||
|
||||
struct TextEvent_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
TextEvent(damus: test_damus_state(), event: test_event, pubkey: "pk", has_action_bar: true, booster_pubkey: nil)
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
//
|
||||
// ZapEvent.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-02-03.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ZapEvent: View {
|
||||
let damus: DamusState
|
||||
let zap: Zap
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
Text("⚡️ \(format_msats(zap.invoice.amount))")
|
||||
.font(.headline)
|
||||
.padding([.top], 2)
|
||||
|
||||
TextEvent(damus: damus, event: zap.request.ev, pubkey: zap.request.ev.pubkey, has_action_bar: false, booster_pubkey: nil)
|
||||
.padding([.top], 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
struct ZapEvent_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ZapEvent()
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
@@ -15,7 +15,26 @@ struct FollowUserView: View {
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
UserView(damus_state: damus_state, pubkey: target.pubkey)
|
||||
let pmodel = ProfileModel(pubkey: target.pubkey, damus: damus_state)
|
||||
let followers = FollowersModel(damus_state: damus_state, target: target.pubkey)
|
||||
let pv = ProfileView(damus_state: damus_state, profile: pmodel, followers: followers)
|
||||
|
||||
NavigationLink(destination: pv) {
|
||||
ProfilePicView(pubkey: target.pubkey, size: PFP_SIZE, highlight: .none, profiles: damus_state.profiles)
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
let profile = damus_state.profiles.lookup(id: target.pubkey)
|
||||
ProfileName(pubkey: target.pubkey, profile: profile, damus: damus_state, show_friend_confirmed: false, show_nip5_domain: false)
|
||||
if let about = profile?.about {
|
||||
Text(FollowUserView.markdown.process(about))
|
||||
.lineLimit(3)
|
||||
.font(.footnote)
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
|
||||
FollowButtonView(target: target, follow_state: damus_state.contacts.follow_state(target.pubkey))
|
||||
}
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
//
|
||||
// MutelistView.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-25.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct MutelistView: View {
|
||||
let damus_state: DamusState
|
||||
@State var users: [String]
|
||||
|
||||
func RemoveAction(pubkey: String) -> some View {
|
||||
Button {
|
||||
guard let mutelist = damus_state.contacts.mutelist else {
|
||||
return
|
||||
}
|
||||
|
||||
guard let keypair = damus_state.keypair.to_full() else {
|
||||
return
|
||||
}
|
||||
|
||||
guard let new_ev = remove_from_mutelist(keypair: keypair, prev: mutelist, to_remove: pubkey) else {
|
||||
return
|
||||
}
|
||||
|
||||
damus_state.contacts.set_mutelist(new_ev)
|
||||
damus_state.pool.send(.event(new_ev))
|
||||
users = get_mutelist_users(new_ev)
|
||||
} label: {
|
||||
Label(NSLocalizedString("Delete", comment: "Button to remove a user from their blocklist."), systemImage: "trash")
|
||||
}
|
||||
.tint(.red)
|
||||
}
|
||||
|
||||
|
||||
var body: some View {
|
||||
List(users, id: \.self) { pubkey in
|
||||
UserView(damus_state: damus_state, pubkey: pubkey)
|
||||
.id(pubkey)
|
||||
.swipeActions {
|
||||
RemoveAction(pubkey: pubkey)
|
||||
}
|
||||
}
|
||||
.navigationTitle(NSLocalizedString("Blocked Users", comment: "Navigation title of view to see list of blocked users."))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func get_mutelist_users(_ mlist: NostrEvent?) -> [String] {
|
||||
guard let mutelist = mlist else {
|
||||
return []
|
||||
}
|
||||
|
||||
return mutelist.tags.reduce(into: Array<String>()) { pks, tag in
|
||||
if tag.count >= 2 && tag[0] == "p" {
|
||||
pks.append(tag[1])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct MutelistView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
MutelistView(damus_state: test_damus_state(), users: [test_event.pubkey, test_event.pubkey+"hi"])
|
||||
}
|
||||
}
|
||||
@@ -7,33 +7,75 @@
|
||||
|
||||
import SwiftUI
|
||||
import LinkPresentation
|
||||
import NaturalLanguage
|
||||
|
||||
#if canImport(FoundationNetworking)
|
||||
import FoundationNetworking
|
||||
#endif
|
||||
struct NoteArtifacts {
|
||||
let content: String
|
||||
let images: [URL]
|
||||
let invoices: [Invoice]
|
||||
let links: [URL]
|
||||
|
||||
static func just_content(_ content: String) -> NoteArtifacts {
|
||||
NoteArtifacts(content: content, images: [], invoices: [], links: [])
|
||||
}
|
||||
}
|
||||
|
||||
func render_note_content(ev: NostrEvent, profiles: Profiles, privkey: String?) -> NoteArtifacts {
|
||||
let blocks = ev.blocks(privkey)
|
||||
var invoices: [Invoice] = []
|
||||
var img_urls: [URL] = []
|
||||
var link_urls: [URL] = []
|
||||
let txt = blocks.reduce("") { str, block in
|
||||
switch block {
|
||||
case .mention(let m):
|
||||
return str + mention_str(m, profiles: profiles)
|
||||
case .text(let txt):
|
||||
return str + txt
|
||||
case .hashtag(let htag):
|
||||
return str + hashtag_str(htag)
|
||||
case .invoice(let invoice):
|
||||
invoices.append(invoice)
|
||||
return str
|
||||
case .url(let url):
|
||||
|
||||
// Handle Image URLs
|
||||
if is_image_url(url) {
|
||||
// Append Image
|
||||
img_urls.append(url)
|
||||
return str
|
||||
} else {
|
||||
link_urls.append(url)
|
||||
return str + url.absoluteString
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NoteArtifacts(content: txt, images: img_urls, invoices: invoices, links: link_urls)
|
||||
}
|
||||
|
||||
func is_image_url(_ url: URL) -> Bool {
|
||||
let str = url.lastPathComponent.lowercased()
|
||||
return str.hasSuffix("png") || str.hasSuffix("jpg") || str.hasSuffix("jpeg") || str.hasSuffix("gif")
|
||||
}
|
||||
|
||||
struct NoteContentView: View {
|
||||
let damus_state: DamusState
|
||||
let privkey: String?
|
||||
let event: NostrEvent
|
||||
let profiles: Profiles
|
||||
let previews: PreviewCache
|
||||
|
||||
let show_images: Bool
|
||||
|
||||
|
||||
@State var artifacts: NoteArtifacts
|
||||
|
||||
let size: EventViewKind
|
||||
|
||||
@State var preview: LinkViewRepresentable? = nil
|
||||
let size: EventViewKind
|
||||
|
||||
func MainContent() -> some View {
|
||||
return VStack(alignment: .leading) {
|
||||
Text(artifacts.content)
|
||||
Text(Markdown.parse(content: artifacts.content))
|
||||
.font(eventviewsize_to_font(size))
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
|
||||
if size == .selected {
|
||||
TranslateView(damus_state: damus_state, event: event, size: size)
|
||||
}
|
||||
|
||||
if show_images && artifacts.images.count > 0 {
|
||||
ImageCarousel(urls: artifacts.images)
|
||||
} else if !show_images && artifacts.images.count > 0 {
|
||||
@@ -46,7 +88,7 @@ struct NoteContentView: View {
|
||||
.cornerRadius(10)
|
||||
}
|
||||
if artifacts.invoices.count > 0 {
|
||||
InvoicesView(our_pubkey: damus_state.keypair.pubkey, invoices: artifacts.invoices)
|
||||
InvoicesView(invoices: artifacts.invoices)
|
||||
}
|
||||
|
||||
if let preview = self.preview, show_images {
|
||||
@@ -65,16 +107,16 @@ struct NoteContentView: View {
|
||||
var body: some View {
|
||||
MainContent()
|
||||
.onAppear() {
|
||||
self.artifacts = render_note_content(ev: event, profiles: damus_state.profiles, privkey: damus_state.keypair.privkey, show_images: show_images)
|
||||
self.artifacts = render_note_content(ev: event, profiles: profiles, privkey: privkey)
|
||||
}
|
||||
.onReceive(handle_notify(.profile_updated)) { notif in
|
||||
let profile = notif.object as! ProfileUpdate
|
||||
let blocks = event.blocks(damus_state.keypair.privkey)
|
||||
let blocks = event.blocks(privkey)
|
||||
for block in blocks {
|
||||
switch block {
|
||||
case .mention(let m):
|
||||
if m.type == .pubkey && m.ref.ref_id == profile.pubkey {
|
||||
self.artifacts = render_note_content(ev: event, profiles: damus_state.profiles, privkey: damus_state.keypair.privkey, show_images: show_images)
|
||||
self.artifacts = render_note_content(ev: event, profiles: profiles, privkey: privkey)
|
||||
}
|
||||
case .text: return
|
||||
case .hashtag: return
|
||||
@@ -84,7 +126,7 @@ struct NoteContentView: View {
|
||||
}
|
||||
}
|
||||
.task {
|
||||
if let preview = damus_state.previews.lookup(self.event.id) {
|
||||
if let preview = previews.lookup(self.event.id) {
|
||||
switch preview {
|
||||
case .value(let view):
|
||||
self.preview = view
|
||||
@@ -98,13 +140,13 @@ struct NoteContentView: View {
|
||||
let meta = await getMetaData(for: artifacts.links.first!)
|
||||
|
||||
let view = meta.map { LinkViewRepresentable(meta: .linkmeta($0)) }
|
||||
damus_state.previews.store(evid: self.event.id, preview: view)
|
||||
previews.store(evid: self.event.id, preview: view)
|
||||
self.preview = view
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func getMetaData(for url: URL) async -> LPLinkMetadata? {
|
||||
// iOS 15 is crashing for some reason
|
||||
guard #available(iOS 16, *) else {
|
||||
@@ -121,112 +163,20 @@ struct NoteContentView: View {
|
||||
}
|
||||
}
|
||||
|
||||
func hashtag_str(_ htag: String) -> AttributedString {
|
||||
var attributedString = AttributedString(stringLiteral: "#\(htag)")
|
||||
attributedString.link = URL(string: "nostr:t:\(htag)")
|
||||
attributedString.foregroundColor = .purple
|
||||
return attributedString
|
||||
}
|
||||
func hashtag_str(_ htag: String) -> String {
|
||||
return "[#\(htag)](nostr:t:\(htag))"
|
||||
}
|
||||
|
||||
func url_str(_ url: URL) -> AttributedString {
|
||||
var attributedString = AttributedString(stringLiteral: url.absoluteString)
|
||||
attributedString.link = url
|
||||
attributedString.foregroundColor = .purple
|
||||
return attributedString
|
||||
}
|
||||
|
||||
func mention_str(_ m: Mention, profiles: Profiles) -> AttributedString {
|
||||
func mention_str(_ m: Mention, profiles: Profiles) -> String {
|
||||
switch m.type {
|
||||
case .pubkey:
|
||||
let pk = m.ref.ref_id
|
||||
let profile = profiles.lookup(id: pk)
|
||||
let disp = Profile.displayName(profile: profile, pubkey: pk)
|
||||
var attributedString = AttributedString(stringLiteral: "@\(disp)")
|
||||
attributedString.link = URL(string: "nostr:\(encode_pubkey_uri(m.ref))")
|
||||
attributedString.foregroundColor = .purple
|
||||
return attributedString
|
||||
return "[@\(disp)](nostr:\(encode_pubkey_uri(m.ref)))"
|
||||
case .event:
|
||||
let bevid = bech32_note_id(m.ref.ref_id) ?? m.ref.ref_id
|
||||
var attributedString = AttributedString(stringLiteral: "@\(abbrev_pubkey(bevid))")
|
||||
attributedString.link = URL(string: "nostr:\(encode_event_id_uri(m.ref))")
|
||||
attributedString.foregroundColor = .purple
|
||||
return attributedString
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public struct Translator {
|
||||
private let url: String
|
||||
private let apiKey: String?
|
||||
private let session = URLSession.shared
|
||||
private let encoder = JSONEncoder()
|
||||
private let decoder = JSONDecoder()
|
||||
|
||||
public init(_ url: String, apiKey: String? = nil) {
|
||||
self.url = url
|
||||
self.apiKey = apiKey
|
||||
}
|
||||
|
||||
public func translate(_ text: String, from sourceLanguage: String, to targetLanguage: String) async throws -> String {
|
||||
let url = try makeURL(path: "/translate")
|
||||
|
||||
var request = URLRequest(url: url)
|
||||
request.httpMethod = "POST"
|
||||
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
|
||||
|
||||
struct RequestBody: Encodable {
|
||||
let q: String
|
||||
let source: String
|
||||
let target: String
|
||||
let api_key: String?
|
||||
}
|
||||
let body = RequestBody(q: text, source: sourceLanguage, target: targetLanguage, api_key: apiKey)
|
||||
request.httpBody = try encoder.encode(body)
|
||||
|
||||
struct Response: Decodable {
|
||||
let translatedText: String
|
||||
}
|
||||
let response: Response = try await decodedData(for: request)
|
||||
return response.translatedText
|
||||
}
|
||||
|
||||
private func makeURL(path: String) throws -> URL {
|
||||
guard var components = URLComponents(string: url) else {
|
||||
throw URLError(.badURL)
|
||||
}
|
||||
components.path = path
|
||||
guard let url = components.url else {
|
||||
throw URLError(.badURL)
|
||||
}
|
||||
return url
|
||||
}
|
||||
|
||||
private func decodedData<Output: Decodable>(for request: URLRequest) async throws -> Output {
|
||||
let data = try await session.data(for: request)
|
||||
let result = try decoder.decode(Output.self, from: data)
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
private extension URLSession {
|
||||
func data(for request: URLRequest) async throws -> Data {
|
||||
var task: URLSessionDataTask?
|
||||
let onCancel = { task?.cancel() }
|
||||
return try await withTaskCancellationHandler(
|
||||
operation: {
|
||||
try await withCheckedThrowingContinuation { continuation in
|
||||
task = dataTask(with: request) { data, _, error in
|
||||
guard let data = data else {
|
||||
let error = error ?? URLError(.badServerResponse)
|
||||
return continuation.resume(throwing: error)
|
||||
}
|
||||
continuation.resume(returning: data)
|
||||
}
|
||||
task?.resume()
|
||||
}
|
||||
},
|
||||
onCancel: { onCancel() }
|
||||
)
|
||||
return "[@\(abbrev_pubkey(bevid))](nostr:\(encode_event_id_uri(m.ref)))"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,70 +185,7 @@ struct NoteContentView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
let state = test_damus_state()
|
||||
let content = "hi there ¯\\_(ツ)_/¯ https://jb55.com/s/Oct12-150217.png 5739a762ef6124dd.jpg"
|
||||
let artifacts = NoteArtifacts(content: AttributedString(stringLiteral: content), images: [], invoices: [], links: [])
|
||||
NoteContentView(damus_state: state, event: NostrEvent(content: content, pubkey: "pk"), show_images: true, artifacts: artifacts, size: .normal)
|
||||
let artifacts = NoteArtifacts(content: content, images: [], invoices: [], links: [])
|
||||
NoteContentView(privkey: "", event: NostrEvent(content: content, pubkey: "pk"), profiles: state.profiles, previews: PreviewCache(), show_images: true, artifacts: artifacts, size: .normal)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extension View {
|
||||
func translate_button_style() -> some View {
|
||||
return self
|
||||
.font(.footnote)
|
||||
.contentShape(Rectangle())
|
||||
.padding([.top, .bottom], 10)
|
||||
}
|
||||
}
|
||||
|
||||
struct NoteArtifacts {
|
||||
let content: AttributedString
|
||||
let images: [URL]
|
||||
let invoices: [Invoice]
|
||||
let links: [URL]
|
||||
|
||||
static func just_content(_ content: String) -> NoteArtifacts {
|
||||
NoteArtifacts(content: AttributedString(stringLiteral: content), images: [], invoices: [], links: [])
|
||||
}
|
||||
}
|
||||
|
||||
func render_note_content(ev: NostrEvent, profiles: Profiles, privkey: String?, show_images: Bool) -> NoteArtifacts {
|
||||
let blocks = ev.blocks(privkey)
|
||||
return render_blocks(blocks: blocks, profiles: profiles, privkey: privkey, show_images: show_images)
|
||||
}
|
||||
|
||||
func render_blocks(blocks: [Block], profiles: Profiles, privkey: String?, show_images: Bool) -> NoteArtifacts {
|
||||
var invoices: [Invoice] = []
|
||||
var img_urls: [URL] = []
|
||||
var link_urls: [URL] = []
|
||||
let txt: AttributedString = blocks.reduce("") { str, block in
|
||||
switch block {
|
||||
case .mention(let m):
|
||||
return str + mention_str(m, profiles: profiles)
|
||||
case .text(let txt):
|
||||
return str + AttributedString(stringLiteral: txt)
|
||||
case .hashtag(let htag):
|
||||
return str + hashtag_str(htag)
|
||||
case .invoice(let invoice):
|
||||
invoices.append(invoice)
|
||||
return str
|
||||
case .url(let url):
|
||||
// Handle Image URLs
|
||||
if show_images && is_image_url(url) {
|
||||
// Append Image
|
||||
img_urls.append(url)
|
||||
return str
|
||||
} else {
|
||||
link_urls.append(url)
|
||||
return str + url_str(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NoteArtifacts(content: txt, images: img_urls, invoices: invoices, links: link_urls)
|
||||
}
|
||||
|
||||
func is_image_url(_ url: URL) -> Bool {
|
||||
let str = url.lastPathComponent.lowercased()
|
||||
return str.hasSuffix("png") || str.hasSuffix("jpg") || str.hasSuffix("jpeg") || str.hasSuffix("gif")
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ struct ParticipantsView: View {
|
||||
ForEach(originalReferences.pRefs) { participant in
|
||||
let pubkey = participant.id
|
||||
HStack {
|
||||
ProfilePicView(pubkey: pubkey, size: PFP_SIZE, highlight: .none, profiles: damus_state.profiles, contacts: damus_state.contacts)
|
||||
ProfilePicView(pubkey: pubkey, size: PFP_SIZE, highlight: .none, profiles: damus_state.profiles)
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
let profile = damus_state.profiles.lookup(id: pubkey)
|
||||
|
||||
@@ -34,7 +34,8 @@ func PostButton(action: @escaping () -> ()) -> some View {
|
||||
.keyboardShortcut("n", modifiers: [.command, .shift])
|
||||
}
|
||||
|
||||
func PostButtonContainer(is_left_handed: Bool, action: @escaping () -> Void) -> some View {
|
||||
func PostButtonContainer(userSettings: UserSettingsStore, action: @escaping () -> Void) -> some View {
|
||||
let is_left_handed = userSettings.left_handed.self
|
||||
return VStack {
|
||||
Spacer()
|
||||
|
||||
|
||||
@@ -16,11 +16,10 @@ let POST_PLACEHOLDER = NSLocalizedString("Type your post here...", comment: "Tex
|
||||
|
||||
struct PostView: View {
|
||||
@State var post: String = ""
|
||||
@FocusState var focus: Bool
|
||||
|
||||
|
||||
let replying_to: NostrEvent?
|
||||
@FocusState var focus: Bool
|
||||
let references: [ReferencedId]
|
||||
let damus_state: DamusState
|
||||
|
||||
@Environment(\.presentationMode) var presentationMode
|
||||
|
||||
@@ -75,7 +74,6 @@ struct PostView: View {
|
||||
TextEditor(text: $post)
|
||||
.focused($focus)
|
||||
.textInputAutocapitalization(.sentences)
|
||||
|
||||
if post.isEmpty {
|
||||
Text(POST_PLACEHOLDER)
|
||||
.padding(.top, 8)
|
||||
@@ -84,14 +82,6 @@ struct PostView: View {
|
||||
.allowsHitTesting(false)
|
||||
}
|
||||
}
|
||||
|
||||
// This if-block observes @ for tagging
|
||||
if let searching = get_searching_string(post) {
|
||||
VStack {
|
||||
Spacer()
|
||||
UserSearch(damus_state: damus_state, search: searching, post: $post)
|
||||
}.zIndex(1)
|
||||
}
|
||||
}
|
||||
.onAppear() {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
||||
@@ -102,23 +92,3 @@ struct PostView: View {
|
||||
}
|
||||
}
|
||||
|
||||
func get_searching_string(_ post: String) -> String? {
|
||||
guard let last_word = post.components(separatedBy: .whitespacesAndNewlines).last else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard last_word.count >= 2 else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard last_word.first! == "@" else {
|
||||
return nil
|
||||
}
|
||||
|
||||
// don't include @npub... strings
|
||||
guard last_word.count != 64 else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return String(last_word.dropFirst())
|
||||
}
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
//
|
||||
// UserAutocompletion.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2023-01-28.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct SearchedUser: Identifiable {
|
||||
let petname: String?
|
||||
let profile: Profile?
|
||||
let pubkey: String
|
||||
|
||||
var id: String {
|
||||
return pubkey
|
||||
}
|
||||
}
|
||||
|
||||
struct UserSearch: View {
|
||||
let damus_state: DamusState
|
||||
let search: String
|
||||
@Binding var post: String
|
||||
|
||||
var users: [SearchedUser] {
|
||||
guard let contacts = damus_state.contacts.event else {
|
||||
return []
|
||||
}
|
||||
|
||||
return search_users(profiles: damus_state.profiles, tags: contacts.tags, search: search)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
LazyVStack {
|
||||
ForEach(users) { user in
|
||||
UserView(damus_state: damus_state, pubkey: user.pubkey)
|
||||
.onTapGesture {
|
||||
guard let pk = bech32_pubkey(user.pubkey) else {
|
||||
return
|
||||
}
|
||||
post = post.replacingOccurrences(of: "@"+search, with: "@"+pk+" ")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct UserSearch_Previews: PreviewProvider {
|
||||
static let search: String = "jb55"
|
||||
@State static var post: String = "some @jb55"
|
||||
|
||||
static var previews: some View {
|
||||
UserSearch(damus_state: test_damus_state(), search: search, post: $post)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func search_users(profiles: Profiles, tags: [[String]], search: String) -> [SearchedUser] {
|
||||
var seen_user = Set<String>()
|
||||
return tags.reduce(into: Array<SearchedUser>()) { arr, tag in
|
||||
guard tag.count >= 2 && tag[0] == "p" else {
|
||||
return
|
||||
}
|
||||
|
||||
let pubkey = tag[1]
|
||||
guard !seen_user.contains(pubkey) else {
|
||||
return
|
||||
}
|
||||
seen_user.insert(pubkey)
|
||||
|
||||
var petname: String? = nil
|
||||
if tag.count >= 4 {
|
||||
petname = tag[3]
|
||||
}
|
||||
|
||||
let profile = profiles.lookup(id: pubkey)
|
||||
|
||||
guard ((petname?.hasPrefix(search) ?? false) || (profile?.name?.hasPrefix(search) ?? false)) else {
|
||||
return
|
||||
}
|
||||
|
||||
let searched_user = SearchedUser(petname: petname, profile: profile, pubkey: pubkey)
|
||||
arr.append(searched_user)
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ struct InnerProfilePicView: View {
|
||||
self.imageModel = KFImageModel(
|
||||
url: url,
|
||||
fallbackUrl: fallbackUrl,
|
||||
maxByteSize: 5_242_880, // 5Mib
|
||||
maxByteSize: 1000000,
|
||||
downsampleSize: CGSize(width: 200, height: 200)
|
||||
)
|
||||
}
|
||||
@@ -98,21 +98,19 @@ struct ProfilePicView: View {
|
||||
let size: CGFloat
|
||||
let highlight: Highlight
|
||||
let profiles: Profiles
|
||||
let contacts: Contacts
|
||||
|
||||
@State var picture: String?
|
||||
|
||||
init (pubkey: String, size: CGFloat, highlight: Highlight, profiles: Profiles, contacts: Contacts, picture: String? = nil) {
|
||||
init (pubkey: String, size: CGFloat, highlight: Highlight, profiles: Profiles, picture: String? = nil) {
|
||||
self.pubkey = pubkey
|
||||
self.profiles = profiles
|
||||
self.contacts = contacts
|
||||
self.size = size
|
||||
self.highlight = highlight
|
||||
self._picture = State(initialValue: picture)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
InnerProfilePicView(url: get_profile_url(picture: picture, pubkey: pubkey, profiles: profiles, contacts: contacts), fallbackUrl: URL(string: robohash(pubkey)), pubkey: pubkey, size: size, highlight: highlight)
|
||||
InnerProfilePicView(url: get_profile_url(picture: picture, pubkey: pubkey, profiles: profiles), fallbackUrl: URL(string: robohash(pubkey)), pubkey: pubkey, size: size, highlight: highlight)
|
||||
.onReceive(handle_notify(.profile_updated)) { notif in
|
||||
let updated = notif.object as! ProfileUpdate
|
||||
|
||||
@@ -127,19 +125,8 @@ struct ProfilePicView: View {
|
||||
}
|
||||
}
|
||||
|
||||
func get_profile_url(picture: String?, pubkey: String, profiles: Profiles, contacts: Contacts) -> URL {
|
||||
var pic: String
|
||||
let remote_image_policy: RemoteImagePolicy = RemoteImagePolicy(rawValue: UserDefaults.standard.string(forKey: "remote_image_policy") ?? "") ?? .friendsOfFriends
|
||||
|
||||
if pubkey == contacts.our_pubkey ||
|
||||
remote_image_policy == .everyone ||
|
||||
remote_image_policy == .friendsOnly && contacts.is_friend(pubkey) ||
|
||||
remote_image_policy == .friendsOfFriends && contacts.is_in_friendosphere(pubkey) {
|
||||
pic = picture ?? profiles.lookup(id: pubkey)?.picture ?? robohash(pubkey)
|
||||
} else {
|
||||
pic = robohash(pubkey)
|
||||
}
|
||||
|
||||
func get_profile_url(picture: String?, pubkey: String, profiles: Profiles) -> URL {
|
||||
let pic = picture ?? profiles.lookup(id: pubkey)?.picture ?? robohash(pubkey)
|
||||
if let url = URL(string: pic) {
|
||||
return url
|
||||
}
|
||||
@@ -163,8 +150,7 @@ struct ProfilePicView_Previews: PreviewProvider {
|
||||
pubkey: pubkey,
|
||||
size: 100,
|
||||
highlight: .none,
|
||||
profiles: make_preview_profiles(pubkey),
|
||||
contacts: Contacts(our_pubkey: pubkey))
|
||||
profiles: make_preview_profiles(pubkey))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ struct ProfilePictureSelector: View {
|
||||
var body: some View {
|
||||
let highlight: Highlight = .custom(Color.white, 2.0)
|
||||
ZStack {
|
||||
ProfilePicView(pubkey: pubkey, size: 80.0, highlight: highlight, profiles: Profiles(), contacts: Contacts(our_pubkey: pubkey))
|
||||
ProfilePicView(pubkey: pubkey, size: 80.0, highlight: highlight, profiles: Profiles())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,8 +91,6 @@ struct EditButton: View {
|
||||
RoundedRectangle(cornerRadius: 24)
|
||||
.stroke(borderColor(), lineWidth: 1)
|
||||
}
|
||||
.minimumScaleFactor(0.5)
|
||||
.lineLimit(1)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +114,7 @@ struct ProfileView: View {
|
||||
@State var showing_select_wallet: Bool = false
|
||||
@State var is_zoomed: Bool = false
|
||||
@State var show_share_sheet: Bool = false
|
||||
@State var action_sheet_presented: Bool = false
|
||||
@StateObject var user_settings = UserSettingsStore()
|
||||
|
||||
@Environment(\.dismiss) var dismiss
|
||||
@Environment(\.colorScheme) var colorScheme
|
||||
@@ -142,14 +140,16 @@ struct ProfileView: View {
|
||||
|
||||
func LNButton(lnurl: String, profile: Profile) -> some View {
|
||||
Button(action: {
|
||||
if damus_state.settings.show_wallet_selector {
|
||||
if user_settings.show_wallet_selector {
|
||||
showing_select_wallet = true
|
||||
} else {
|
||||
open_with_wallet(wallet: damus_state.settings.default_wallet.model, invoice: lnurl)
|
||||
open_with_wallet(wallet: user_settings.default_wallet.model, invoice: lnurl)
|
||||
}
|
||||
}) {
|
||||
Image(systemName: "bolt.circle")
|
||||
.profile_button_style(scheme: colorScheme)
|
||||
.symbolRenderingMode(.palette)
|
||||
.foregroundStyle(colorScheme == .dark ? .white : .black, colorScheme == .dark ? .white : .black)
|
||||
.font(.system(size: 32).weight(.thin))
|
||||
.contextMenu {
|
||||
Button {
|
||||
UIPasteboard.general.string = profile.lnurl ?? ""
|
||||
@@ -161,45 +161,22 @@ struct ProfileView: View {
|
||||
}
|
||||
.cornerRadius(24)
|
||||
.sheet(isPresented: $showing_select_wallet, onDismiss: {showing_select_wallet = false}) {
|
||||
SelectWalletView(showingSelectWallet: $showing_select_wallet, our_pubkey: damus_state.pubkey, invoice: lnurl)
|
||||
SelectWalletView(showingSelectWallet: $showing_select_wallet, invoice: lnurl)
|
||||
.environmentObject(user_settings)
|
||||
}
|
||||
}
|
||||
|
||||
static let markdown = Markdown()
|
||||
|
||||
var ActionSheetButton: some View {
|
||||
Button(action: {
|
||||
action_sheet_presented = true
|
||||
}) {
|
||||
Image(systemName: "ellipsis.circle")
|
||||
.profile_button_style(scheme: colorScheme)
|
||||
}
|
||||
.confirmationDialog(NSLocalizedString("Actions", comment: "Title for confirmation dialog to either share, report, or block a profile."), isPresented: $action_sheet_presented) {
|
||||
Button(NSLocalizedString("Share", comment: "Button to share the link to a profile.")) {
|
||||
show_share_sheet = true
|
||||
}
|
||||
|
||||
// Only allow reporting if logged in with private key and the currently viewed profile is not the logged in profile.
|
||||
if profile.pubkey != damus_state.pubkey && damus_state.is_privkey_user {
|
||||
Button(NSLocalizedString("Report", comment: "Button to report a profile."), role: .destructive) {
|
||||
let target: ReportTarget = .user(profile.pubkey)
|
||||
notify(.report, target)
|
||||
}
|
||||
|
||||
Button(NSLocalizedString("Block", comment: "Button to block a profile."), role: .destructive) {
|
||||
notify(.block, profile.pubkey)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var ShareButton: some View {
|
||||
Button(action: {
|
||||
show_share_sheet = true
|
||||
}) {
|
||||
Image(systemName: "square.and.arrow.up.circle")
|
||||
.profile_button_style(scheme: colorScheme)
|
||||
Image(systemName: "square.and.arrow.up.circle.fill")
|
||||
.symbolRenderingMode(.palette)
|
||||
.font(.system(size: 32))
|
||||
.padding()
|
||||
.foregroundStyle(.white, .black, .black.opacity(0.8))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +186,9 @@ struct ProfileView: View {
|
||||
.environmentObject(dm_model)
|
||||
return NavigationLink(destination: dmview) {
|
||||
Image(systemName: "bubble.left.circle")
|
||||
.profile_button_style(scheme: colorScheme)
|
||||
.symbolRenderingMode(.palette)
|
||||
.font(.system(size: 32).weight(.thin))
|
||||
.foregroundStyle(colorScheme == .dark ? .white : .black, colorScheme == .dark ? .white : .black)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,6 +226,9 @@ struct ProfileView: View {
|
||||
.frame(width: geometry.size.width, height: self.getHeightForHeaderImage(geometry))
|
||||
.clipped()
|
||||
.offset(x: 0, y: self.getOffsetForHeaderImage(geometry))
|
||||
|
||||
ShareButton
|
||||
.offset(x: geometry.size.width - 80.0, y: 50.0 )
|
||||
|
||||
}.frame(height: BANNER_HEIGHT)
|
||||
|
||||
@@ -255,18 +237,17 @@ struct ProfileView: View {
|
||||
let pfp_size: CGFloat = 90.0
|
||||
|
||||
HStack(alignment: .center) {
|
||||
ProfilePicView(pubkey: profile.pubkey, size: pfp_size, highlight: .custom(imageBorderColor(), 4.0), profiles: damus_state.profiles, contacts: damus_state.contacts)
|
||||
ProfilePicView(pubkey: profile.pubkey, size: pfp_size, highlight: .custom(imageBorderColor(), 4.0), profiles: damus_state.profiles)
|
||||
.onTapGesture {
|
||||
is_zoomed.toggle()
|
||||
}
|
||||
.fullScreenCover(isPresented: $is_zoomed) {
|
||||
ProfileZoomView(pubkey: profile.pubkey, profiles: damus_state.profiles, contacts: damus_state.contacts)}
|
||||
ProfileZoomView(pubkey: profile.pubkey, profiles: damus_state.profiles) }
|
||||
.offset(y: -(pfp_size/2.0)) // Increase if set a frame
|
||||
|
||||
Spacer()
|
||||
|
||||
Group {
|
||||
ActionSheetButton
|
||||
|
||||
if let profile = data {
|
||||
if let lnurl = profile.lnurl, lnurl != "" {
|
||||
@@ -297,7 +278,7 @@ struct ProfileView: View {
|
||||
.padding(.top,-(pfp_size/2.0))
|
||||
|
||||
Text(ProfileView.markdown.process(data?.about ?? ""))
|
||||
.font(.subheadline).textSelection(.enabled)
|
||||
.font(.subheadline)
|
||||
|
||||
if let url = data?.website_url {
|
||||
WebsiteLink(url: url)
|
||||
@@ -408,7 +389,7 @@ struct ProfileView_Previews: PreviewProvider {
|
||||
|
||||
func test_damus_state() -> DamusState {
|
||||
let pubkey = "3efdaebb1d8923ebd99c9e7ace3b4194ab45512e2be79c1b7d68d9243e0d2681"
|
||||
let damus = DamusState.empty
|
||||
let damus = DamusState(pool: RelayPool(), keypair: Keypair(pubkey: pubkey, privkey: "privkey"), likes: EventCounter(our_pubkey: pubkey), boosts: EventCounter(our_pubkey: pubkey), contacts: Contacts(our_pubkey: pubkey), tips: TipCounter(our_pubkey: pubkey), profiles: Profiles(), dms: DirectMessagesModel(our_pubkey: pubkey), previews: PreviewCache())
|
||||
|
||||
let prof = Profile(name: "damus", display_name: "damus", about: "iOS app!", picture: "https://damus.io/img/logo.png", banner: "", website: "https://damus.io", lud06: nil, lud16: "jb55@sendsats.lol", nip05: "damus.io")
|
||||
let tsprof = TimestampedProfile(profile: prof, timestamp: 0)
|
||||
@@ -492,11 +473,3 @@ struct KeyView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension View {
|
||||
func profile_button_style(scheme: ColorScheme) -> some View {
|
||||
self.symbolRenderingMode(.palette)
|
||||
.font(.system(size: 32).weight(.thin))
|
||||
.foregroundStyle(scheme == .dark ? .white : .black, scheme == .dark ? .white : .black)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ struct ProfileZoomView: View {
|
||||
@Environment(\.presentationMode) var presentationMode
|
||||
let pubkey: String
|
||||
let profiles: Profiles
|
||||
let contacts: Contacts
|
||||
|
||||
@GestureState private var scaleState: CGFloat = 1
|
||||
@GestureState private var offsetState = CGSize.zero
|
||||
@@ -69,7 +68,7 @@ struct ProfileZoomView: View {
|
||||
|
||||
Spacer()
|
||||
|
||||
ProfilePicView(pubkey: pubkey, size: 200.0, highlight: .none, profiles: profiles, contacts: contacts)
|
||||
ProfilePicView(pubkey: pubkey, size: 200.0, highlight: .none, profiles: profiles)
|
||||
.padding(100)
|
||||
.scaledToFit()
|
||||
.scaleEffect(self.scale * scaleState)
|
||||
@@ -93,8 +92,6 @@ struct ProfileZoomView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ProfileZoomView(
|
||||
pubkey: pubkey,
|
||||
profiles: make_preview_profiles(pubkey),
|
||||
contacts: Contacts(our_pubkey: pubkey)
|
||||
)
|
||||
profiles: make_preview_profiles(pubkey))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
//
|
||||
// QRCodeView.swift
|
||||
// damus
|
||||
//
|
||||
// Created by eric on 1/27/23.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import CoreImage.CIFilterBuiltins
|
||||
|
||||
struct QRCodeView: View {
|
||||
let damus_state: DamusState
|
||||
|
||||
@Environment(\.dismiss) var dismiss
|
||||
@Environment(\.presentationMode) var presentationMode
|
||||
|
||||
var maybe_key: String? {
|
||||
guard let key = bech32_pubkey(damus_state.pubkey) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return key
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ZStack(alignment: .center) {
|
||||
|
||||
ZStack(alignment: .topLeading) {
|
||||
DamusGradient()
|
||||
Button {
|
||||
presentationMode.wrappedValue.dismiss()
|
||||
} label: {
|
||||
Image(systemName: "xmark")
|
||||
.foregroundColor(.white)
|
||||
.font(.subheadline)
|
||||
.padding(.leading, 20)
|
||||
}
|
||||
.zIndex(1)
|
||||
}
|
||||
|
||||
VStack(alignment: .center) {
|
||||
let profile = damus_state.profiles.lookup(id: damus_state.pubkey)
|
||||
|
||||
if (damus_state.profiles.lookup(id: damus_state.pubkey)?.picture) != nil {
|
||||
ProfilePicView(pubkey: damus_state.pubkey, size: 90.0, highlight: .custom(Color("DamusWhite"), 4.0), profiles: damus_state.profiles, contacts: damus_state.contacts)
|
||||
.padding(.top, 50)
|
||||
} else {
|
||||
Image(systemName: "person.fill")
|
||||
.font(.system(size: 60))
|
||||
.foregroundColor(Color("DamusWhite"))
|
||||
.padding(.top, 50)
|
||||
}
|
||||
|
||||
if let display_name = profile?.display_name {
|
||||
Text(display_name)
|
||||
.foregroundColor(Color("DamusWhite"))
|
||||
.font(.system(size: 24, weight: .heavy))
|
||||
}
|
||||
if let name = profile?.name {
|
||||
Text("@" + name)
|
||||
.foregroundColor(Color("DamusWhite"))
|
||||
.font(.body)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
if let key = maybe_key {
|
||||
Image(uiImage: generateQRCode(pubkey: "nostr:" + key))
|
||||
.interpolation(.none)
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 200, height: 200)
|
||||
.padding()
|
||||
.cornerRadius(10)
|
||||
.overlay(RoundedRectangle(cornerRadius: 10)
|
||||
.stroke(Color("DamusWhite"), lineWidth: 1))
|
||||
.shadow(radius: 10)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("Follow me on nostr")
|
||||
.foregroundColor(Color("DamusWhite"))
|
||||
.font(.system(size: 24, weight: .heavy))
|
||||
.padding(.top)
|
||||
|
||||
Text("Scan the code")
|
||||
.foregroundColor(Color("DamusWhite"))
|
||||
.font(.system(size: 18, weight: .ultraLight))
|
||||
|
||||
Spacer()
|
||||
}
|
||||
|
||||
}
|
||||
.modifier(SwipeToDismissModifier(minDistance: nil, onDismiss: {
|
||||
presentationMode.wrappedValue.dismiss()
|
||||
}))
|
||||
}
|
||||
|
||||
func generateQRCode(pubkey: String) -> UIImage {
|
||||
let data = pubkey.data(using: String.Encoding.ascii)
|
||||
let qrFilter = CIFilter(name: "CIQRCodeGenerator")
|
||||
qrFilter?.setValue(data, forKey: "inputMessage")
|
||||
let qrImage = qrFilter?.outputImage
|
||||
|
||||
let colorInvertFilter = CIFilter(name: "CIColorInvert")
|
||||
colorInvertFilter?.setValue(qrImage, forKey: "inputImage")
|
||||
let outputInvertedImage = colorInvertFilter?.outputImage
|
||||
|
||||
let maskToAlphaFilter = CIFilter(name: "CIMaskToAlpha")
|
||||
maskToAlphaFilter?.setValue(outputInvertedImage, forKey: "inputImage")
|
||||
let outputCIImage = maskToAlphaFilter?.outputImage
|
||||
|
||||
let context = CIContext()
|
||||
let cgImage = context.createCGImage(outputCIImage!, from: outputCIImage!.extent)!
|
||||
return UIImage(cgImage: cgImage)
|
||||
}
|
||||
}
|
||||
|
||||
struct QRCodeView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
QRCodeView(damus_state: test_damus_state())
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user