Commit Graph

2628 Commits

Author SHA1 Message Date
Georg Gadinger b6121b16f0
Merge pull request #929 from Retrospring/locale-gen
re-enable locale switching, add rake task to generate testing locales
2023-01-06 12:47:49 +00:00
Georg Gadinger 5b8e34aa1d add integration specs for changing locales 2023-01-06 13:37:22 +01:00
Georg Gadinger b81bbc2483 typoed_email_validator: add new endings to the typo list 2023-01-06 10:26:32 +01:00
Georg Gadinger ebcf9d7676 obey the dog 2023-01-06 10:04:31 +01:00
Karina Kwiatek 4457f2ed26 Prevent push enable prompt (inbox) when already subscribed 2023-01-05 23:20:36 +01:00
Georg Gadinger 8323f39ecd re-add locale switching logic
based on https://guides.rubyonrails.org/i18n.html\#managing-the-locale-across-requests
2023-01-05 15:20:33 +01:00
Karina Kwiatek 5db058cb73 Fix nav badge pills not being marked as HTML safe 2023-01-05 14:32:04 +01:00
Andreas Nedbal 01ab84aa31 Improve layout of inbox push info card 2023-01-05 12:32:50 +01:00
Karina Kwiatek 3180e10449
Merge pull request #924 from Retrospring/fix/webpush-multiple-init
Prevent WebPush init from attaching events multiple times
2023-01-05 11:32:43 +00:00
Karina Kwiatek 01f4ed499d Ensure enable button doesn't unexpectedly disappear
Co-authored-by: Andreas Nedbal <git@pixelde.su>
2023-01-05 11:53:19 +01:00
Karina Kwiatek 7673ecdadf Add missing return to subscription check 2023-01-05 11:22:43 +01:00
Karina Kwiatek 8a754de85c Rename subscriptionCheck.ts to settingsButtons.ts 2023-01-05 11:22:27 +01:00
Karina Kwiatek d288f6d6a3 Move subscription check logic into separate initializer 2023-01-05 11:08:13 +01:00
Andreas Nedbal cb740b64a9 remove duplicate stylesheet folder 2023-01-05 10:55:18 +01:00
Karina Kwiatek e93531a4af Prevent WebPush init from attaching events multiple times 2023-01-05 10:53:04 +01:00
Georg Gadinger b728c494d7 remove flag leftovers 2023-01-05 10:37:44 +01:00
Andreas Nedbal 84fcfb41a3 Fix Sass deprecation warnings 2023-01-05 10:35:52 +01:00
Andreas Nedbal dd830bd22b Fix order of icons and text on frontpage 2023-01-05 10:35:52 +01:00
Andreas Nedbal 0e47e06db1 Add bottom margin to mute rule inputs 2023-01-05 10:35:52 +01:00
Andreas Nedbal 61a9e39a3e Fix dropdowns in mobile navigation 2023-01-05 10:35:52 +01:00
Andreas Nedbal b7c7838b96 Make code HTML elements monospace again 2023-01-05 10:35:52 +01:00
Andreas Nedbal 5c583acf05 Give `bootstrap_color` a proper argument 2023-01-05 10:35:52 +01:00
Andreas Nedbal 58717c0e7f Fix ESLint nits 2023-01-05 10:35:52 +01:00
Andreas Nedbal c9b39ad1e5 Appease the dog overlords 2023-01-05 10:35:52 +01:00
Andreas Nedbal 0e97c7c80a Fix badge colors in various places 2023-01-05 10:35:52 +01:00
Andreas Nedbal da7e30f459 Remove link underlines in some places 2023-01-05 10:35:52 +01:00
Andreas Nedbal af01ab2950 Fix profile settings layout 2023-01-05 10:35:52 +01:00
Andreas Nedbal cea1190ab9 Remove and replace usage of media classes 2023-01-05 10:35:52 +01:00
Andreas Nedbal 68dd6da1f2 Remove and adjust jumbotron usage 2023-01-05 10:35:52 +01:00
Andreas Nedbal 5ce9972a3e Fix usages of btn-block class 2023-01-05 10:35:52 +01:00
Andreas Nedbal 49a972bfd3 Remove jQuery call to close question modal 2023-01-05 10:35:52 +01:00
Andreas Nedbal 2efaae6987 Fix modal/alert dismiss toggles 2023-01-05 10:35:52 +01:00
Andreas Nedbal c878862730 Remove `xxl` container width 2023-01-05 10:35:52 +01:00
Andreas Nedbal 99085f1836 Fix sizing of inline inbox action form 2023-01-05 10:35:52 +01:00
Andreas Nedbal 23c01a97be Fix text alignment classes 2023-01-05 10:35:52 +01:00
Andreas Nedbal 6643c65e23 Remove superfluous close icon 2023-01-05 10:35:52 +01:00
Andreas Nedbal 572a9ab076 Fix positioning of dropdown menus 2023-01-05 10:35:52 +01:00
Andreas Nedbal 09954c15d2 Fix data attributes for functionality in Bootstrap 5 2023-01-05 10:35:52 +01:00
Andreas Nedbal 4d417f15c5 Fix event registration for modal autofocus 2023-01-05 10:35:52 +01:00
Andreas Nedbal a00936f17e Initialize Bootstrap in TypeScript 2023-01-05 10:35:52 +01:00
Andreas Nedbal 5612f8d2bd Fix close buttons for Bootstrap 5 2023-01-05 10:35:52 +01:00
Andreas Nedbal 7450143311 Remove legacy entrypoint and packages 2023-01-05 10:35:52 +01:00
Andreas Nedbal ec5dda9f66 Fix screen reader classes for Bootstrap 5 2023-01-05 10:35:52 +01:00
Andreas Nedbal 34dbaad28e Fix font-weight classes for Bootstrap 5 2023-01-05 10:35:52 +01:00
Andreas Nedbal 5bbb798102 Fix spacing classes for Bootstrap 5 2023-01-05 10:35:52 +01:00
Andreas Nedbal 97f522e0b3 Remove Bootstrap CSS variable prefix 2023-01-05 10:35:52 +01:00
Andreas Nedbal 1ac4123e2d Replace `map-get` with `map.get` 2023-01-05 10:35:52 +01:00
Andreas Nedbal eaaed57759 Fix initial variable overrides for Bootstrap 2023-01-05 10:35:52 +01:00
Andreas Nedbal c463055cc8 Add new required Bootstrap partials 2023-01-05 10:35:52 +01:00
Karina Kwiatek 39ec2836f6
Merge pull request #918 from Retrospring/feature/nodeinfo
Implement NodeInfo
2023-01-04 17:55:05 +00:00
Karina Kwiatek b35108e9d0 Implement NodeInfo
Closes #902
2023-01-04 17:08:05 +01:00
Karina Kwiatek ea4e9e2205 Don't require an endpoint for unsubscribe
This was added by mistake earlier. Unsubscribing without an `endpoint` parameter is supposed to remove all subscriptions.
2023-01-04 16:38:48 +01:00
Karina Kwiatek 3105cb74b4 Make `endpoint` and `subscription` parameters required on web push endpoints 2023-01-04 16:34:38 +01:00
Karina Kwiatek 9fd3940b7d Don't check push subscription when not logged in 2023-01-04 16:34:38 +01:00
Georg Gadinger ea94e83e11 views/settings: change text of save profile pic button to something less generic 2023-01-04 15:39:27 +01:00
Karina Kwiatek b57b11be9d Change ID of 2FA form
This caused an error in settings/password.ts as the form had the same ID as the account settings form
2023-01-04 12:34:19 +01:00
Karina Kwiatek 3033ad4400 Fix error in checkSubscription and improve logging 2023-01-03 18:12:13 +01:00
Andreas Nedbal 6e5e483346 add fullwidth class to user action icons 2023-01-03 17:21:09 +01:00
Andreas Nedbal 05494e8822 change fa-mask icon back to fa-user-secret 2023-01-03 17:21:09 +01:00
Andreas Nedbal a7269bb202 Replace some icons with better choices from FA6 2023-01-03 17:21:09 +01:00
Andreas Nedbal 22491b19a6 Bring back pull-* utilities 2023-01-03 17:21:09 +01:00
Andreas Nedbal 077958bc5c Install Font Awesome 6 2023-01-03 17:21:09 +01:00
Karina Kwiatek 7fa548b613 Remove use of @rails/ujs in report dialog handler 2023-01-03 15:09:23 +01:00
Andreas Nedbal 2bb4f5355c Fix asset root paths 2023-01-03 14:14:23 +01:00
Andreas Nedbal 8d970ce47b Fix Lexend font path 2023-01-03 14:14:23 +01:00
Andreas Nedbal 8896445704 Add notice about asset linking to manifest 2023-01-03 14:14:23 +01:00
Andreas Nedbal 8c9dc92afb Move stylesheets back to `app/assets/stylesheets` 2023-01-03 14:14:23 +01:00
Andreas Nedbal cf4246d827 Configure Sprockets asset manifest 2023-01-03 14:14:23 +01:00
Andreas Nedbal dae4a47824 `stylesheet_pack_tag` -> `stylesheet_link_tag` 2023-01-03 14:14:23 +01:00
Andreas Nedbal e658925013 Add keepfile to builds directory 2023-01-03 14:14:23 +01:00
Andreas Nedbal 538756c6aa Remove style require in TypeScript 2023-01-03 14:14:23 +01:00
Andreas Nedbal 412be4123c Remove legacy RailsAdmin entrypoints 2023-01-03 14:14:23 +01:00
Karina Kwiatek 5d6f9deb93 Handle missing services in share worker 2023-01-03 12:38:19 +01:00
Karina Kwiatek 35a3b6b87a Hide push notification prompt in inbox after accepting 2023-01-02 13:51:02 +01:00
Karina Kwiatek 05a8ef1797 Allow re-enabling push notifications after unsubscribing 2023-01-02 13:51:02 +01:00
Karina Kwiatek 1a29a19e9d Allow setting up push when service worker hasn't been registered yet.
We don't register the service worker until the user opts in for push notifications.
2023-01-02 13:51:02 +01:00
Karina Kwiatek cc1c262256
Merge pull request #678 from Retrospring/feature/webpush
WebPush support
2023-01-02 11:57:34 +00:00
Karina Kwiatek 04bc1da8cf Use Mute Rule use cases in mutes controller 2023-01-02 12:45:35 +01:00
Karina Kwiatek c20974d182 Appease the dog overlords
Co-authored-by: nilsding <nilsding@nilsding.org>
2023-01-02 12:30:19 +01:00
Karina Kwiatek 48c7beb54e Only allow checking of own subscriptions 2023-01-02 11:52:02 +01:00
Karina Kwiatek 2417354b31 Unsubscribe client on too many failures 2023-01-02 11:52:02 +01:00
Karina Kwiatek efad76855e Add endpoint for checking subscription status 2023-01-02 11:52:02 +01:00
Karina Kwiatek e0195654b5 Send notification on 3 push failures 2023-01-02 11:52:00 +01:00
Karina Kwiatek fccf35fdab Restore push notification prompt in inbox 2023-01-02 11:51:46 +01:00
Karina Kwiatek 1cfd3250c0 Track failures on Web Push subscriptions 2023-01-02 11:51:46 +01:00
Karina Kwiatek 22a84ab818 Appease the dog overlords 2023-01-02 11:51:45 +01:00
Karina Kwiatek 2d6f539dfd Use author avatar on notification 2023-01-02 11:50:48 +01:00
Karina Kwiatek a67c26d985 Fix missing anon names from notification text 2023-01-02 11:50:48 +01:00
Karina Kwiatek 91d3db4034 Move rpush init/exit logic into Sidekiq initializer
Co-authored-by: nilsding <nilsding@nilsding.org>
2023-01-02 11:50:48 +01:00
Karina Kwiatek 10c224b2fe Address review comments from @nilsding
Co-authored-by: nilsding <nilsding@nilsding.org>
2023-01-02 11:50:48 +01:00
Karina Kwiatek 89008364d9 Handle push notifications in Sidekiq job 2023-01-02 11:50:48 +01:00
Karina Kwiatek 185c454da0 Fix incorrect author relationship name 2023-01-02 11:50:48 +01:00
Karina Kwiatek d9514a306a Make push notification settings reinit on navigation 2023-01-02 11:50:48 +01:00
Karina Kwiatek 3eafa5e335 Add tests for subscription management 2023-01-02 11:50:48 +01:00
Karina Kwiatek 8c2bfcb452 Use JSON for notification payload 2023-01-02 11:50:48 +01:00
Karina Kwiatek dc80c1dba3 Fix push notification settings not appearing when not subscribed 2023-01-02 11:50:48 +01:00
Karina Kwiatek 66b1dac3b9 Improve UX for push subscription management 2023-01-02 11:50:48 +01:00
Karina Kwiatek 8ff213af4e Add the ability to unsubscribe from push notifications 2023-01-02 11:50:48 +01:00
Karina Kwiatek 752cf1506b Add settings page for push notifications 2023-01-02 11:50:47 +01:00
Karina Kwiatek c8f5511a38 Fix capability classes being removed on page navigation
The body tag gets replaced by Turbo on page navigation, removing the classes.
2023-01-02 11:50:47 +01:00
Karina Kwiatek a04b290067 Appease the dog overlords 2023-01-02 11:50:47 +01:00
Karina Kwiatek 93d4af3f0d Deduplicate notification sending logic and replace placeholder string 2023-01-02 11:50:47 +01:00
Karina Kwiatek 2da4767623 Add JS for subscribing to and receiving push notifications 2023-01-02 11:50:47 +01:00
Karina Kwiatek 8b98c278da Send push notifications on question create 2023-01-02 11:50:47 +01:00
Karina Kwiatek bae227be76 Add endpoints for getting webpush public key and subscribing 2023-01-02 11:50:47 +01:00
Karina Kwiatek 32ab9267ec Add web push subscription model 2023-01-02 11:50:47 +01:00
Karina Kwiatek 4c158066cb Clean up User model 2023-01-02 11:31:27 +01:00
Karina Kwiatek 81c9870af4 Ignore Metrics/AbcSize in share worker 2023-01-02 09:46:55 +01:00
Karina Kwiatek 873d6a2c88 Fix typo in share worker 2023-01-02 09:46:55 +01:00
Karina Kwiatek 0241a02e29 Remove unnecessary `Object.const_get` 2023-01-02 09:35:32 +01:00
Karina Kwiatek 02bcfb3c9e Move user service into an instance variable
Co-authored-by: nilsding <nilsding@nilsding.org>
2023-01-02 09:34:08 +01:00
Karina Kwiatek d320a74045 Mark notification as read when visiting service settings 2023-01-02 00:01:42 +01:00
Karina Kwiatek baffd05d6f Appease the dog overlords 2023-01-01 23:52:46 +01:00
Karina Kwiatek 9d1e77aeba Revoke Twitter connection when the token is revoked 2023-01-01 23:46:10 +01:00
Andreas Nedbal 9b5470cfd3 Appease the dog overlords 2023-01-01 22:43:24 +01:00
Andreas Nedbal 7b0a615193 Validate uniqueness of answers for questions 2023-01-01 22:43:24 +01:00
Andreas Nedbal 6700a52ad1 Remove superfluous require 2023-01-01 22:42:50 +01:00
Andreas Nedbal 6a03d3587a Appease the dog overlords 2023-01-01 22:42:50 +01:00
Andreas Nedbal 0e172bb179 Add UI to manage muted users 2023-01-01 22:42:50 +01:00
Andreas Nedbal 55c473e0f5 don't create notifications from muted user 2023-01-01 22:42:50 +01:00
Andreas Nedbal 2a7a17a4c3 wip: don't create notifications from a muted user 2023-01-01 22:42:50 +01:00
Andreas Nedbal 8017d97784 Don't receive questions from muted users 2023-01-01 22:42:50 +01:00
Andreas Nedbal 409c8372ba Add mute action support in user action handler 2023-01-01 22:42:50 +01:00
Andreas Nedbal 361b8df798 Add mute relationship and user methods 2023-01-01 22:42:50 +01:00
Georg Gadinger 55f60bc5a7 remove requires for exporter
handled by Zeitwerk now
2022-12-29 20:57:28 +01:00
Georg Gadinger fb07eda972 remove errors 2022-12-29 20:57:28 +01:00
Georg Gadinger 9413d23a02 let Zeitwerk autoload the `lib/` directory
this also allows the UseCase classes to be hot reloaded in dev 🎉

