Commit Graph

44 Commits

Author SHA1 Message Date
Zorchenhimer
16c36ca9bc Don't wrap name highlights with colons
Name suggestions would wrap a name in colons instead of just emotes.  It
looks like this may have still worked fine, but it wasn't the correct
behavior.
2020-04-27 12:50:29 -04:00
Zorchenhimer
94a4f08467 Make suggestions popup insert wrapped emotes
The suggestions popup will now insert wrapped emotes instead of bare
word emotes.  This is so the autocompletion will still work if the
WrappedEmotesOnly setting is set to true.
2020-04-19 12:50:26 -04:00
Zorchenhimer
8fc3f86135 Add an emote list
It's ugly, but it get's the job done.  This list will need to be
improved a lot (ie, make it searchable and maybe even clickable
emotes?).  This is for #99, but should not be considered fixed yet.
2019-11-29 12:48:17 -05:00
joeyak
3ac5af4548 Removed dependency of dennwc\dom\js
This removes the dependency of dennwc\dom\js which allows building with
Go 1.13.
2019-09-22 14:31:04 -04:00
joeyak
d153c2b4f0 Fix cookies not staying across browser sessions 2019-05-07 19:42:43 -04:00
joeyak
40f4cc72ae Make default selection the bottom option
closes #86
2019-04-18 10:31:34 -04:00
joeyak
ad2579d59a Adding some hardening to user joining
Client sends the server a object to join instead of a message
server can send a message to notify the user

closes #57
2019-04-13 13:12:08 -04:00
joeyak
176aad5b3c Change timestamps to only show on chat and action messages
closes #73
2019-04-11 21:50:20 -04:00
joeyak
24ba706827 Suggestions div changes
Added scrolling and more than 10 elements in div
if the user changes the current element, the div will scroll with it
added debug div to show the keys
closes #76
2019-03-31 21:17:19 -04:00
joeyak
9b409e0118 Make escape key hide the suggestions
closes #78
2019-03-31 16:00:36 -04:00
joeyak
e798684b3e Change the show debug names 2019-03-31 15:59:57 -04:00
Zorchenhimer
358a2c068d Add build constraints to wasm source files
Add constraints to the wasm's source files so they're only built for the
js/wasm target.
2019-03-30 23:58:26 -04:00
joeyak
e5f1598cd0 Add color dropdown
issue #69
2019-03-30 17:01:44 -04:00
joeyak
ca72dc28c0 Add autocomplete for emotes
closes #9
2019-03-30 15:23:54 -04:00
joeyak
a2cc5115aa Fix timeout not being set and scrolling not catching up with chat 2019-03-28 22:06:57 -04:00
joeyak
ee2e92a9a5 Adding timestamps
resolves #66
2019-03-28 20:54:29 -04:00
joeyak
8e4ac4d600 Add color cookies
closes #6
2019-03-28 20:01:48 -04:00
joeyak
24b5152c38 Moving suggestion code to a separate file in prep for issue #9 2019-03-25 23:32:44 -04:00
joeyak
cd34480bba Change auth level checking to be on command level
The server sends new auth level to user when modded
closes #60
2019-03-24 17:27:04 -04:00
Zorchenhimer
b4ae3fa9f8 Fix non-chat empty messages
Only refuse to send empty message data to the server if it is chat
data.  All other data types can be sent with an empty message (eg,
ping).
2019-03-23 18:10:32 -04:00
Zorchenhimer
8e39585968 Prevent some zero length stuff
Don't send zero length messages to the server, and ignore the /me
command without any arguments.
2019-03-23 15:16:02 -04:00
joeyak
e770c0cb62 Remove vscode setup section and rename main_wasm.go back to main.go 2019-03-21 21:34:16 -04:00
joeyak
355f09bd48 Refactoring of ChatData
The processing of ChatData was changed so ChatData has a DataInterface object, which will be converted to a
ChatDataJSON that will have the DataInterface field converted to a json.RawMessage field. This change allows
greater customizability in the chat messages, since the Data field can still be read and modified.
2019-03-21 08:47:40 -04:00
joeyak
1cfa040f7b Added color names as possible arguements for /color
Did some linting fixing too.
Closes #45
2019-03-19 22:56:01 -04:00
Zorchenhimer
1c6c23da3e Add /nick command
Using this command will change the current user's nickname in chat.
It has an alias of /name.

