Commit graph

334 commits

Author SHA1 Message Date
nimbleghost
390d42c607 Format & fix lint 2023-06-13 14:02:54 +02:00
nimbleghost
8ccfa5c3fb Fix session replica behaviour (merge with session)
The harder-to-refactor parts are the places where exists/username/token
are called within a React component. However, `resetAndRedirect` and
`store` are already called from async contexts, so adding an `await`
is simple.

This thus merges the logic, keeping localStorage for the components to
call, but making sure reset/store behaviour works correctly for the
replica.
2023-06-13 14:00:51 +02:00
binwiederhier
eb220544a3 Change wording in prefs based on setting 2023-06-10 20:51:24 -04:00
binwiederhier
9d5556c7f5 Rename things, add comments 2023-06-10 20:42:02 -04:00
binwiederhier
2e8292a65f No real changes, just renames 2023-06-09 14:32:34 -04:00
binwiederhier
75a4b5bd88 Small refactor 2023-06-08 12:20:12 -04:00
nimbleghost
46798ac322 Make web push toggle global 2023-06-08 10:46:51 +02:00
nimbleghost
03aa67ed68 Remove webPushDefaultEnabled 2023-06-07 21:09:13 +02:00
nimbleghost
0f0074cbab Implement push subscription expiry 2023-06-07 21:09:13 +02:00
nimbleghost
47ad024ec7 Simplify web push UX and updates
- Use a single endpoint
- Use a declarative web push sync hook. This thus handles all edge cases
  that had to be manually handled before: logout, login, account sync,
  etc.
- Simplify UX: browser notifications are always enabled (unless denied),
  web push toggle only shows up if permissions are already granted.
2023-06-07 20:38:21 +02:00
nimbleghost
7aa3d8f59b Hide web push toggles if disabled on server 2023-06-07 20:38:21 +02:00
nimbleghost
4648f83669 Format emojis in the service worker directly 2023-06-07 20:38:21 +02:00
nimbleghost
ff5c854192 Add PWA, service worker and Web Push
- Use new notification request/opt-in flow for push
- Implement unsubscribing
- Implement muting
- Implement emojis in title
- Add iOS specific PWA warning
- Don’t use websockets when web push is enabled
- Fix duplicate notifications
- Implement default web push setting
- Implement changing subscription type
- Implement web push subscription refresh
- Implement web push notification click
2023-06-07 20:38:20 +02:00
nimbleghost
453bf435b0 Fix account sync race condition 2023-05-31 19:37:29 +02:00
nimbleghost
da17e4ee8a Make small code style improvements 2023-05-25 07:17:05 +02:00
nimbleghost
d178be7576 Fix param reassignment issue 2023-05-25 07:17:05 +02:00
binwiederhier
a90bd4cd06 Formatting, npm update 2023-05-24 21:44:12 -04:00
binwiederhier
d1e59fe08c Merge branch 'main' into switch-to-vite 2023-05-24 21:37:28 -04:00
binwiederhier
b7c121e78e Revert inputProps things 2023-05-24 21:32:15 -04:00
nimbleghost
d625a003b8 Use esm mui imports for Vite compatibility
See: https://github.com/mui/material-ui/issues/31835#issuecomment-1153393901
2023-05-24 22:16:10 +02:00
nimbleghost
7ccc5be9b4 Fix jsx key issue 2023-05-24 21:10:09 +02:00
nimbleghost
9ebeb7f12f Fix mui inputProps 2023-05-24 21:08:33 +02:00
nimbleghost
59011c8a32 Make manual eslint fixes
These are safe fixes, more complicated fixes can be done separately
(just disabled those errors for now).

