* feat: Add modal for totp settings
* Make inputs show up on totp modal
* Make modal work when enabling and disabling 2FA
* Give user better feedback when en/disabling totp
* Use new 2FA flow for login
* Refactor 2fa modal to prevent implementation details from leaking
* chore: Use constant objects where appropriate
* Incorporate translations
* add global service for unread notifications
* update inbox counter when marking a message as read
* adapt NotificationService for new auth parameter
* refactor unread counter service
* user service: refactor moderatesSomething
* use behavioursubjects for unreadcounterservice
* retry tests
---------
Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
* handle url paste
* change selection range after paste
* use default paste behaviour if no text is selected
* change to `validUrl` helper function
---------
Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
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>
* Store communityLimit as a constant in the config
* Block Next button on communities list if the next page is empty
* Use this.props instead of undefined props, compare number to the length of the array, not the array itself
* Set nextDisabled prop for Paginator in registration-applications component
* Set nextDisabled prop in Paginator required
* Ignore nextDisabled prop in Paginator component used in person/inbox.tsx and modlog.tsx
* Set nextDisabled to true if community is not yet loaded or no more pages are expected
* Set nextDisabled to false for Paginator in emojis-form.tsx
* Fix swapped bool logic in community.tsx
* Set nextDisabled for Paginator in home.tsx
* Set nextDisabled for Comments and Posts in person-details.tsx
* Set nextDisabled for reports.tsx
* Set nextDisabled for search.tsx
---------
Co-authored-by: SleeplessOne1917 <abias1122@gmail.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
* always show community name with instance for easy copy-pasting to friends
I don't like the inconsistency of community names currently, the UI shouldn't be presenting things differently because of technical reasons that are hard for users to understand. This makes it easier to share communities with your friends!
* always show community name with instance, cleanup
* Move allowed and blocked instance tables into column right of linked
Conserve some vertical space. And I assume linked instance list will
usually belonger than allowed and blocked, combined or not.
* Use tabs to organise instances by status
As per suggestions from the initial PR. Using the suggested Tab
component was implemented.
* Provide a header when there are no instances found
Will be weird if there are no instances linked on this instances page
otherwise.
* Wrap tabs and table in a col-sm-8 div (within a row div)
To restrict the width of the table especially on wider screens
* Open links in a new tab setting in UI
* fixes according to review
* also open external links when setting is enabled
* oopsie
* oopsie 2
* pull translations
* Fixing PR comments.
* Fix prettier.
---------
Co-authored-by: Dogeek <simon.bordeyne@gmail.com>
Co-authored-by: Simon Bordeyne <Dogeek@users.noreply.github.com>
Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
* Added buttons to be able to sort posts and comments by controversy rank
* Added buttons to be able to sort posts and comments by controversy rank
* lost changes
* Hiding controversial sort if downvotes disabled (unfinished)
* Finished hiding sort option correctly
* Removed newline
* Removed hiding logic for now, this should be included in a future PR
* woodpecker re-run
* woodpecker re-run
* woodpecker re-run
* Update lemmy js-client version
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
* Mark post as read when clicking "Expand here" on the preview image on the post listing page (#1600)
* Simplified check for mark post as read
* Implemented mark post as read as a property callback instead of directly using HttpService
---------
Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
* Expanded the RegEx to check if the title contains new line caracters.
Should fix the issue #1962.
Also added Comments for clarity.
* ran yarn and changed according to recommendations
* Allow sorting on communities page
Just a few minor changes to communities.tsx that add a sort dropdown - same element as the sort dropdown in home.tsx
* Fix alignment of communities.tsx selector row
Simple CSS fix for correct alignment of a few elements
---------
Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
* Make working password inputs
* Make show/hide password button use icon
* Tweak look
* Handle delete account form separately from change settings form
* Adjust password strengthometer position
* Incorporate PR feedback
* Add translations
* Make outline buttons have better contrast in dark themes
* Change secondary color for darkly themes
* Put compact styles back to how they were before
* Forgot to build themes
* Use Join Lemmy URL as link text in footer when there's a user
I think it makes sense to keep a link to the Join Lemmy website even
though there's a logged in user. There's plenty of other useful info on
that website beyond just joining Lemmy.
Using the URL avoids the phrase "Join Lemmy" and should indicate that
you're navigating to said website.
* Extract hostname from the existing URL constant instead
* Just use hostname of join lemmy site in footer
To maintain consistency whether logged in or not.
* OUpdated the regex for isAuthPath to reduce false positive hits as described in issue #1704
* Updated the regex for isAuthPath to reduce false positive hits - Re-ran Linting
* lemmy/main:
v0.18.1-rc.9
fix: Fix comment collapse and vote buttons not having focus style (#1789)
Add missing modlog reasons (#1787)
Fix search page breaking on initial load when logged in (#1781)
feat: Add PR template (#1785)
v0.18.1-rc.8
Fix profile loading spinner
fix: Move getRoleLabelPill to the only component that uses it
fix: Remove unused hasBadges() function
fix: Fix badge alignment and break out into component
fix: Fix up filter row gaps and margins a little
fix: Fix heading levels
fix: Simplify row classes a bit
fix: Fix some gaps in search filters
fix: Fix row gap on search options
fix: Add bottom margin to inbox controls
fix: Small cleanup to search/inbox controls
On MacOS, Ctrl is less commonly used than Command (⌘).
Javascript expresses command as `metaKey`.
This allows for _either_ Ctrl or Command to be used in the Markdown text
area.
Note that on Windows, on some browsers, the "windows" key is labeled as meta, so it would
work on windows as well.
http://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/metaKey