- remove use_case requires (except for the exporter as Zeitwerk
  doesn't know about the subclasses)
- move version.rb to lib/retrospring so that Zeitwerk knows where
  to find Retrospring::Version
2022-12-29 20:57:28 +01:00
Georg Gadinger 447d1f7e6d
Merge pull request #886 from Retrospring/bugfix/questionable-user-questions
fix display conditions of profile questions
2022-12-27 23:15:58 +00:00
Andreas Nedbal 97736a956d Track question users in anonymous blocks 2022-12-28 00:10:59 +01:00
Andreas Nedbal e7f60acad5 Add target_user field to anonymous blocks 2022-12-28 00:10:59 +01:00
Andreas Nedbal 481f3c4d8f Apply review suggestions from @nilsding
Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
2022-12-27 23:51:41 +01:00
Andreas Nedbal 44e144cecc Appease the dog overlords 2022-12-27 23:51:41 +01:00
Andreas Nedbal 37f4b78f66 Silently fail in share worker if user account is suspended 2022-12-27 23:51:41 +01:00
Georg Gadinger 3524809e21 fix display conditions of profile questions 2022-12-27 22:07:21 +00:00
Andreas Nedbal 712328bd86 Fix wrong translation in linkfilter view 2022-12-26 15:38:19 +01:00
Andreas Nedbal 7cc57968bc Localize Sidekiq dashboard panel 2022-12-25 00:29:24 +01:00
Andreas Nedbal 2e27c45bbe move sidekiq panel into separate partial 2022-12-25 00:23:53 +01:00
Andreas Nedbal c730faa1b9 Remove Sidekiq dashboard link from admin sidebar 2022-12-25 00:19:08 +01:00
Andreas Nedbal be452c48b0 improve layout of Sidekiq dashboard panel 2022-12-25 00:18:17 +01:00
Georg Gadinger cf88da111c admin/dashboard: add basic sidekiq stats and warn if sidekiq is not running 2022-12-24 22:44:42 +00:00
Andreas Nedbal b53538ccb8 add safe-area to bottom padding on mobile 2022-12-24 21:47:23 +01:00
Andreas Nedbal 67e564fd94 fix z-index of comment input 2022-12-24 21:47:23 +01:00
Andreas Nedbal 7ab4214a14 add max height to notification dropdown and make it scroll 2022-12-24 21:47:23 +01:00
Andreas Nedbal 538eaecd86 remove fixed positioning from questions in mobile view 2022-12-24 21:47:23 +01:00
Andreas Nedbal 61c4033dfa add support for custom footer links 2022-12-24 19:10:05 +01:00
Georg Gadinger 312fadff2a fix images when not using S3/radosgw
"das system ist das problem, ja?"

fixes #822
2022-12-22 17:29:38 +01:00
Andreas Nedbal ff811edfe6 Apply review suggestion from @nilsding
Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
2022-12-18 22:01:43 +01:00
Andreas Nedbal 175ad4a83b eager load notification associations for dropdown 2022-12-18 22:01:43 +01:00
Andreas Nedbal 19e5837ce5 get rid of N+1 query in `notification_count` method 2022-12-18 22:01:43 +01:00
Andreas Nedbal 5a0e42fe66 use `has_cached_role?` instead of `has_role?` 2022-12-18 21:47:03 +01:00