An admin can force a name change by supplying the current name and a new
name.  If a name has been changed by an admin, that user can no longer
change their name (similar to forced color change).

Resolves #42
2019-03-19 17:13:20 -04:00
joeyak
7ce4c04942 Fixed autocomplete and positioning of suggestions
closes #41
2019-03-19 15:15:11 -04:00
Zorchenhimer
0b05a7aea6 Add the /purge command
This is a moderator command that clears chat for everybody.

Resolves #5
2019-03-17 22:30:00 -04:00
Zorchenhimer
01219fffa1 Fix help popup
Properly call the open() function in the web assembly to open a new
popup.
2019-03-16 16:40:39 -04:00
Zorchenhimer
d0cd90e7af Properly implement the help popup
Move the help html to a template and populate the lists dynamically.
This also splits out the base HTML stuff (eg, the <html> and <body>
tags) to a base template file.
2019-03-16 16:15:55 -04:00
joeyak
30d480d878 Change heartbeat to be send only when in chat 2019-03-16 15:47:48 -04:00
joeyak
b38542333a Add a debug message to print values 2019-03-16 14:59:30 -04:00
joeyak
f9fa44ea77 Add enter for keys to autocomplete name 2019-03-16 14:27:13 -04:00
Zorchenhimer
80be38128f Wasm client pings the server every second
This prevents disconnects when the server is behind Nignx.  Resolves
#35.
2019-03-16 14:12:25 -04:00
joeyak
ad4186a279 Added completion on tab for autocompleting name
closes  #7
2019-03-16 11:56:43 -04:00
joeyak
57e1f3863a Added popup box and arrow controls
When typing @ a div will show up with all the chat names that match.
When up or down arrow keys are pressed, the highlight changes.
Tab handling is currently incomplete but the event is prevented.

issue #7
2019-03-16 11:40:39 -04:00
joeyak
a717c6ef38 Converting from conn.WriteMessage to conn.WriteJson
This takes away some of the work on the developers side to worry about parsing the object as a json string.
Backend work for issue #7
2019-03-15 17:28:29 -04:00
joeyak
678ccab95c Add some backend infrastructure
The server can now send the client objects with data for the client to process.
issue #7
2019-03-15 02:19:16 -04:00
joeyak
60dd98a1e7 Add infrastructure for the client to send formatted data to the server 2019-03-14 15:21:53 -04:00
Zorchenhimer
653ff6fc9c Some performance tweaks to the wasm code
Removed two fmt.Sprintf() calls and a fmt.Printf() call.  The Printf()
was for debugging and isn't needed anymore.  Sprintf() apparently
isn't all that performant.
2019-03-14 10:12:21 -04:00
joeyak
2ef3684c14 Some linting fixes for the common package 2019-03-13 21:24:14 -04:00
joeyak
d83d5225c8 Remove the log function which is no longer needed 2019-03-13 15:28:21 -04:00
Zorchenhimer
bdd4e71261 Flesh out the JSON stuff a bit more
Implement some commands in the wasm client code:
  - /playing (setting and clearing)
  - /refreshplayer
Commands not yet implemented:
  - /purge (command doesn't exist yet on server)
  - /help (doesn't open window)
2019-03-13 13:42:38 -04:00
Zorchenhimer
9c80269943 Start convert to JSON data b/t client and server
Chat and events should work.  Commands do not work yet.  Everything
also needs to be tested and cleaned up a bunch more.
2019-03-13 01:09:24 -04:00
joeyak
5544ac817f Converted to code to using webassembly 2019-03-11 23:15:42 -04:00