Commit graph

42 commits

Author SHA1 Message Date
6754c08902 Fixing 2024-08-01 10:45:58 -04:00
SleeplessOne1917
e9c6e99165
Set data-bs-theme based on the presence of "dark" in theme name (#2638) 2024-07-29 09:11:05 -04:00
SleeplessOne1917
5c3da58366
Fix issue from logo bugfix (#2620)
* Fix issue from previous bugfix

* Fix typo
2024-07-22 10:19:11 -04:00
SleeplessOne1917
01c095d269
Prevent broken logo from crashing site (#2619)
* 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
2024-07-21 14:56:57 -04:00
matc-pub
f01701f5ec
Content warning fixups (#2432)
* 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
2024-04-22 11:05:54 -04:00
SleeplessOne1917
643c1f6f01
Make confirm popup for adult consent (#2419)
* 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
2024-04-18 19:54:16 -04:00
matc-pub
9a5f9dd18a
Do most of the theme handling from the Theme component (#2390)
* 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>
2024-03-14 08:33:49 -04:00
matc-pub
e832cd2729
Lazy load translations and date-fns, server side support for "Browser Default" language (#2380)
* 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>
2024-03-13 16:39:45 -04:00
SleeplessOne1917
8a722c939c
Only generate manifest if it isn't already in memory (#2272)
* Only generate manifest if it isn't already in memory

* Remove forward header

---------

Co-authored-by: SleeplessOne <insomnia-void@protonmail.com>
2023-12-06 08:57:31 -05:00
Dessalines
7702c041e5
Move lemmyClient generation into fetchInitialData functions. Fixes #2243 (#2260)
* 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.
2023-12-05 03:07:36 +00:00
Dessalines
7222632389
Trying another SSR fix. #2243 (#2251) 2023-11-29 09:44:31 -05:00
Dessalines
5ec9baa5a5
Attempting to fix SSR. #2243 (#2247)
Co-authored-by: SleeplessOne1917 <insomnia_void@protonmail.com>
2023-11-28 21:37:56 -05:00
biosfood
8e2609a96d
Add moderator view button (#1993)
* 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
2023-09-06 08:43:19 -04:00
Dessalines
9f2289d466
Upgrading deps, running prettier. (#1987) 2023-07-28 16:15:42 -04:00
randfur
cd1a11c77a
Fix start_url and scope (#1931)
Remove unused import
2023-07-13 20:01:14 -04:00
Sander Saarend
546f0ad704
Add nonce-based CSP header (#1907)
* Remove websocket config

* Add nonce based CSP
2023-07-10 14:26:41 -04:00
SleeplessOne1917
f6cbc896af
feat(theme): Vaporwave (#1682)
* Make vaporwave dark theme work

* Tweak vaporwave light theme

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-07-04 12:13:31 -04:00
Alec Armbruster
7743fa98b9
wip 2023-06-30 10:04:01 -04:00
Alec Armbruster
da45ffb46b
fix cache auth method 2023-06-30 09:42:09 -04:00
SleeplessOne1917
339cefa2b0 Cache static data for a day 2023-06-29 13:14:48 -04:00
SleeplessOne1917
751495702c
Use git hash to break cache (#1684)
* Use git hash to break cache

* Address PR feedback

* Make hash docker agnostic

* Add trailing slash

* Update .prettierignore

Co-authored-by: Alec Armbruster <35377827+alectrocute@users.noreply.github.com>

* Remove debugging log

* implement getStaticDir util

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: Alec Armbruster <35377827+alectrocute@users.noreply.github.com>
2023-06-29 10:29:33 -04:00
SleeplessOne1917
5c16be767c
Add i386 theme (#1662)
* Add i386 theme

* Make searchable selects display properly

---------

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-06-28 16:43:33 -04:00
Alec Armbruster
94d223b162
add darkly-pureblack theme 2023-06-26 10:37:39 -04:00
dankxiaobong
0fee7cba3b
Merge branch 'LemmyNet:main' into added-darkly-compact-552 2023-06-23 21:33:39 +02:00
SleeplessOne1917
51a6681d15 Omit user-scalable to use default 2023-06-22 12:50:05 -04:00
SleeplessOne1917
955ca826cd Enable users to zoom on mobile 2023-06-22 12:28:27 -04:00
dankxiaobong
37ac318806
Merge branch 'main' into added-darkly-compact-552 2023-06-22 16:53:00 +02:00
Alec Armbruster
a1d935991b
rethink it a bit 2023-06-22 10:43:03 -04:00
Alec Armbruster
5512ee205a
add fallback style tag 2023-06-22 10:32:39 -04:00
Alec Armbruster
8e767f2331
fix merge conflicts 2023-06-22 09:04:25 -04:00
Alec Armbruster
fc40b473d7
move env utils into folder 2023-06-22 09:02:48 -04:00
Scott
0247f8a2cf
Fix buildThemeList() function to ensure no duplicates (#1466)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-06-22 08:55:11 -04:00
Alec Armbruster
9fc3da0264
Fix grave ReferenceError: fetch is not defined error (#1460)
* use cross-fetch

* remove from utils usage
2023-06-22 07:42:57 -04:00
dankxiaobong
dfe394adca
Merge branch 'LemmyNet:main' into added-darkly-compact-552 2023-06-22 12:29:01 +02:00
SleeplessOne1917
3664b0600b
(Hopefully) fix webmanifest different origin issue (#1457)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-06-21 21:04:28 -04:00
Alec Armbruster
043b522ff1
utils.ts organization, round two (#1427)
* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Update src/shared/utils/app/convert-comment-sort-type.ts

Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>

* prettier pass

---------

Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
2023-06-21 18:28:24 -04:00
dankxiaobong
376ca28f1d
Merge branch 'main' into added-darkly-compact-552 2023-06-21 14:22:22 +02:00
SleeplessOne1917
3db4fdddcd
Store manifest in memory so it does not need to be generated for every page request (#1433)
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
2023-06-21 07:55:27 -04:00
dankxiaobong
1c0f4f6002 added litely-compact 2023-06-21 13:46:31 +02:00
dankxiaobong
d56aeb95ca added darkly-compact - issue 552 2023-06-21 11:19:30 +02:00
Alec Armbruster
b568756b83
formatting 2023-06-16 10:42:35 -04:00
Alec Armbruster
88780ba9ab
refactor server, tidy up, use handlers/middleware/utils pattern 2023-06-16 10:34:36 -04:00