Commit graph

5753 commits

Author SHA1 Message Date
lymkwi
50cdcc0376
Implement attachment captioning
Starting with Client-Server API v1.10 [0], the `body` field in messages of type `m.image`,
`m.audio`, `m.video` and `m.file` can be used as the caption of the attachment. This is fact the way
that Nheko rends captions on images, for example.

This commit introduces a field in the `UploadHandle`s awaiting upload on the timeline's `InputBar`
which holds a caption taken from the input text area. The decision is as follows:
 - If text bar is empty or full of blanks, send all media with no caption
 - If the text is an incomplete command, fail
 - If there are no pending uploads, proceed as done previously (if there is no command recognized
   send the text, or try and execute the command and if it fails send the text)
 - If there are pending uploads, only accept uploads if nothing resembling a command name is in the
   text area. That text becomes the caption for all pending media. Otherwise, try and execute the
   command, and, if it fails, send it as text.

While this workflow for captioning so far is a bit jank, it is the least effort implementation.

Links:
[0]: https://spec.matrix.org/v1.10/client-server-api/#mimage

Signed-off-by: lymkwi <lymkwi@vulpinecitrus.info>
2024-05-01 13:02:47 +02:00
DeepBlueV7.X
f465a5b52f
Merge pull request #1717 from Integral-Tech/optimize-qstring
refactor: replace QString constructors with QStringLiteral
2024-04-28 16:44:42 +00:00
Integral
c890aebf72
refactor: replace QString constructors with QStringLiteral 2024-04-26 13:34:51 -07:00
DeepBlueV7.X
9f2f1c62de
Merge pull request #1708 from NepNep21/windows-image-copying
Fix image copying on windows
2024-04-24 22:58:52 +00:00
NepNep21
4810c2a2bc
Lint 2024-04-23 19:58:14 -03:00
DeepBlueV7.X
a0fcb9458e
Merge pull request #1715 from br4yd/fix-settings-cutoff
Fix room settings and emoji verification being cut off
2024-04-23 22:53:49 +00:00
Brayd
4522507cc8
Fix emoji verification dialogue being cut off 2024-04-19 22:54:05 +02:00
Brayd
70eabc3276
Fix room settings being cut off 2024-04-19 22:31:37 +02:00
NepNep21
3f05df19a1
Fix image copying on windows 2024-04-09 12:47:02 -03:00
Joseph Donofry
df88eccfb7
Workaround re2 cmake issue on AS runner 2024-04-07 13:38:32 -04:00
Nicolas Werner
d871b07fca
Use more cores on windows builds 2024-04-07 18:46:40 +02:00
Nicolas Werner
df46f531b7
Try to fix missing resources.pri 2024-04-06 03:43:49 +02:00
Nicolas Werner
5b989194c6
Fix makepri parameters 2024-04-06 00:45:23 +02:00
Nicolas Werner
8ca908058e
Use makepri and makeappx from path 2024-04-05 23:53:32 +02:00
Nicolas Werner
b077596704
Fix lint 2024-04-05 22:47:09 +02:00
Nicolas Werner
1765fdcb41
Another stab at using unplated icons on windows
This time also generate the pri files, whatever they are.
2024-04-05 22:42:39 +02:00
Nicolas Werner
a415b39bf9
Color conversion seems to be redundant before the sink (upload too, but removing that breaks stuff) 2024-04-05 04:15:29 +02:00
Nicolas Werner
f1722d5f64
Add some voip debugging hoops 2024-04-05 03:57:28 +02:00
Nicolas Werner
a5f99b50eb
Hopefully fix the jump when replying after scrolling 2024-04-05 02:52:45 +02:00
Nicolas Werner
779d5e9fae
Try harder to make transparency for windows icon work 2024-03-25 00:38:45 +01:00
Nicolas Werner
6934c131d9
Hopefully fix Windows icon background color
See https://learn.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-manual-conversion#optional-add-target-based-unplated-assets
2024-03-23 01:07:17 +01:00
Nicolas Werner
9656304e24
Remove attributes on del tags
There is no use case for those afaik and they do break our replacement
in the frontend. Let's instead strip them out in the sanitization step,
since there are no valid attributes defined for the del tag currenlty.

In theory we could also strip out all attributes here, but that seems
excessive for now.

Fixes https://github.com/Nheko-Reborn/nheko/issues/1693
2024-03-20 21:53:20 +01:00
Nicolas Werner
30ac76e942
Fix presence not being per profile
fixes #1699
2024-03-19 01:55:53 +01:00
DeepBlueV7.X
6d44c8e30d
Merge pull request #1695 from q234rty/patch-2
Remove reference to unmaintained AUR helper
2024-03-16 10:51:32 +00:00
Nicolas Werner
aef9617d1e
Make a few headers forward declarations 2024-03-16 11:50:39 +01:00
Nicolas Werner
06927cd3c2
Include moc files for a tiny speedup on incremental builds 2024-03-16 01:34:23 +01:00
Nicolas Werner
d2009428b6
workaround broken platform dialogs on macos
See https://bugreports.qt.io/browse/QTBUG-102078
2024-03-14 01:01:12 +01:00
q234rty
bd0133e139
Remove reference to unmaintained AUR helper
https://github.com/rmarquis/pacaur is long unmaintained.
2024-03-11 21:42:26 +08:00
DeepBlueV7.X
82631619b9
Merge pull request #1692 from jjdredd/patch-1
Update README.md to reflect the keyring use flag for qtkeychain
2024-03-11 00:03:53 +00:00
Nicolas Werner
f25a1b5c36
Work around the duplicate right click menus on KDE 2024-03-10 22:21:40 +01:00
jjdredd
edf4a8dd92
Update README.md to reflect the keyring use flag for qtkeychain on Gentoo 2024-03-09 16:28:25 -07:00
Nicolas Werner
eaf9ae315c
Update translations 2024-03-08 19:23:29 +01:00
Weblate
78bfa845dd Translated using Weblate (Portuguese (Portugal))
Currently translated at 51.0% (534 of 1047 strings)

