Commit graph

167 commits

Author SHA1 Message Date
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
Dessalines
5c55b41971
Upgrade lemmy-js-client to 0.18.0-rc.2 (#1445)
* Updating translations.

* Upgrading lemmy-js-client.
2023-06-21 15:08:21 -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
n3oney
a7d91d3f2c
Merge branch 'main' into patch-1 2023-06-21 00:40:25 +02:00
Alec Armbruster
96abf25d00
fix merge conflicts 2023-06-17 08:07:25 -04:00
Michał
ad2bf18ab4
fix: fix loading custom themes with a custom LEMMY_UI_EXTRA_THEMES_FOLDER 2023-06-16 18:32:21 +02:00
Alec Armbruster
b568756b83
formatting 2023-06-16 10:42:35 -04:00
Alec Armbruster
dba041fb90
use tsx ext only when needed 2023-06-16 10:38:40 -04:00
Alec Armbruster
88780ba9ab
refactor server, tidy up, use handlers/middleware/utils pattern 2023-06-16 10:34:36 -04:00
Alec Armbruster
09ac948d4a
add user-scalable=no to meta tag 2023-06-15 11:48:30 -04:00
abias
ab0805432d Make comment border colors semi-transparent 2023-06-14 20:52:31 -04:00
SleeplessOne1917
2b1af707c3
Use http client (#1081)
* Beginning work on websocket -> http client conversion.

* About 30% done.

* half done.

* more done.

* Almost passing lint.

* Passing lint, but untested.

* Add back in event listeners.

* Fixing some community forms.

* Remove webpack cache.

* fixing some more.

* Fixed ISOwrappers.

* A few more fixes.

* Refactor utils

* Fix instance add/remove buttons

* Not catching errors in isoWrapper.

* Wrap Http client

* Fixing up tagline and ratelimit forms.

* Make all http client wrapping be in one place

* Reworking some more forms.

* Upgrading lemmy-js-client.

* Fixing verify email.

* Fix linting errors

* Upgrading woodpecker node.

* Fix comment scrolling rerender bug.

* Fixing a few things, commenting out props for now.

* v0.18.0-beta.1

* Trying to fix woodpecker, 1.

* Trying to fix woodpecker, 2.

* Handroll prompt

* Add navigation prompt to other pages

* Fix prompt navigation bug

* Fix prompt bug introduced from last bug fix

* Fix PWA bug

* Fix isoData not working

* Fix search page update url

* Fix sharp issue.

* v0.18.0-beta.2

* Make create post pre-fetch communities

* Fix bug from last commit

* Fix issue of posts/comments not being switched when changing select options

* Fix unnecessary fetches on home screen

* Make circular icon buttons not look stupid

* Prevent unnecessary fetches

* Make login experience smoother

* Add PWA shortcuts

* Add related application to PWA

* Update translations

* Forgot to add post editing.

* Fixing site setup.

* Deploy script setup.

* v0.18.0-beta.4

* Sanitize again.

* Adding sanitize json function.

* Upping version.

* Another sanitize fix.

* Upping version.

* Prevent search nav item from disappearing when on search page

* Allow admin and mod actions on non-local comments.

* Fix mobile menu collapse bug

* Completely fix prompt component

* Fix undefined value checks in use_http_client_2 (#1230)

* fix: filter out undefined from posts

* fix: emoji initialisation passing undefined

* fix: || => ?? to be more explicit

* linting

---------

Co-authored-by: Alex Maras <alexmaras@gmail.com>

* Re-add accidentally removed state

* Fix dropdown bug

* Use linkEvent where appropriate

* Fix navigation warnings.

---------

Co-authored-by: Dessalines <tyhou13@gmx.com>
Co-authored-by: Alex Maras <dev@alexmaras.com>
Co-authored-by: Alex Maras <alexmaras@gmail.com>
2023-06-14 08:20:40 -04:00
cmp
0d67c64af9
Make the community title in the sidebar link to the local community. (#1161)
* Make the community title in the sidebar link to the local community.

* Ternary erudaStr for PR.

---------

Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
2023-06-13 06:34:21 -04:00
Dessalines
a605c72859
Another try at sanitize. (#1208)
* Sanitize again.

* Adding sanitize json function.

* Using serialize instead.
2023-06-12 16:17:57 -04:00
Yuri Pieters
10a29f053f Set html lang attr to the interface language 2023-06-12 00:26:01 +01:00
4867e455f8
Alternative way to sanitize isoData (#1129)
* Alternative way to sanitize isoData

* use split/join instead of replaceAll

* Use sanitize, then restore > chars for markdown render
2023-06-09 08:17:02 -04:00
0xDEADCADE
22a4fae0c2
Fix isoData can contain user generated content (#1114)
* Fix isoData can contain user generated content

* Fix formatting
2023-06-08 11:15:03 -04:00
Thomas
6a9d61a6dd
Add media-src * to Content-Security-Policy header 2023-06-06 13:45:17 +01:00
James Whitmarsh
0754b9ba19 Refactor lets to consts 2023-06-05 22:31:12 +01:00
abias
5af62ebd84 Merge branch 'main' into nicer-error-hnadling 2023-05-23 08:01:09 -04:00
abias
ee95bd05fb Always replace host with internal host 2023-05-22 19:15:11 -04:00
abias
19408b26bf Revert "User HTTP instead of HTTPS when fetching icon in docker internal network"
This reverts commit 498de660ba.
2023-05-22 18:42:05 -04:00
abias
fd39b21b12 Revert "Add debug statement."
This reverts commit 7fbb12a4bd.
2023-05-22 18:41:33 -04:00
abias
7fbb12a4bd Add debug statement. 2023-05-22 18:15:44 -04:00
abias
498de660ba User HTTP instead of HTTPS when fetching icon in docker internal network 2023-05-22 18:10:16 -04:00
abias
83fc9f3949 Make error code always display 2023-05-22 08:38:05 -04:00
abias
256420b303 Fix isoData bug 2023-05-16 21:07:57 -04:00
abias
4f1d357b5b Refactor how error data is passed from server to client 2023-05-16 20:34:15 -04:00
abias
24c4427c82 Get rid or forced error 2023-05-15 21:02:34 -04:00
abias
900bf2099b Cleanup 2023-05-15 20:56:08 -04:00
abias
dbee2533a2 Fix things not working in production build 2023-05-14 23:45:21 -04:00
abias
23d7751523 Fix error page not showing when site not fetched and adjust styles 2023-05-14 23:01:39 -04:00
abias
3996cdaae3 Handle error when site not returned 2023-05-14 19:49:55 -04:00
abias
025daaa582 Use node env instead of version for environment specific logic 2023-05-14 16:25:03 -04:00
abias
76f0292862 Redirect to login and remove duplicated code 2023-05-14 15:28:38 -04:00
abias
8f2d964062 Fix server redirect error 2023-05-14 14:59:42 -04:00
abias
bcee6aad5b Set up logic for handling errors 2023-05-14 11:08:06 -04:00
SleeplessOne1917
b19b51c78c
Add support for PWA (#1005)
* Add logic for dynamically generating web manifest

* Make PWA icon get autogenerated

* Make service worker work

* Tweak things for PWA

* Handle apple icons and refactor

* Update prod dockerfile

* Remove jimp

* Remove unnecessary option

* Use different function syntax
2023-05-11 21:07:59 -04:00
SleeplessOne1917
3526baf465
Make pages use query params instead of route params where appropriate (#977)
* feat: Add multiple image upload

* refactor: Slight cleanup

* feat: Add progress bar for multi-image upload

* fix: Fix progress bar

* fix: Messed up fix last time

* refactor: Use await where possible

* Add query params to search page

* Update translation logic

* Did suggested PR changes

* Updating translations

* Fix i18 issue

* Make prettier actually check src in hopes it will fix CI issue

* Make home page use query params in URL

* Remove unnecessary part of private message url

* Make communities page use query params

* Make community page use query params

* Make user profile use query params

* Make modlog use query params

* Replace choices.js searchable select entirely

* Make 404 screen show up when expected

* Refactor query params code

* Remove unnecessary boolean literal

* Fix query param bug

* Address bug with searchable select and initial fetch

* Only import what is needed from bootstrap

* Undo change to comment nodes component

* Convert closure style functions to normal functions

* Updated translations

* Use translation for loading

* Fix create post select community bug

* Fix community query params bug
2023-04-15 10:47:10 -04:00
Dessalines
31715ca75c
Removing extra themes. Fixes #905 (#910) 2023-02-02 21:14:59 -05:00
Dessalines
53b1625026
Fixing PWA install. Fixes #822 (#893) 2023-01-17 14:38:21 -05:00
Dessalines
b64f47cfe9
Removing monads. Fixes #884 (#886)
* Removing monads. Fixes #884

* Fixing post fetching.

* Dont show not_logged_in error for navbar.

* Adding the lemmy-js-client RC.

* Fixing registration application mode
2023-01-04 11:56:24 -05:00
Dessalines
a6c0643428
Fix csp header for svgs in firefox. Fixes #869 (#870) 2022-11-22 16:39:55 -05:00
Dessalines
6e3a6a601b
Move symbols to its own cacheable file. Fixes #809 (#862) 2022-11-18 13:28:05 -05:00
daaac3dfe8
Support new video embed api format (fixes #709) (#817) 2022-10-04 16:35:20 -04:00
Dessalines
920a35383b
Disable CSP when in debug mode. (#743) 2022-08-16 20:39:09 +00:00
Dessalines
df31cb53cb
Documenting and changing a few env vars. Fixes #661 (#739) 2022-08-04 20:21:20 +02:00
b12c606982
Change CSP rule for connect-src (websocket) to wildcard (fixes #730) (#737) 2022-08-03 17:33:17 -04:00
Dessalines
d905c91e1b
Adding option types 2 (#689)
* Not working, because of wrong API types.

* Adding Rust-style Result and Option types.

- Fixes #646

* Updating to use new lemmy-js-client with Options.
2022-06-21 17:42:29 -04:00
Dessalines
3e7579b8bb
Fixing CSP for iOS devices. Fixes #669 (#678) 2022-06-01 16:43:54 +00:00
Dessalines
e467b22ae0
Commenting out csp headers, since it broke iOS devices. Fixes #669 (#675) 2022-05-30 22:30:42 +00:00
Dessalines
fcb85efb19
Use LEMMY_UI_DEBUG for development mode. (#644) 2022-05-26 16:48:36 -04:00
Dessalines
c8869174e8
Add LEMMY_UI_CUSTOM_SCRIPT env var. Fixes #655 (#656)
* Add LEMMY_UI_CUSTOM_SCRIPT env var. Fixes #655

* Change name to LEMMY_UI_CUSTOM_HTML

* Change name to LEMMY_UI_CUSTOM_HTML_HEADER
2022-05-25 03:33:11 +00:00
Dessalines
d4ca2085ad
Add default post listing (#645)
* Fix local development.

* Updating translations.

* Adding default site post listing. Fixes #625
2022-05-23 15:19:14 -04:00
b77689ebd1
Set content security policy http header for all responses (#621)
* Set content security policy http header for all responses

* add unsafe-eval

* fix websocket debug
2022-05-06 03:12:42 +00:00
Dessalines
6b53ae7f62
Adding litely-red and darkly-red themes. (#636) 2022-04-27 19:10:58 +00:00
Dessalines
35f1e06222
Adding a LEMMY_UI_DEBUG flag for eruda debugging (#624) 2022-04-13 15:33:00 +00:00
Dessalines
7d8843902a
Revert "Set content security policy http header for all responses (#608)" (#613)
This reverts commit f1c5c60c76.
2022-04-08 13:52:16 +00:00
f1c5c60c76
Set content security policy http header for all responses (#608) 2022-04-07 21:01:55 +00:00
Dessalines
6bd4ed4791
Remove auth token from error message. Fixes #600 (#601) 2022-03-24 20:34:04 +00:00
ada4b03615
Rename theme files from *.min.css to *.css (#590) 2022-03-03 12:55:26 -05:00
2ffe7e4c6f
Custom themes (#584)
* Add support for custom themes (fixes #560)

* load theme list in site-form.tsx
2022-03-02 10:35:59 -05:00
Dessalines
a406a87146
Don't redirect on server error. Fixes #570 (#582) 2022-02-17 18:08:13 +00:00
Dessalines
b96e16b4e9
Private instances (#523)
* Updating translations.

* Adding registration applications.

* Updating translations.

* Adding verify email route.

* Fix missing signup question bug.

* Updating translations.

* A few fixes from comments on lemmy PR.

* v0.15.0-rc.4

* Some suggestions from PR.

* v0.15.0-rc.5

* Adding optional auth to modlog fetches.

* v0.15.0-rc.6

* Hide deny / approve buttons
2021-12-30 10:26:45 -05:00
Dessalines
e976c45f88
Using console.error for error logs. (#517) 2021-12-02 11:46:32 -05:00
Dessalines
ba06c1ae47
Trying to catch promise and json parse errors. #489 (#490)
* Trying to catch promise and json parse errors. #489

* A few more promises.
2021-11-17 16:23:46 -05:00
890239972f Fixing lint, adding a few endpoints. 2021-09-06 10:25:48 -04:00
mahanstreamer
c1001f602a
Add robots.txt file 2021-09-05 18:34:40 -04:00
48a6118173 Fix language bug on mobile browsers 2021-07-18 11:08:24 -04:00
Dessalines
eed07b66aa
Re-organized components folder. (#339)
* Fixing too many large spinners

* Re-organized components folder.

- Cleaned up spans. Fixes #173
- Fixes #320

* Fixing miscolored edit
2021-07-17 16:42:55 -04:00
Dessalines
b4bb672cc8
Merge pull request #321 from LemmyNet/fix/symbols_issue
Fix/symbols issue
2021-07-16 14:30:41 -04:00
Dessalines
8cf1efbcb7
Adding a few missing langs. (#325)
* Adding a few missing langs.

* Remove unused extra language issue.
2021-07-16 14:29:22 -04:00
1a4db014d7 Fix symbols issue. Fixes #319 2021-07-16 12:51:54 -04:00
a136d064ae Fix httpBase 2021-04-26 15:32:59 -04:00
6cec37322a Using LEMMY_UI_HOST 2021-03-29 21:46:42 -04:00
e152b353d7 Fixing lemmy-ui default port. 2021-03-29 21:17:19 -04:00
9d8123eb7d Updating to use api v3 lemmy-js-client. 2021-03-29 13:20:22 -04:00
Stefan Midjich
1f9a721a67
Set listen host and port with environment variables (#229)
* take host and port from environment

* force Number for lint to pass
2021-03-29 11:35:32 -04:00
159e3a0035 Fixing custom favicons. Fixes #220 2021-03-25 11:58:29 -04:00
45445fe0a3 Fixing an issue with incorrect jwts 2021-03-15 16:54:17 -04:00
440fda9d51 user_ -> person table migration. 2021-03-15 14:09:31 -04:00
e3a337fb23 Running newer prettier. 2021-02-21 21:39:04 -05:00
Dessalines
ee77f700b3
Extra lints (#192)
* Updating deps, fixing lints.

* Downgrading broken husky.

* Trying to upgrade husky to v5

* Trying a bad lint.

* Trying a bad lint 2.

* Trying a bad lint 3.

* Adding prettier.
2021-02-21 21:24:09 -05:00
Mischa Spiegelmock
99c7966200
Make WS host configurable (#167)
* Make WS host configurable

* indent

* Type fixes

* Type lemmyConfig

* typo

* Move lemmy config to interfaces.ts
2021-02-12 12:54:35 -05:00
b754a50dff Trying to fix manifest csp. 2021-01-24 13:52:52 -05:00
368d4199a5 Actually sending ws requests, some other fixes. 2020-12-24 17:05:57 -05:00
ea317af269 First pass at v2_api 2020-12-23 20:58:27 -05:00
9853369a08 Fix safari websocket bug. 2020-12-03 07:59:59 -06:00
c772da06fe Fixing CSP 2020-12-02 08:40:51 -06:00
fc2044580d Remove inline javascript. Fixes #83 2020-12-01 12:37:15 -06:00
7ebcb0563b Fixing CSP for local dev 2020-11-25 15:06:38 -05:00
235a6f2abe Adding a content security policy. Fixes #20 2020-11-23 11:41:57 -06:00
e86cd3eddb Copy forward-headers from nginx to local node-fetch. Fixes #73 2020-11-12 15:56:46 -06:00
ebe60406be Forwarding error code to 404 page. 2020-11-10 16:45:59 -06:00
d05001cb13 Fetching site data first to get UserService / my_user. Fixes #66 2020-11-10 15:50:23 -06:00
46f2a7cda7 Create a 404 page. Fixes #71 2020-11-10 12:24:47 -06:00
Orvar Segerström
b8a47be3df Use helmet for theme inclusion instead 2020-10-26 15:28:17 +01:00