- Reorder declarations to fix `no-use-before-define`
- Rename parameters for `no-shadow`
- Remove unused parameters, functions, imports
- Switch from `++` and `—` to `+= 1` and `-= 1` for `no-unary`
- Use object spreading instead of parameter reassignment in auth utils
- Use `window.location` instead of `location` global
- Use inline JSX strings instead of unescaped values
-
2023-05-24 12:58:48 +02:00
nimbleghost
8319f1cf26 Run eslint autofixes 2023-05-24 12:51:53 +02:00
nimbleghost
f558b4dbe9 Add .jsx filename extension
(This is also required for Vite later)
2023-05-24 12:51:53 +02:00
binwiederhier
c87549e71a Width, again 2023-05-23 20:16:29 -04:00
binwiederhier
ca5d736a71 Line width 2023-05-23 19:29:47 -04:00
nimbleghost
6f6a2d1f69 Run prettier 2023-05-23 21:13:17 +02:00
binwiederhier
f13a654fe8 Phone number dropdown 2023-05-18 12:04:21 -04:00
binwiederhier
92c384374a More self-review 2023-05-17 10:58:28 -04:00
binwiederhier
ac029c389e Self-review 2023-05-17 10:39:15 -04:00
binwiederhier
2c81773d01 Add call verification 2023-05-16 22:27:48 -04:00
binwiederhier
7c574d73de Cont'd Twilio stuff 2023-05-16 14:15:58 -04:00
binwiederhier
4b9e0c5c38 Phone number verification in publishing 2023-05-15 20:42:43 -04:00
binwiederhier
69b01bc468 Merge branch 'main' into twilio 2023-05-15 20:02:51 -04:00
binwiederhier
f998d4d2ad Fix web app i18n issue in account preferences 2023-05-15 19:49:34 -04:00
binwiederhier
ed0c1abd2f Tiny web app fixes 2023-05-15 13:37:30 -04:00
binwiederhier
cea434a57c WIP Twilio 2023-05-12 21:47:41 -04:00
binwiederhier
f99159ee5b WIP calls, remove SMS 2023-05-12 20:01:12 -04:00
binwiederhier
eb0805a470 Update web app with SMS and calls stuff 2023-05-07 22:28:07 -04:00
binwiederhier
dc5dbdf6e5 Added Swedish 2023-04-11 11:42:06 -04:00
binwiederhier
e1339ccde7 Add release notes 2023-04-04 23:14:34 -04:00
Jeremy S
f69065ca79 Hiding language preference flags while on Windows platforms.
Windows has an issue displaying country flag emoji. This is a platform issue which does not even appear to be fixed in Win11. As a result this fix will just hide the emoji when a windows operating system is detected.
resolves #606
2023-04-04 21:55:05 -04:00
Bartosz Moczulski
338cab1660 i18n: Introduce plural forms for reservations, emails, messages
In many languages there is more than one plural form of nouns and rules
for choosing the correct one are often far more complex than in English.
Luckily both react-i18next and Weblate provide built-in support for
translating and selecting plural forms in accordance with grammatical
rules of any given language.

In order to enable plural forms `{count: n}` option is added to relevant
`t()` calls. In translations files "_one" and "_other" suffix is added
to English labels such that Weblate can detect which entries represent a
set of plural forms and show appropriate language-specific form on the
translation page. E.g. in Polish there are 2 plural forms and hence 3
resulting suffixes: "_one", "_few", "_many".

