-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the chat data to having a standard location for the HTML() templates #32
Comments
I thought I had a TODO for this somewhere. But yes, ideally that stuff should be a template somewhere that's loaded once at the server start. Maybe a global, read-only, |
I like the |
This just occurred to me, but the templates cannot just be loaded into the server. They need to be sent to the wasm client, as that's what actually calls But now that we have some more robust communication between the client and server, this shouldn't pose much of a problem. |
Were you thinking of having the templates loaded on server start? I was thinking of making the templates "contasts", but I think I might like the load at runtime better. |
Yea, on server start. I think I'd like to handle it similarly to how emotes are loaded. Once on server start, but they can be refreshed by an admin with a command. Refreshing shouldn't update HTML that's already been displayed, only new HTML. Comparing it to emotes again, when emotes are refreshed and new ones are found, old messages are not re-parsed for the new emote. |
This is for #32. This adds a starting framework for loading, caching, and executing templates on the server and the client. Currently only the server uses this functionality.
It would be better to have a specific spot to store all the html message templates. Perhaps a slice or constants in another file.
The text was updated successfully, but these errors were encountered: