Commit Graph

163 Commits (vue-cli)

Author SHA1 Message Date
Noah 52dd53240e Another minor undeclared variable fix 2023-09-07 21:20:26 -07:00
Noah 5d0515cba6 Minor undeclared variable fix 2023-09-07 21:17:33 -07:00
Noah dbfd45794a More safely parse JSON from localStorage 2023-09-07 21:03:15 -07:00
Noah a2cb32cce2 Fix emoji upvotes and add interactjs 2023-09-07 20:36:47 -07:00
Noah d7226e7f1d Small tweaks 2023-09-07 20:26:06 -07:00
Noah 8853f9882b Store sort order and explicit setting to localStorage 2023-09-07 20:05:52 -07:00
Noah d8c92800f3 Fixes for admins, VIP and blocking + Frontend tweaks
Changes to the chat server:
* Blocking will not apply to admin user accounts (operators)
* Users who block an admin will instead mute them, but the admin can
  still DM them if required
* Messages to VIP channels are broadcast to admins even if they are not
  VIPs, e.g. so moderator chatbots can see
* On the Who List: VIP-only cameras to highlight with the VIP background
  color on those buttons
2023-09-07 19:43:03 -07:00
Noah d8cb1c7c11 Refactor more Vue components
Spin out components for:
* MessageBox: draw a chat message in the chat history panel as well as reused
  in the Report Modal.
* WhoListRow: provides a consistent UX for the Who List and Watching tab. On
  the Watching tab, the video button is replaced with the boot from video.

Other changes:
* Move VideoFlag into its own separate ES module.
* Emoji available reactions are moved into MessageBox.
* On WhoListRow: usernames are clickable to also open their profile page.
* On WhoListRow: the Watching tab is now sortable and follows the user's
  sort selection like the Online tab does.
2023-09-07 19:24:26 -07:00
Noah 8906e89a51 Refactor some modals and features into components
Move some chat modals into external components:
* LoginModal
* ExplicitOpenModal
* ReportModal
* The Photo Modal was hoisted into the main index.html page, because it is not
  a Vue component and relied on global onclick handlers and the DOM.

Spin off some external JS modules:
* isAppleWebkit moved to lib/browsers.js
* Local Storage management centralized and moved to lib/LocalStorage.js
2023-09-06 23:03:12 -07:00
Noah e728644a77 Port front-end over to Vue CLI (create-vue)
This commit makes an initial port of the front-end over to a proper Vue
CLI application. It seems to work from surface level testing.

Changes made:

* Rename web/static to public/static to place it into the Vue build path
  * Notes: web/static/js/BareRTC.js and web/templates/chat.html are now
    deprecated
* Rename web/static/js/sounds.js into src/lib/sounds.js making it a
  proper JavaScript module with exports.
* Fill out initial src/App.vue by copying and updating
  web/templates/chat.html and web/static/js/BareRTC.js into this module.