Co-authored-by: Tmpod <tom@tmpod.dev>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/pt_PT/
Translation: Nheko/nheko
2024-03-08 18:14:13 +00:00
Weblate
128bed9431 Translated using Weblate (Polish)
Currently translated at 85.2% (893 of 1047 strings)

Translated using Weblate (Polish)

Currently translated at 85.2% (893 of 1047 strings)

Co-authored-by: Przemysław Romanik <github@rom4nik.pl>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/pl/
Translation: Nheko/nheko
2024-03-08 18:14:13 +00:00
Weblate
e19660aca8 Translated using Weblate (Dutch)
Currently translated at 100.0% (1047 of 1047 strings)

Translated using Weblate (Dutch)

Currently translated at 100.0% (1047 of 1047 strings)

Translated using Weblate (Dutch)

Currently translated at 93.2% (976 of 1047 strings)

Co-authored-by: Jaron Viëtor <jaron@v8or.nl>
Co-authored-by: Ruben De Smet <ruben.de.smet@rubdos.be>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/nl/
Translation: Nheko/nheko
2024-03-08 18:14:13 +00:00
Weblate
b93d5315b8 Translated using Weblate (Turkish)
Currently translated at 19.6% (206 of 1047 strings)

Co-authored-by: Tennouji Misaki <TennoujiMisaki@users.noreply.weblate.nheko.im>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/tr/
Translation: Nheko/nheko
2024-03-08 18:14:13 +00:00
Weblate
6e330df5d6 Added translation using Weblate (Chinese (Traditional))
Co-authored-by: AdrianL40 <adrianleeho@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
2024-03-08 18:14:13 +00:00
Weblate
e6c8f2eb2b Translated using Weblate (Russian)
Currently translated at 26.0% (273 of 1047 strings)

Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: pizdjuk <benja_krieg@lenta.ru>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/ru/
Translation: Nheko/nheko
2024-03-08 18:14:13 +00:00
Weblate
6d9f554b56 Translated using Weblate (English)
Currently translated at 100.0% (1047 of 1047 strings)

Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/en/
Translation: Nheko/nheko
2024-03-08 18:14:13 +00:00
Weblate
d8f1a1e609 Translated using Weblate (Indonesian)
Currently translated at 100.0% (1047 of 1047 strings)

Co-authored-by: Linerly <linerly@proton.me>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/id/
Translation: Nheko/nheko
2024-03-08 18:14:13 +00:00
Weblate
bbca86ef33 Translated using Weblate (Esperanto)
Currently translated at 100.0% (1047 of 1047 strings)

Translated using Weblate (Esperanto)

Currently translated at 99.5% (1042 of 1047 strings)

Translated using Weblate (Esperanto)

Currently translated at 99.5% (1042 of 1047 strings)

Translated using Weblate (Esperanto)

Currently translated at 98.2% (1029 of 1047 strings)

Translated using Weblate (Esperanto)

Currently translated at 96.7% (1013 of 1047 strings)

Translated using Weblate (Esperanto)

Currently translated at 93.6% (980 of 1047 strings)

Translated using Weblate (Esperanto)

Currently translated at 87.1% (912 of 1047 strings)

Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>
Co-authored-by: Tirifto <tirifto@posteo.cz>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/eo/
Translation: Nheko/nheko
2024-03-08 18:14:13 +00:00
Weblate
5632f16711 Translated using Weblate (Estonian)
Currently translated at 100.0% (1047 of 1047 strings)

Co-authored-by: Priit Jõerüüt <nhkwlate@joeruut.com>
Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/et/
Translation: Nheko/nheko
2024-03-08 18:14:13 +00:00
Nicolas Werner
9c2d50bb86
Bump supported matrix versions to 1.9 2024-03-08 18:57:50 +01:00
Nicolas Werner
7c2a152cfb
Add support for intentional mentions
This is still a bit flaky around when to remove a mention, but it should
work in most cases. Might add a toggle in the future to disable these
though.
2024-03-08 18:45:18 +01:00
Nicolas Werner
7ec56d8df5
Fix buttons vanishing on the kde themes in the settings page 2024-03-06 21:04:32 +01:00
Nicolas Werner
c07791b0c7
Fix redaction label color 2024-03-06 20:57:11 +01:00
Nicolas Werner
8f700e1210
Remove debug label 2024-03-06 20:54:28 +01:00
Nicolas Werner
05e36dd007
Make image in overlay fit into viewer again 2024-03-06 20:52:58 +01:00
Nicolas Werner
b3c78ea81a
Fix animated images rendering offscreen for the first frame 2024-03-05 21:56:10 +01:00
Nicolas Werner
c9bcf3a7c0
Prevent big images from becoming square in overlay 2024-03-05 21:28:48 +01:00