Commit graph

28 commits

Author SHA1 Message Date
matc-pub 201e5fcd53
Lazy loading less common languages for syntax highlighting (#2388)
* Use fewer syntax highlighter languages.

Reduces client.js size by about 250kB (800kB uncompressed)

Common languages:
bash, c, cpp, csharp, css, diff, go, graphql, ini, java, javascript,
json, kotlin, less, lua, makefile, markdown, objectivec, perl,
php-template, php, plaintext, python-repl, python, r, ruby, rust, scss,
shell, sql, swift, typescript, vbnet, wasm, xml, yaml

Additionally enabled languages:
dockerfile, pgsql

* Configurable syntax highlighter languages

Allows to individually enable languages.

* Lazy load syntax highlighter languages

Allows to enable additional languages that will not be autodetected.

* Include highlight.js in dynamic import check
2024-03-14 08:31:07 -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 d9fe7d1488
Remote follow (#1875)
* Redirect to page user was trying to access on login

* Make modal

* Make modal look better

* Forgot to include in merge

* Get rid of modal

* Add external interaction page

* Tweak success page

* Add loading screen for remote fetch and refactor loading ellipses

* Add error state for remote fetch page

* Add card to federation success page

* Bring back remote fetch modal

* Add autofocus to remote fetch modal input

* Redirect for remote fetch

* Remove dummy data

* Remove duplicate functions

* Update translations

* Update translations

* Fix linting error

* Fix linting errors

* feat: Add toasts for remote follow error conditions
2023-09-25 23:32:37 -04:00
Daniele Basso 9c489680de
Fix base.output (see #1911) (#1943) 2023-07-14 16:52:05 -04:00
Daniele Basso dbeab6450b
Remove lodash.merge dependency (#1911)
Remove lodash.merge dependency from webpack.config.js file, replacing it with using spread sintax (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax)
2023-07-13 20:05:28 +00:00
Alec Armbruster 1b7a9dcb8b
fix service worker path 2023-06-30 09:50:19 -04:00
SleeplessOne1917 2d88e42cab Fix dev caching issue 2023-06-29 16:33:08 -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
Sander Saarend 0764b75dc2
Add publicPath for static js (#1672)
Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
2023-06-28 22:45:44 -04:00
Dessalines 20757fa769 Moving webpack-bundle-analyzer require inside mode check to fix docker. 2023-06-27 08:47:39 -04:00
SleeplessOne1917 e8dda77d4b
Fix comments expanding when they're not supposed to (#1540) 2023-06-24 00:06:19 -04:00
SleeplessOne1917 d0dff77377 Replace momentjs with date-fns 2023-06-22 19:33:02 -04:00
Jay Sitter cc64a1fec9 feat: Drop dependency for tsconfig-paths-webpack-plugin 2023-06-20 17:40:14 -04:00
Alec Armbruster fe8368548b
add tsconfigpathsplugin to resolve 2023-06-20 15:48:42 -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
SleeplessOne1917 0d30f4c731
Make admin UI for allowing/blocking instances easier to work with (#1012)
* Make admin UI for allowing/blocking instances easier to work with

* Tweak styles

* Remove log statements

* Trim instance names and slight refactor

* Use linkEvent
2023-05-16 09:08:52 -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
Dessalines 8356ece70e
Try fixing crypto node bug. Fixes #473 (#474)
* Try fixing crypto node bug. Fixes #473

* v0.13.6-rc.1
2021-11-03 12:57:13 -04:00
Dessalines d0a9a66724 Fixing webpack lint. 2020-10-26 19:54:05 -05:00
Orvar Segerström 0f26271571 Use webpack-watch, run server via RunNodeWebpackPlugin 2020-10-25 21:14:00 +01:00
Orvar Segerström d64507f64d Combine webpack configs to build everything at once 2020-10-25 20:51:53 +01:00
Orvar Segerström 5253e51ccd Use Webpack 5 filesystem cache 2020-10-25 12:37:18 +01:00
Dessalines 1e468ab671 Upgrading deps, moving to webpack 5 2020-10-24 12:12:13 -05:00
Dessalines d6cfeb4719 Adding librejs and a banner to javascript. Fixes #50 2020-10-03 11:03:29 -05:00
Dessalines d909ec8096 Inferno helmet SSR. 2020-09-10 23:03:01 -05:00
Dessalines 1ab6f90599 Fixing docker
Adding service worker
Adding a sigint
2020-09-10 11:39:01 -05:00
Dessalines beb41bb76c Upgrading deps, cleaning up package.json. 2020-09-09 17:07:58 -05:00
Dessalines 241ef72290 Somewhat working webpack. Sponsors and communities pages done. 2020-09-06 22:41:46 -05:00