Commit Graph

432 Commits

Author SHA1 Message Date
kernelkind
4f4a0feb8c rename ImageCache -> MediaCache
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
bf68eb3ea8 add SupportedMimeType
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
5791b0c5b1 use mime_guess
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
4cd80c10b1 introduce UrlMimes
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
fa9e318e41 update ehttp to 0.5.0
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
kernelkind
9466c10875 use bincode
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-25 16:49:00 -05:00
Dimitris Apostolou
cc5941e919 avoid duplicate crates 2025-02-24 22:06:37 +02:00
William Casarin
660b7cc8b7 feat: add --no-media flag to disable media display
- Introduced a new "no_media" boolean in ColumnsArgs to capture the
  --no-media flag.

- Updated NoteOptions to include a setting for hiding media, configured
  from parsed arguments.

- Refactored Damus to consolidate note options (textmode, scramble, and
  no-media) into a single NoteOptions field.

- Modified navigation UI rendering to pass the unified note_options.

This change allows users to disable media display via the --no-media flag.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-22 14:39:33 -08:00
William Casarin
bd352f76d4 feat: add scramble flag for development text scrambling
This commit introduces a new scramble option to help reduce distractions
during development by scrambling text using rot13. When enabled via the
new `--scramble` flag, text displayed in various views is transformed,
making it easier to focus on layout and behavior without reading the
actual content.

App & Args Updates

  - Added a `scramble: bool` field to the main application state (in `app.rs`).

  - Extended argument parsing (in `args.rs`) to recognize the `--scramble` flag.

NoteOptions Enhancement

  - Introduced a new bit flag `scramble_text` in `NoteOptions` with
    corresponding setter/getter methods.

UI Adjustments

  - Propagated the scramble flag through note rendering functions across
    navigation, timeline, and note view modules.

  - Updated several UI components (e.g., in `nav.rs`, `route.rs`, and
    `contents.rs`) to accept and apply the new note options.

Rot13 Implementation

  - Implemented a helper function (`rot13`) to scramble text
    conditionally when the scramble option is enabled.

This feature is intended for development builds only, offering a way to
obscure text content during UI tweaks and testing.

Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-22 14:30:38 -08:00
William Casarin
32c7f83bd7 Merge hide nsec in account panel
jglad (2):
      fix compilation
      hide nsec in account panel
2025-02-21 12:13:35 -08:00
Ken Sedgwick
dfa4b24b7d check message length before prefix comparisons 2025-02-20 16:04:29 -08:00
Ken Sedgwick
22f9c32121 fix EOSE parsing to handle extra whitespace 2025-02-20 12:57:31 -08:00
Ken Sedgwick
fe7f0a3976 fix OK message parser to include last message component 2025-02-20 12:57:31 -08:00
Ken Sedgwick
80f4360005 fix event error return when decoding fails 2025-02-20 12:57:30 -08:00
Ken Sedgwick
84e0546e69 improve relay message parsing unit tests 2025-02-20 12:57:26 -08:00
Ken Sedgwick
d39b2706e0 add diagnostic string to DecodeFailed 2025-02-20 11:54:04 -08:00
jglad
030e76c046 hide nsec in account panel 2025-02-13 19:46:59 +01:00
jglad
346e705f36 fix compilation 2025-02-12 21:54:26 +01:00
William Casarin
d82d7fd00d Merge relay debug view fixes & more strict args #711
Ken Sedgwick (5):
      drive-by compiler warning fixes
      drive-by clippy fixes
      add derive Debug to some things
      panic on unknown CLI arguments
      move RelayDebugView to notedeck crate and restore --relay-debug

William Casarin (4):
      clippy: fix lint
      args: skip creation of vec
      nix: fix android build

