Commit Graph

24 Commits

Author SHA1 Message Date
Diogo Peralta Cordeiro 05f16a3084
[ENTITY][AttachmentThumbnail] Now thumbnails are always only available in three sizes: small, medium, big
Commit jointly produced with eli (Eliseu Amaro)

Breaking change: Entity changed to only store the tinyint referring to the size stored

With this, the logic was simplified and now it's not possible to make an
instance produce unnecessary thumbs. The aspect ratio is preserved and
thus the thumbs will always look nice. New configuration was added to
maintain flexibility.
2021-09-22 15:13:46 +01:00
Hugo Sales f344ed376c
[ATTACHMENTS][Embed][UI] Allow plugins to provide a title for an attachment, if a note has none, implement such a mechanism in Embed and cache the result, since it is potentially costly 2021-09-18 05:12:06 +01:00
Hugo Sales 4e30e5aad9
[TOOLS] Fix all issues found by PHPStan level 2 2021-09-14 13:13:44 +01:00
Diogo Peralta Cordeiro 8123086881
[Embed] Fix normalizeEmbedLibMetadata for thumbnails starting with '/' 2021-09-14 13:13:43 +01:00
Hugo Sales bdde047dfa
[PLUGINS][Embed] Embed references a table that does not exist. It seems to mean `attachment_embed`, rather than `link_to_attachment` 2021-09-14 13:13:40 +01:00
Diogo Peralta Cordeiro 177801c81b
[Embed][StoreRemoteMedia] Re-add {white,black}list check config 2021-09-14 13:13:31 +01:00
Diogo Peralta Cordeiro 1906d4f276
[Embed] Add UI element and fix some bugs 2021-09-14 13:13:27 +01:00
Diogo Peralta Cordeiro 9e4cac0123
[ENTITY] Refactor RemoteURL entities to Link
RemoteURL was being an awfully confusing term.
2021-09-14 13:13:26 +01:00
Diogo Peralta Cordeiro fb28a3656a
[Embed] Retrieve remote thumbnails and other improvements 2021-09-14 13:13:26 +01:00
Diogo Peralta Cordeiro 7a0a6f1f22
[Embed] Fix usage of EmbedLib
Fix other minor bugs
2021-09-14 13:13:26 +01:00
Diogo Peralta Cordeiro 41dcef3c7b
[Media] EncoderPlugins should handle the views that concern them
Ensure the intended filetypes and mimetypes during Vips conversions (part 2)
Sanitize Attachments instead of Validate (part 2)
Various bug fixes
2021-09-14 13:13:04 +01:00
Diogo Peralta Cordeiro 6a999b8237
[Embed] Do not create AttachmenThumbnail 2021-09-14 13:12:57 +01:00
Diogo Peralta Cordeiro 1c9f807595
[Embed] Fix some bugs and change AttachmentEmbed::url to ::media_url 2021-09-14 13:12:56 +01:00
Diogo Peralta Cordeiro a3860e6257
[Embed] Local config 2021-09-14 13:12:56 +01:00
Diogo Peralta Cordeiro 837f644458
[UTIL][Formatting] Add twigRenderFile 2021-09-14 13:12:55 +01:00
Hugo Sales d11615ded6
[Avatar][Embed] Change use of TemporaryFile::getPath to getRealPath 2021-09-14 13:12:55 +01:00
Hugo Sales ced610d942
[Embed] Use Formatting utilities rather than substr and such 2021-09-14 13:12:53 +01:00
Hugo Sales b1e514832b
[Embed][ENTITY] Fix embed route and use attachment_view rather than _show. Rename Entity::have to Entity::has, because grammar 2021-09-14 13:12:52 +01:00
Hugo Sales 30107de079
[Embed] Fix plugin. Only attempt to show an image, if we have one 2021-09-14 13:12:52 +01:00
Hugo Sales 4cd152f640
[Embed] Review and port v2 code 2021-09-14 13:12:51 +01:00
Hugo Sales 3d8c348cb8
[Emebed] Add Embed plugin and initial cleanup 2021-09-14 13:12:24 +01:00
Hugo Sales aeabf64051
[PLUGIN] Change base class from Module to Plugin for all plugins 2021-09-14 13:12:23 +01:00
Diogo Peralta Cordeiro ccf3aa990a
[MODULES] Introduce the concept of abstract modules to V3
Introduce placeholder for abstract upload and thumb modules
Temporarily supress some bugs
2021-09-14 13:11:45 +01:00
Hugo Sales 3b901745d5
[Embed][StoreRemoteMedia][Media] Copy and cleanup plugins from v2 2021-09-14 13:10:54 +01:00