Commit Graph

747 Commits

Author SHA1 Message Date
Fernando López Guevara
0f00dcf7a7 fix(columns): render wide notes on narrow screen 2025-07-24 15:57:42 -03:00
William Casarin
f9f8b3fe1b Merge remote-tracking branch 'github/pr/1023' 2025-07-23 12:31:51 -07:00
William Casarin
5ddd8660a3 settings: fix route to relay
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-23 12:29:09 -07:00
William Casarin
fe30704496 Merge remote-tracking branch 'fernando/feat/settings-view' 2025-07-23 12:00:29 -07:00
William Casarin
e997f1bf68 ui/note: make buttons larger
Changelog-Changed: Make buttons larger
Fixes: https://github.com/damus-io/notedeck/issues/879
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-23 11:49:06 -07:00
William Casarin
ff0428550b fix missing zap button
Changelog-Fixed: Fix missing zap button
Fixes: 397bfce817 ("add `Accounts` to `NoteContext`")
Fixes: https://github.com/damus-io/notedeck/issues/1021
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-23 11:49:03 -07:00
Fernando López Guevara
da6ede5f69 feat(settings): add settings view 2025-07-23 15:33:17 -03:00
William Casarin
56cbf68ea5 ui/note: small refactor to use returns instead of break
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-23 09:39:05 -07:00
William Casarin
ebf31abafa wallet: remove unused flag in note context
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-23 09:36:38 -07:00
William Casarin
f722a58d66 Merge new Accounts button to chrome sidebar by kernel #994
kernelkind (3):
      use saturating sub
      add new Accounts button to chrome sidebar
      add ChromePanelAction::Profile & use for pfp
2025-07-23 09:13:49 -07:00
William Casarin
ffcd38ef96 Merge prevent crash when switching cols from fernando #997
Fernando López Guevara (1):
      fix(columns): prevent crash when switching to account with no columns
2025-07-23 09:10:21 -07:00
William Casarin
088704a768 Merge media swipe nav from fernando #1010
Fernando López Guevara (1):
      feat(full-screen-media): add swipe navigation
2025-07-23 09:09:04 -07:00
William Casarin
10eedc0ca6 Merge contact list fixes by kernel #998
kernelkind (2):
      appease clippy
      fix: sometimes most recent contacts list wasn't used
2025-07-23 08:54:12 -07:00
Terry Yiu
b285be97a1 Add Thai translations
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-07-23 00:15:01 -04:00
Terry Yiu
7321e82800 Add Spanish (Latin America and Spain) translations
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-07-22 21:24:07 -04:00
William Casarin
3e2a1fa0d7 i18n: disable broken tests for now
sorry

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-22 13:44:35 -07:00
William Casarin
26143cad54 i18n: disable bidi for tests
> This is important for cases such as when a right-to-left user name is
presented in the left-to-right message.

> In some cases, such as testing, the user may want to disable the
isolating.

See: https://docs.rs/fluent/latest/fluent/bundle/struct.FluentBundle.html#method.set_use_isolating
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-22 13:25:31 -07:00
Terry Yiu
549fdc5da8 Add French, German, Simplified Chinese, and Traditional Chinese translations
Changelog-Added: Added French, German, Simplified Chinese, and Traditional Chinese translations
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-07-22 16:19:22 -04:00
William Casarin
c27aff6bec debug: add startup query debug log
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-22 13:02:29 -07:00
William Casarin
ec87482009 args: add --locale option
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-22 13:02:29 -07:00
William Casarin
a077cae0ee i18n: always have en-XA available
this is statically compiled anyways.

we might want to only have this as a feature
flag in the future to reduce binary size

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-22 13:02:29 -07:00
William Casarin
3d4db820b4 i18n: make localization context non-global
- Simplify Localization{Context,Manager} to just Localization
- Fixed a bunch of lifetime issueo
- Removed all Arcs and Locks
- Removed globals
  * widgets now need access to &mut Localization for i18n

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-22 09:49:32 -07:00
Terry Yiu
d1e222f732 Add localization documentation to notedeck DEVELOPER.md
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-07-21 12:45:30 -07:00
Terry Yiu
0e65491ef1 Clean up time_ago_since, add tests, and internationalize strings
Changelog-Changed: Internationalized time ago strings
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-07-21 12:45:30 -07:00
Terry Yiu
3f5036bd32 Internationalize user-facing strings and export them for translations
Changelog-Added: Internationalized user-facing strings and exported them for translations
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-07-21 12:45:29 -07:00
Terry Yiu
d07c3e9135 Add Fluent-based localization manager and add script to export source strings for translations
Changelog-Added: Added Fluent-based localization manager and added script to export source strings for translations
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2025-07-21 12:40:06 -07:00
William Casarin
38b2077a8d Merge kernel's "can't remove damoose fixes" and more! #1001
kernelkind (9):
      appease clippy
      use `NwcError` instead of nwc::Error
      make `UserAccount` cloneable
      allow removal of Damoose account
      expose `AccountCache::falback`
      move select account logic to own method
      bugfix: properly sub to new selected acc after removal of selected
      bugfix: unsubscribe from timelines on deck deletion
      bugfix: unsubscribe all decks when log out account