Link: https://github.com/damus-io/notedeck/pull/711
2025-02-10 17:03:23 -08:00
William Casarin
6fb720e0c5 args: skip creation of vec
Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-10 16:57:50 -08:00
William Casarin
44181e24db clippy: fix lint
Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-10 16:57:18 -08:00
William Casarin
7f0d0106d9 Merge remote-tracking branch 'github/pr/724' 2025-02-10 16:52:56 -08:00
William Casarin
c4b56a48af Merge ctrl-enter to post
Ethan Tuttle (1):
      feat: ctrl+enter when creating a new note, sends the note, the same way clicking the "Post Now" button.
2025-02-10 16:46:24 -08:00
William Casarin
d0be18c80e clippy: fix enum too large issue
Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-10 16:33:58 -08:00
William Casarin
194fa68641 profilesearch: add some padding
Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-10 16:08:19 -08:00
Ethan Tuttle
8aaaa336e2 feat: ctrl+enter when creating a new note, sends the note, the same way clicking the "Post Now" button.
This button combination is common enough in "power user" apps for multiline input that I think this is a good default and could likely be configurable in the future.
2025-02-08 21:48:00 -05:00
jglad
4aefe1f1fe refactor 2025-02-08 10:59:15 +01:00
jglad
8588600a2c fix: handle missing file [#715] 2025-02-08 10:52:37 +01:00
kernelkind
0e21611645 cache LayoutJob
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-07 15:58:57 -05:00
kernelkind
bc8ed2c642 color mentions in PostView
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-07 15:58:57 -05:00
kernelkind
a3e975d133 implement TextBuffer -> PostBuffer downcasting
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-07 15:58:57 -05:00
kernelkind
b9501ad572 add mention tags to post note
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-07 15:58:57 -05:00
kernelkind
c0662798a2 add PostView mentions UI
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-07 15:58:57 -05:00
kernelkind
e7ada80876 mentions logic
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-07 15:58:57 -05:00
kernelkind
48933c2488 use dev dep pretty assertions
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-07 15:58:57 -05:00
kernelkind
c375146658 add SearchResultsView impl
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-07 15:58:57 -05:00
kernelkind
c1c4c1cc7a supply inner_rect for PostView
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-07 15:58:57 -05:00
William Casarin
8c49e6e5f6 Merge explicitly activate and deactivate account relay/muted list #678
Ken Sedgwick (4):
      drive-by compiler warning fixes
      improve debug logging, comments, and variable names for clarity
      explicitly activate and deactivate account relay list subs
      explicitly activate and deactivate account muted list subs
2025-02-07 11:07:17 -08:00
William Casarin
0d22debb05 Merge multiple image uploading
kernelkind (1):
      allow multiple media uploads per selection
2025-02-06 16:51:01 -08:00
William Casarin
36dc28451a Merge fix file logging #718
kernelkind (1):
      fix file logging
2025-02-06 14:00:55 -08:00
kernelkind
0aa70239fe remove # char if user inserted it
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-06 16:50:25 -05:00
kernelkind
d916021179 fix file logging
closes: https://github.com/damus-io/notedeck/issues/572

Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-06 16:38:54 -05:00
kernelkind
7efb31c145 allow multiple media uploads per selection
Signed-off-by: kernelkind <kernelkind@gmail.com>
2025-02-06 15:55:53 -05:00
Ken Sedgwick
091c638eb1 move RelayDebugView to notedeck crate and restore --relay-debug 2025-02-06 12:25:37 -08:00
Ken Sedgwick
480f98eda4 panic on unknown CLI arguments
Currently silently ignores which is not helpful ...
2025-02-06 12:25:31 -08:00
William Casarin
c32a42f9b9 clippy: fix naming lint
Signed-off-by: William Casarin <jb55@jb55.com>
2025-02-06 12:17:48 -08:00
Ken Sedgwick
201cfb2db1 add derive Debug to some things 2025-02-06 10:32:50 -08:00
Ken Sedgwick
2ddc53faa5 drive-by clippy fixes 2025-02-06 10:32:49 -08:00
Ken Sedgwick
345324a2f6 drive-by compiler warning fixes 2025-02-06 10:32:49 -08:00
Ken Sedgwick
482313f883 add relay hints to Mention::{Profile,Event} and UnknownIds 2025-02-06 10:08:01 -08:00