* Reintroducing thumbnails
* Aligned with linting rules
* making recomended code review change
- changed method names to start with lower case as they are not used outside of their package
- made receiver types for struct funcs to be pointers to not need to create copies
Trying to cover all linting issues
- converted slog warning to use attributes when logging warnings
- seperated imports to have package files in their own section
* Update go.mod
---------
Co-authored-by: boojack <24653555+boojack@users.noreply.github.com>
* fix: code blocks of unknown languages cause HTML injection
A code block of unknown language (that is, a language not treated as special by Memos and not handled by highlight.js) should fall back on rendering its plaintext content. However, the content is never properly escaped before it is appended to the DOM, and thus any string that happens to contain HTML is unsafely rendered. This commit fixes the issue by ensuring that, when none of the previous cases handle the text, any HTML entities are escaped first.
* Update CodeBlock.tsx to conform to eslint
* Added hook for generating different date times
* Fixed up logic to destructure the datetime params
---------
Co-authored-by: Martin MacDonald <martinmacdonald@Martins-MacBook-Pro.local>
* Centralised the logic for filters to apply to tagging and updated components to pass in those params needed
* Fixed linting issue
* Split out params from options
* Fixed linting errors
---------
Co-authored-by: Martin MacDonald <martinmacdonald@Martins-MacBook-Pro.local>
* Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (260 of 260 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/
* Translated using Weblate (Turkish)
Currently translated at 100.0% (260 of 260 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/
---------
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
* Translated using Weblate (Turkish)
Currently translated at 100.0% (259 of 259 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (259 of 259 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/
* Apply suggestions from code review
---------
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
Co-authored-by: Coisini-H <2972186196@qq.com>
* Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (257 of 257 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/
* Translated using Weblate (Turkish)
Currently translated at 100.0% (257 of 257 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/
---------
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: Ramazan SANCAR <ramazansancar4545@gmail.com>
Translated using Weblate (French)
Currently translated at 100.0% (255 of 255 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/
Co-authored-by: Ezmana <ezmana.land@gmail.com>
Translated using Weblate (Turkish)
Currently translated at 100.0% (255 of 255 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (255 of 255 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/
Co-authored-by: Coisini-H <2972186196@qq.com>
* Translated using Weblate (Japanese)
Currently translated at 100.0% (255 of 255 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ja/
* Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (255 of 255 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/
* Translated using Weblate (Chinese (Traditional))
Currently translated at 99.6% (254 of 255 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hant/
---------
Co-authored-by: Somme4096 <somme4096@gmail.com>
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Translated using Weblate (Hungarian)
Currently translated at 98.6% (299 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/hu/
Co-authored-by: Vermunds <33235701+Vermunds@users.noreply.github.com>
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (303 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/
Co-authored-by: Sung Kim <1740603900@qq.com>
Translated using Weblate (French)
Currently translated at 99.6% (302 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/
Co-authored-by: Alexis <alexisl61@outlook.fr>
Translated using Weblate (English)
Currently translated at 100.0% (303 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/en/
Co-authored-by: noxonad <noxonad@proton.me>
Translated using Weblate (French)
Currently translated at 99.6% (302 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/
Co-authored-by: Alexis <alexisl61@outlook.fr>
Translated using Weblate (Russian)
Currently translated at 90.4% (274 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ru/
Co-authored-by: sergeybutakov <pushkagun@gmail.com>
* Translated using Weblate (Turkish)
Currently translated at 100.0% (303 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 99.6% (302 of 303 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/
---------
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
Co-authored-by: Coisini-H <2972186196@qq.com>
Translated using Weblate (Turkish)
Currently translated at 100.0% (300 of 300 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
* Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (299 of 299 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/
* Translated using Weblate (Turkish)
Currently translated at 100.0% (299 of 299 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (299 of 299 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (299 of 299 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/
---------
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
Co-authored-by: Coisini-H <2972186196@qq.com>
Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
* Translated using Weblate (French)
Currently translated at 100.0% (295 of 295 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/
* Translated using Weblate (Turkish)
Currently translated at 100.0% (295 of 295 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/tr/
---------
Co-authored-by: Ezmana <ezmana.land@gmail.com>
Co-authored-by: Oğuz Han <h4n.3545@gmail.com>
* Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (295 of 295 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/
* Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (295 of 295 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hans/
* Translated using Weblate (Chinese (Traditional))
Currently translated at 98.3% (290 of 295 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/zh_Hant/
---------
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
Co-authored-by: Coisini-H <2972186196@qq.com>
* Translated using Weblate (Russian)
Currently translated at 85.1% (252 of 296 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ru/
* Translated using Weblate (Vietnamese)
Currently translated at 91.8% (272 of 296 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/vi/
---------
Co-authored-by: LibreTranslate <noreply-mt-libretranslate@weblate.org>
Co-authored-by: The Anh Nguyen <anhntdev0@gmail.com>
Translated using Weblate (Russian)
Currently translated at 85.1% (252 of 296 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ru/
Co-authored-by: xyznetsov <invisiblesun2016@yandex.ru>
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (296 of 296 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
* Translated using Weblate (Japanese)
Currently translated at 95.2% (279 of 293 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/ja/
* Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (293 of 293 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/
---------
Co-authored-by: Somme4096 <somme4096@gmail.com>
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
* feat: implmented link previews (frontend files)
* chore: updated frontend side for Link Previews
* chore: updated frontend gen types with the renamed (server) service file
* fix: passing errors
* chore: switched to using generated type instead of separate fields
* fix: passing linter error
* chore: updated Link.tsx
* chore: using `useResponsiveWidth` to render for different devices
* chore: refactored Link.tsx
Translated using Weblate (French)
Currently translated at 100.0% (293 of 293 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/fr/
Co-authored-by: Ezmana <ezmana.land@gmail.com>
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (307 of 307 strings)
Translation: memos-i18n/i18n
Translate-URL: https://hosted.weblate.org/projects/memos-i18n/english/pt_BR/
Co-authored-by: Lincoln Nogueira <lincolnthalles@users.noreply.github.com>
* fix: use correct higlight color on selecting a tag in darkmode
* fix: take scrolling into account in tab suggestion
Issue: When editing a long memo and editing a tag somewhere where the user has
to scroll down to, the tag suggestions would be out of place (too far down)
because the scrolling wouldn't be taken into account.
Fix: Substract the suggestions div by the scroll amount.
* fix: don't show tag suggestion when on '#'
Fixes this issue like this:
1. Text #tag text
^ backspace here
2. Text#tag text
^ space
3. Text #tag text
^ tag suggestion opens