Note on transition period: in the absence of expected suffixed variants
react-i18next will use non-suffixed one (if present) so existing
translations will continue to work just fine even if they happen to be
grammatically imperfect. Translators can provide proper plural forms in
once this change is merged and Weblate will then replace non-suffixed
labels with the suffixed ones.
2023-03-21 10:03:36 +01:00
binwiederhier
250637cf92 Added Danish 2023-03-02 21:48:21 -05:00
binwiederhier
fe3a225f8f Add billing-contact config option 2023-02-28 14:38:31 -05:00
binwiederhier
00879d11d3 Upgrade dialog: Disable submit button for free tier 2023-02-25 22:24:04 -05:00
binwiederhier
1da4187405 "save up to" in upgrade dialog 2023-02-22 14:21:23 -05:00
binwiederhier
3d40acc26b Chip 2023-02-22 09:25:56 -05:00
binwiederhier
ef9d6d9f6c Support for annual billing intervals 2023-02-21 22:44:30 -05:00
binwiederhier
0177016fbc Do not disable "Reserve topic" checkbox for admins 2023-02-20 20:06:49 -05:00
binwiederhier
152dfbbb54 Add Arabic 2023-02-19 07:25:14 -05:00
binwiederhier
80292f1f4d Tiny changes 2023-02-14 14:26:30 -05:00
binwiederhier
cc309e87e9 Remove awkward subscription id 2023-02-12 14:09:44 -05:00
binwiederhier
4cbf1f5371 Derp 2023-02-11 20:38:13 -05:00
binwiederhier
e5a33523d9 Why is this so hard 2023-02-11 14:32:50 -05:00
binwiederhier
224c54b1a2 Fix UI bug with publish dialog 2023-02-11 14:13:10 -05:00
binwiederhier
669d269fd9 Popup click should not open page 2023-02-11 10:52:19 -05:00
binwiederhier
b026e45189 Self-review (cont'd) 2023-02-11 10:49:37 -05:00
binwiederhier
5724bdf436 Fix UI bugs 2023-02-10 21:19:44 -05:00
binwiederhier
e6bb5f484c Self-review, round 2 2023-02-09 15:24:12 -05:00
binwiederhier
bcb22d8d4c Added disallowed-topics 2023-02-09 08:32:51 -05:00
binwiederhier
19324ab232 "Limit reached" chips 2023-02-07 23:18:41 -05:00
binwiederhier
0885951a67 JS error handling 2023-02-02 15:19:37 -05:00
binwiederhier
180a7df1e7 No ripple in dialogs 2023-01-31 22:12:16 -05:00
binwiederhier
07cdf2bc7a Reserve dialogs 2023-01-31 21:39:30 -05:00
binwiederhier
259293f9b3 JS constants 2023-01-30 13:10:45 -05:00
binwiederhier
40ba143a63 nowrap 2023-01-28 22:13:43 -05:00
binwiederhier
e596834096 Add "last access" to access tokens 2023-01-28 20:29:06 -05:00
binwiederhier
16c14bf709 Add Access Tokens UI 2023-01-27 23:10:59 -05:00
binwiederhier
1771cb3fdb No flickering for sync topic 2023-01-24 15:31:39 -05:00
binwiederhier
0d537c8a24 Reserve icons 2023-01-23 20:04:04 -05:00
binwiederhier
e82a2e518c Add password confirmation to account delete dialog, v1/tiers test 2023-01-23 10:58:39 -05:00
binwiederhier
88abd8872d Changing password should confirm the old password 2023-01-21 20:52:16 -05:00
binwiederhier
c66a9851cc Re-add password confirmation 2023-01-21 20:07:39 -05:00
binwiederhier
5310b1d48e Merge branch 'main' into user-account 2023-01-21 15:34:06 -05:00
binwiederhier
6ae200e338 Added Portuguese 2023-01-21 15:17:30 -05:00
binwiederhier
5b14c76e54 Revert home page to existing page 2023-01-21 08:55:31 -05:00
binwiederhier
31a3bb7cd6 Payments webhook test, delete attachments/messages when reservations are removed, 2023-01-20 22:47:37 -05:00
binwiederhier
3bd6518309 Fix a bunch of FIXMEs 2023-01-18 15:50:06 -05:00
binwiederhier
f945fb4cdd A little polishing, make upgrade banner work when not logged in 2023-01-18 13:46:40 -05:00
binwiederhier
cead305a9a Make prettier 2023-01-17 20:21:19 -05:00
binwiederhier
4092f7fd51 Upgrade dialog looks nice now 2023-01-17 19:40:03 -05:00
binwiederhier
695c1349e8 Upgrade dialog 2023-01-17 10:09:37 -05:00
binwiederhier
83de879894 publishSyncEvent, Stripe endpoint changes 2023-01-16 16:35:37 -05:00
binwiederhier
7faed3ee1e Add "Canceled" banner 2023-01-16 10:35:12 -05:00
binwiederhier
c06bfb989e Payment stuff, cont'd 2023-01-15 23:29:46 -05:00
binwiederhier
01fd4754f9 WIP: Stripe integration 2023-01-14 06:43:44 -05:00
binwiederhier
fdee54f921 Account sync in action 2023-01-11 21:38:10 -05:00
binwiederhier
3dd8dd4288 Stats resetter at midnight UTC 2023-01-10 22:51:51 -05:00
binwiederhier
b27c608508 useContext work in JS 2023-01-09 20:37:13 -05:00
binwiederhier
a4529617cc Make upgrade banner bigger 2023-01-09 17:56:51 -05:00
binwiederhier
3aba7404fc Tiers make sense for admins now 2023-01-09 15:40:46 -05:00
binwiederhier
1f54adad71 Rename plan->tier, topics->reservations, more tests, more todos 2023-01-07 21:04:13 -05:00
binwiederhier
60f1882bec Startup queries, foreign keys 2023-01-05 15:20:44 -05:00
binwiederhier
3280c2c440 Upgrade banner 2023-01-04 22:47:12 -05:00
binwiederhier
a91da7cf2c Reserved topic stuff 2023-01-04 20:34:22 -05:00
binwiederhier
1a87e5c3d4 Save reservation 2023-01-03 21:21:45 -05:00
binwiederhier
2500ce0920 Navigation access icon 2023-01-03 11:28:04 -05:00
binwiederhier
bb583eaa72 Automatic account sync with react 2023-01-02 22:21:11 -05:00