* Prevent broken logo from crashing site
* Cache icons in memory to make site less vulnerable to DOS attacks
* Swap try and if blocks for apple touch icon
* Content warning fixups
- Require consent of logged in existing users.
- Prevent link clicks in blurred areas.
- Enable tippy again.
- Prevent stacking of countdowns for Back button.
- Fix auto expand blocking for images.
* Hide content warning for logged in users
* Make confirm popup for adult consent
* Fix import
* Fix blur and adjust user settings
* Make confirmation popup more stylish
* Add setting to site settings form
* Fix modal bug
* Put adult consent logic all in one place
* Make modal use markdown
* Fix consent modal showing up for currently logged in admin
* Add go-back redirect countdown
* Center modal title
* Handle enable_nsfw correctly
* Blur background of modal to hide spicy things
* Add translations
* Pass parsed query params as props to components
* Pass parsed query params to fetchInitialData
* Pass router Match to fetchInitialData
* Cast individual routes to their concrete types
Adds an IRoutePropsWithFetch definition for routes with getQueryParams
or fetchInitialData to cause compiler errors when the types no longer
match.
* Don't double decode query parameters.
Problem: A search for "%ab" produces a url with "%25ab". Refreshing
the page results in URLSearchParams turning "%25ab" back into "%ab".
decodeURIComponent() then complains about "%ab" being malformed.
This removes decodeURIComponent() calls for query parameters and
composes all query strings with getQueryString(), which now uses
URLSearchParams. Query parsing already goes through getQueryParams()
which also uses URLSearchParams.
* Fix for PictrsImage when src also has query params
* Small getQueryParams cleanup
* Set data-bs-theme attribute from Theme component
* Handle temporary theme changes in Theme component
* Fetch theme list on AdminSettings component mount
* Include CodeTheme in Theme component
* Improve handling of browser-compact theme
---------
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
* Lazy load i18n translations.
* Lazy load date-fns
* Fix inconsistent DOMContentLoaded event.
Only when no translations and date-fns have to be dynamically loaded
(e.g. for en-US) the NavBar `componentDidMount` is early enough to
listen for "DOMContentLoaded".
Removes one redundant `requestNotificationPermission()` call.
* Rename interface language code "pt_BR" to "pt-BR".
Browsers ask for "pt-BR", but the "interface_language" saved in the
settings dialog asks for "pt_BR". This change will make the settings
dialog ask for "pt-BR" instead of "pt_BR". For users that already (or
still) have "pt_BR" configured, "pt-BR" will be used, but the settings
dialog will present it as unspecified.
* Use Accept-Language request header
* Prefetch translation and date-fns
---------
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
* Changing security.txt to use github security advisories page.
- Fixes#2332
* Adding an expires date, one year from build date.
* Add a year to the build date in code.
* Fix dev.dockerfile build date.
---------
Co-authored-by: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com>
* Trying more ssr fixes. #2243
* Try to enforce cross-fetch again.
* Try to forward cookies.
* Try to forward cookies 2.
* Trying a new cross-fetch.
* Fixing headers
* Fixing some auth issues.
* Fixing isBanned.
* Fix shutdown.
* Pushing up some tries.
* Moving lemmyclient building into fetchInitialData functions.
wrappedhttpclient has two bugs:
1. setHeaders becomes async with errors gobbled up. this is probably not intentional and the result is not awaited at the call site
2. wrappedhttpclient overrides methods in the prototype and not the instance. this means that when a new instance is created, from then on all methdos on all wrappedhttpclients call the inner methods on the newly created client instead of their respective clients
this PR tries to fix both. it is untested so idk if it works
related: #2243
* Add highlighting
* Adds it to mdNoImages as well
* Revert "Adds it to mdNoImages as well"
This reverts commit 2f8e3bb0cc.
* Revert "Add highlighting"
This reverts commit 80bcddd4df.
* Prevent yarn.lock from massively updating
* Add code themes locally
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Cache headers have been active in production for a while now, and I didnt see any issues reported. So it should be save to increase the max-age to reduce server load further.
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
* update lemmy-js-client version
* add moderator view to moderator view select
* fix some linting problems introduced in recent lemmy-js-client changes
* remove form id from mardown-textarea submit
* add default delete_content as false
* manually check if a user is an admin
* update lemmy-js-client to 0.19.0-rc.7