Commit graph

22 commits

Author SHA1 Message Date
Thomas Ricouard 5c81c9e691 More wip 2023-09-12 15:55:11 +02:00
Chanhwi Joo 5fb9ab1c5e
Fix quote button not showing for unlisted posts (#1537) 2023-08-10 08:58:43 +02:00
Thomas Ricouard a2fe0511e0 Run swiftformat 2023-07-19 07:46:25 +02:00
Nathan Reed 194e3aea74
Add feature to block or mute user directly from post (#1460)
* Make status context menu button frame tap target larger

This makes it much easier to hit on the first try, and doesn't appear to negatively impact the layout.

* Add feature to block or mute user directly from post

To avoid calling the /accounts/relationships endpoint for every single status displayed, the data is only loaded when the menu is activated.
When the API call comes back, the items are added to the menu (updating the view model appears to cause the menu to update, even while it is displayed)
Borrowed blocking & muting logic/menu items from AccountDetailContextMenu.
2023-07-03 07:40:49 +02:00
Thomas Ricouard df55028836 SwiftFormat . 2023-03-19 16:28:06 +01:00
Paul Schuetz d00b66034d
Show the translate-with-DeepL button if necessary (#1248)
Previously, the button was shown if the always use DeepL setting was active.
This is redundant. Instead, the button is now shown, if the setting isn't
active.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
2023-03-16 07:09:34 +01:00
Paul Schuetz baf853f46e
Add the ability to translate using deepl even if the instance offers its own service (#1237)
* Allow forced translation with DeepL

Translation with DeepL can now be forced either per post or on the system level.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Require the use of a private API key

A private API key of the user is now required to allow "always translate via
DeepL".

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Persist a stored API key

An API key is stored even if useOnlyDeepL is disabled. If the API key is empty,
the setting is still disabled.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Localize the texts

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Save API key while writing

The API key is now saved, even if the app is closed before leaving the
translation settings view.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Fix build

* Fix theme

* Transition to KeychainSwift, clean up

KeychainHelper is replaced with the already-used KeychainSwift package, the
functions are cleaned up so that the process is easier to understand. The
deactivateToggleIfNoKey function doesn't change the behavior of the buttons or
context menus in the timeline, only demonstrates the necessity of an API key to
the user. Consequently, it's only called when the settings view is shown.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Swiftformat + fixes

---------

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-03-14 18:50:19 +01:00
Thomas Ricouard 6c307aba63 SwiftFormat 2023-03-13 13:38:28 +01:00
Thomas Ricouard d2c58482f0 StatusDataController: Handle remote status 2023-03-01 07:28:46 +01:00
Gareth Simpson 9ebe0b314c
Change arrows icon to rocket for boosts (#1099)
* Change arrows icon to rocket for boosts

* Fixing case (part 1)

* Fixing Case (part 2)

* Clean up after merge

* Fix for disabled boost

* Fixes

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-02-28 14:53:31 +01:00
Thomas Ricouard f93e4063f2 Consistent favorites / boosts / bookmark state / count for statuses + refactor close #889 2023-02-28 06:58:52 +01:00
Thomas Ricouard 29aaa7c5cb Optimisations: Autoclosure for StatusRowViewModel 2023-02-24 13:25:21 +01:00
Thomas Ricouard a4910037b8 Swiftformat . 2023-02-22 19:09:39 +01:00
Paul Schuetz 4af78478ba
Don't show the source-language before translating (#1008)
* Clear up the translate-button

The Translate button on the post and in the context menu now does not show the
source language to avoid user confusion if the language set by the poster is
not the actual language of the post. This language is now only used to decide
whether to display the button in the main view. The Translate button in the
context menu is independent.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Show the translation-source-language

The source-language of a translation is now shown.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Remove unused strings

The now unused translate-from-strings are removed.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

---------

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-02-22 19:03:05 +01:00
Thomas Ricouard 4b40678931 Add a new context menu action to copy link 2023-02-22 18:49:32 +01:00
Thomas Ricouard b259b6739e Swiftformat 2023-02-21 07:23:42 +01:00
Chanhwi Joo f04c15b8fe
Fix status actions on boosting posts (#974)
* Fix context menus for boosts

* Allow my boost of my followers-only post

* Disable boost context menu on posts can't be boosted and show different string for boosting my own private post

* Localizations

* CR

---------

Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-02-21 06:59:47 +01:00
Thomas Ricouard e48260f309 More tweak to capture mode 2023-02-19 16:03:27 +01:00
Thomas Ricouard ccc504fc6f Share post as image close #885 2023-02-19 15:29:07 +01:00
Thomas Ricouard 9281e72e8c Fix status context menu mention for boost 2023-02-18 08:02:50 +01:00
Thomas Ricouard ca4e80101f Swiftformat 2023-02-18 07:26:48 +01:00
Thomas Ricouard a3744525df StatusRow: Split into proper view struct 2023-02-17 13:30:56 +01:00
Renamed from Packages/Status/Sources/Status/Row/StatusRowContextMenu.swift (Browse further)