2025-07-20 17:17:29 -07:00
William Casarin
c94a418474 media/trust: always show if its yourself
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-20 16:54:34 -07:00
William Casarin
28065ec4a3 fix one missing home string
Fixes: f39d554c96 ("rename Contacts to Home")
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-20 16:54:31 -07:00
William Casarin
94be9ccc3e Revert "relay: make multicast a desired relay"
there seems to be a bug where the relay list fails to get
created if multicast fails to connect

This reverts commit 5eae9a55ec.
2025-07-20 15:59:47 -07:00
Fernando López Guevara
ed38c75193 feat(full-screen-media): add swipe navigation 2025-07-18 13:46:25 -03:00
kernelkind
0b27282985 bugfix: unsubscribe all decks when log out account
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 21:39:58 -04:00
kernelkind
1c547bbcaa bugfix: unsubscribe from timelines on deck deletion
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 21:25:09 -04:00
kernelkind
d4082eb818 bugfix: properly sub to new selected acc after removal of selected
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 20:31:36 -04:00
kernelkind
0b8a4fdf55 move select account logic to own method
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 20:22:48 -04:00
kernelkind
8263e56f41 expose AccountCache::falback
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 19:33:56 -04:00
kernelkind
8daa1d2adf allow removal of Damoose account
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 19:24:33 -04:00
kernelkind
b9cae65b72 make UserAccount cloneable
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 19:24:01 -04:00
kernelkind
049bb3e8bb use NwcError instead of nwc::Error
need to clone

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 19:01:51 -04:00
kernelkind
d22dd9ed31 appease clippy
```
error: large size difference between variants
   --> crates/notedeck_columns/src/column.rs:249:1
    |
249 | / pub enum IntermediaryRoute {
250 | |     Timeline(Timeline),
    | |     ------------------ the largest variant contains at least 280 bytes
251 | |     Route(Route),
    | |     ------------ the second-largest variant contains at least 72 bytes
252 | | }
    | |_^ the entire enum is at least 280 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = note: `-D clippy::large-enum-variant` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
    |
250 -     Timeline(Timeline),
250 +     Timeline(Box<Timeline>),
    |

error: could not compile `notedeck_columns` (lib) due to 1 previous error
```

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 19:01:46 -04:00
kernelkind
fdef74c353 fix: sometimes most recent contacts list wasn't used
`ndb::poll_for_notes` appears to give notes as they arrive. We
need to make sure we only use the most recent for contacts

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 18:17:56 -04:00
kernelkind
030e4226f8 appease clippy
```
error: large size difference between variants
   --> crates/notedeck_columns/src/column.rs:249:1
    |
249 | / pub enum IntermediaryRoute {
250 | |     Timeline(Timeline),
    | |     ------------------ the largest variant contains at least 280 bytes
251 | |     Route(Route),
    | |     ------------ the second-largest variant contains at least 72 bytes
252 | | }
    | |_^ the entire enum is at least 280 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = note: `-D clippy::large-enum-variant` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
    |
250 -     Timeline(Timeline),
250 +     Timeline(Box<Timeline>),
    |

error: could not compile `notedeck_columns` (lib) due to 1 previous error
```

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 18:17:53 -04:00
Fernando López Guevara
508d8dc0ba fix(columns): prevent crash when switching to account with no columns 2025-07-17 19:09:10 -03:00
William Casarin
c306ab2912 chrome/readme: mention signer
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 14:52:26 -07:00
William Casarin
c421f8f8ff profile: fetch new metadata when visiting profiles
This ensures we always have the latest data

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 14:49:16 -07:00
William Casarin
8d2da86f1f enostr: remove raw event type
we rely on the event type for multicast logic,
so remove raw since its not really needed anymore

Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 14:20:33 -07:00
William Casarin
8a1398face clippy fixes
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 13:54:43 -07:00
William Casarin
a4c1b38116 introduce HybridFilter
This introduces a new filter construct called HybridFilter. This allows
filters to have different remote filter than local ones. For example,
adding kind0 to the remote for keeping profiles up to date on your
timeline, but only subscribing to kind1 locally.

Only home/contact filters use this feature for now.

Fixes: https://github.com/damus-io/notedeck/issues/995
Signed-off-by: William Casarin <jb55@jb55.com>
2025-07-17 13:54:43 -07:00
kernelkind
34afa755b8 add ChromePanelAction::Profile & use for pfp
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 15:23:41 -04:00
kernelkind
45490c918d add new Accounts button to chrome sidebar
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-07-17 15:23:32 -04:00