2023-09-06 17:15:02 -07:00
Noah a7342988ba Null exception fix 2023-09-05 14:09:07 -07:00
Noah 7ffa6b4dbd More thorough blocking behavior 2023-09-05 13:57:11 -07:00
Noah 940f14e2d6 VIP-only chat channels 2023-09-03 12:48:21 -07:00
Noah 0174bf7bd8 Some bugfixes with mutual require video 2023-09-03 12:36:15 -07:00
Noah 6e2aa517f5 Support for VIP users via JWT Auth 2023-09-03 12:08:23 -07:00
Noah f65f653430 Quick mute all sounds checkbox 2023-09-01 17:11:17 -07:00
Noah 3404373a4b Disable autocomplete on the message box 2023-08-31 17:34:40 -07:00
Noah 0607fac724 Merge pull request 'WebRTC iPad Testing' (#36) from ipad-testing into master
Reviewed-on: #36
2023-09-01 00:24:07 +00:00
Noah f3a917ec04 Code cleanup 2023-08-31 17:18:18 -07:00
Noah 81a4d0cd0c Merge branch 'master' into ipad-testing 2023-08-31 16:34:28 -07:00
Noah 230098f949 Walk of shame for promoting spammy links in chat 2023-08-30 18:14:59 -07:00
Noah 28d4768406 WebRTC iPad Testing 2023-08-30 23:28:37 +00:00
Noah 0acb729175 Update admin icon from gavel to peace 2023-08-30 13:31:21 -07:00
Noah dc9260c8e6 Restore presence messages for non-join, non-leave 2023-08-29 19:57:12 -07:00
Noah 4cbc919793 Small tweaks 2023-08-29 16:44:54 -07:00
Noah fd82a463f3 Deadlock detection, DND, and Frontend Fixes
* Deadlock detection: the chatbot handlers will spin off a background goroutine
  to ping DMs at itself and test for responsiveness. If the echoes don't return
  for a minute, issue a /api/shutdown command to the HTTP server to force a
  reboot.
* New admin API endpoint: /api/shutdown, equivalent to the operator '/shutdown'
  command sent in chat. Requires your AdminAPIKey to call it. Used by the chatbot
  as part of deadlock detection.
* Adjust some uses of mutexes to hopefully mitigate deadlocks a bit.
* Do Not Disturb: if users opt to "Ignore unsolicited DMs" they will set a DND
  status on the server which will grey-out their DM icon for other chatters.
* Bring back an option for ChatServer to notify you when somebody begins watching
  your camera (on by default).
* Automatically focus the message entry box when changing channels.
* Lower webcam resolution hints to 480p to test performance implications.
2023-08-29 15:54:40 -07:00
Noah 59fc04b99e Reduce Notification Spam; Unsolicited DMs Option; New SFX
* New "Misc" tab added to the Settings modal with options to reduce spam
  and improve privacy.
    * Opt in (or out) for public channel join/leave presence
      notifications
    * New option to auto-ignore unsolicited DMs
* New sound effects for Watched and Unwatched (your camera)
    * Reduces spam so ChatServer doesn't need to tell you every time
      somebody opens your camera.
* New spinner icon when opening someone else's camera.
    * If their cam takes a while to appear, the video button shows a
      spinner icon as feedback so we avoid ChatClient spam giving you
      acknowledgement of the cam trying to open.
2023-08-28 22:46:40 -07:00
Noah c4f90fadd2 Message padding fix 2023-08-20 21:13:46 -07:00
Noah 8e25145bec New status options: Studying and Gaming 2023-08-19 11:16:20 -07:00
Noah 2aea41537b Store preferred webcam device names the user selected
* In case the user has remembered their camera/mic permission and the
  Share Webcam button is able to list their devices before they go on
  video the first time, we can (try to) select their favorite devices
  (by name) that they used the last time they were on.
2023-08-18 18:54:45 -07:00
Noah 13fe6eccb7 Chatbot auto-greet cooldown tweaks 2023-08-17 22:33:01 -07:00
Noah fd4761288a Bugfix for device picker on Firefox for Android 2023-08-17 19:36:33 -07:00
Noah 802f4d744c Attempt to show webcam devices before initial broadcast 2023-08-17 19:15:26 -07:00
Noah 664eeaa068 Refresh video devices on demand 2023-08-17 18:45:43 -07:00
Noah 0a4fa00087 Mouseover tooltips for message buttons 2023-08-16 22:42:51 -07:00
Noah 42fa0e0e7a Change the default image handler to collapse 2023-08-16 22:40:17 -07:00
Noah 74aa9527cc UX improvement for send message button 2023-08-16 22:26:02 -07:00
Noah 89f3937da8 Don't use the CaseSensitive RiveScript option 2023-08-15 20:49:04 -07:00
Noah 2b9b23f37a Update to RiveScript 0.4.0 2023-08-15 20:40:58 -07:00
Noah 9cbf9e664d Setting to collapse image shares by default 2023-08-14 19:59:35 -07:00
Noah af35ac9ed6 Chatbot improvements 2023-08-14 19:08:40 -07:00
Noah 591775a34d Fix tooltip for emojis 2023-08-13 23:09:11 -07:00
Noah b5429226d6 A muted admin user can still DM you 2023-08-13 22:59:35 -07:00
Noah a1aedea2f4 Case insensitive at-mention for the chatbot 2023-08-13 22:21:29 -07:00
Noah 9c8ff88f6e Update chatbot program
* New object macros: dm, takeback, report
* Bugfixes
2023-08-13 20:45:53 -07:00
Noah 9c05af2c2e BareBot Chatbot Client 2023-08-13 19:21:27 -07:00
Noah 2cfabaf251 Don't show report button on own messages 2023-08-12 23:39:51 -07:00
Noah 58ca6a818a CSS class fix 2023-08-12 23:11:16 -07:00
Noah bb8fa33493 Some fixes 2023-08-12 23:09:46 -07:00
Noah 29cb7c5cc9 Fix emoji popup 2023-08-12 22:42:04 -07:00