Commit Graph

14 Commits

Author SHA1 Message Date
SkyratBot
cae8396538 [MIRROR] tgui maintenance chores (#7597)
* tgui maintenance chores

* AAAAAA

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-08-17 19:15:40 +01:00
SkyratBot
8ff0b49bc6 [MIRROR] Extends suspicious login logging to players with a banned account in their connection history. (#7590)
* Extra loog (#60869)

* Extends suspicious login logging to players with a banned account in their connection history.

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
2021-08-17 18:59:30 +01:00
SkyratBot
ea9aed5554 [MIRROR] Replace alert usage with tgui_alert (#5815)
* Replace alert usage with tgui_alert

* a

* Update observer.dm

Co-authored-by: Celotajs <81999976+celotajstg@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-05-21 00:06:09 +01:00
SkyratBot
d2ee8bc02a [MIRROR] Revert "Flush queue in preloading part of tgui_panel" - Part 2 (#4099)
* Revert "Flush queue in preloading part of tgui_panel" - Part 2

* Update tgui_panel.dm

* Update tgui_panel.dm

* Update tgui_panel.dm

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-03-12 22:42:35 +00:00
SkyratBot
c3a3a52745 [MIRROR] Revert "Flush queue in preloading part of tgui_panel" (#4098)
* Revert "Flush queue in preloading part of tgui_panel" (#57649)

* Revert "Flush queue in preloading part of tgui_panel (#57432)"

This reverts commit 47c9f38e48.

* Update tgui_panel.dm

Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>

* Revert "Flush queue in preloading part of tgui_panel"

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
2021-03-12 14:47:23 +00:00
SkyratBot
a143f390c5 [MIRROR] Flush queue in preloading part of tgui_panel (#3860)
* Flush queue in preloading part of tgui_panel (#57432)

* Flush queue in preloading part of tgui_panel

* Update tgui_panel.dm

* Compiles

* Flush queue in preloading part of tgui_panel

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-03-04 20:47:14 +00:00
SkyratBot
5ea469fcf0 [MIRROR] Fix a number of build issues (#3716)
* Fix a number of build issues

* Update babel.config.js

* Update package.json

* Update package.json

* Update dreamseeker.js

* Update package.json

* Update webpack.config.js

* Update yarn.lock

* a

* a

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-02-28 15:28:03 +00:00
Useroth
ef6481e253 Missed PR mirrors from tgstation (https://github.com/tgstation/tgstation/pull/55373 and https://github.com/tgstation/tgstation/pull/56080) (#2759)
* Mirror of tgstation's Common Build Tooling (#55373)

* tgui 4.3 (#56080)

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-01-18 07:42:54 +01:00
SkyratBot
c487c73f39 [MIRROR] Grep for space indentation (#1969)
* Grep for space indentation

* aa

* Update species.dm

* Update species.dm

* Update maps.dm

* Update examine.dm

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-12-01 12:26:41 +01:00
SkyratBot
e61f9aaf01 [MIRROR] fix fix chat (#1439)
* fix fix chat (#54517)

Makes fix chat more robust as well as giving a more visible method to fix it.

Stand in while I investigate methods to hopefully make this unneeded.

* fix fix chat

Co-authored-by: Rob Bailey <actioninja@gmail.com>
2020-10-23 09:52:21 +02:00
SkyratBot
d4c6640d69 [MIRROR] fix chat HARDER (#1114)
* fix chat HARDER (#54030)

* fix HARDER

* Remove ping case since the hard method already does a better job.

* Update code/modules/tgui_panel/external.dm

Co-authored-by: Fikou <piotrbryla@ onet.pl>

Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
Co-authored-by: Fikou <piotrbryla@ onet.pl>

* fix chat HARDER

Co-authored-by: Rob Bailey <actioninja@gmail.com>
Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
Co-authored-by: Fikou <piotrbryla@ onet.pl>
2020-10-02 14:58:34 +02:00
SkyratBot
2c68537762 [MIRROR] tgui: Improve logging, Fix external links (#537)
* tgui: Improve logging, Fix external links (#53226)

* tgui: Improve logging, Fix external links

* Print suspending on the same line

* Streamline fix chat verb

* Muh https

* tgui: Improve logging, Fix external links

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-08-27 03:10:03 +02:00
SkyratBot
971b0ba1de [MIRROR] tgchat: Hotfixes, Message Annotations (#364)
* tgchat: Hotfixes, Message Annotations (#52947)

This PR changes the message pipeline a little bit to support list-based messages, which can be annotated with custom data. Function signature of to_chat was slightly changed as well:

// Plain text message
to_chat(client,
  type = MESSAGE_TYPE_INFO,
  text = "foo")

// HTML message
to_chat(client,
  type = MESSAGE_TYPE_INFO,
  html = "<span class='notice'>foo</span>")

Old to_chat format is still supported, but handle_whitespace, trailing_newline and confidential flags have no effect. confidential flag could still be revived though, if there is enough merit in it, for example to filter out confidential messages when saving a chat log.

The reason for using /list and not /datum, is because lists are plain faster, and there are minimal data transformations - these lists are fed directly to json_encode and sent to tgchat.

Plain text messages do not need to be HTML-escaped, which makes them safer and more performant than HTML messages. Plain text messages can be made interactive (or formatted with CSS) by custom-handling them in javscript based on message type and annotations.

It would be impossible to annotate every single message in the game (at the moment of writing, there are 9447 to_chat calls in the code), but it could be done selectively, for only those messages that are hard to classify by span classes (and there are still A LOT of them).
Please annotate more messages. Thank you.

    Fixes #52943
    Fixes #52908
    Fixes #52816

Changelog

cl
add: tgchat: Unread message count is now smarter and won't increase on other tabs if you have already read the same message in the active tab.
add: tgchat: Admin PMs are now properly annotated and can be filtered into separate tabs.
fix: tgchat: Fix: Highlighted message overlay no longer blocks clicks. Clicking a highlighted (F) link should work as it should.
fix: tgui: Fixed NTOS bluescreen due to calling .includes() on a stylesheet href which could be null on certain browsers.
code: tgchat: Chat schema bumped to version 5. All chat-related settings were reset to avoid breakage.
/cl

* tgchat: Hotfixes, Message Annotations

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-08-17 14:48:28 +02:00
SkyratBot
d9b246cca9 [MIRROR] tgchat (#342)
* tgchat (#52426)

Replaces goonchat with a tgui based chat panel

    Fixes #52898
    Fixes #52663

It is as fast as goonchat was (if not faster in certain circumstances), and is very extensible. It has all the necessary code for sorting messages into categories, which means that one of the next features will be multiple tab support.

Additional features that you will get with tgchat right now:
    Massively faster server-side performance compared to goonchat, especially if batching multiple messages to one client.
    Message persistence across rounds and reconnects. (All messages are stored client-side in IndexedDB)
    More robust scroll tracking. If you scroll up, it will not change the scroll position on new messages like goonchat did.
    Multiple message combining. (Currently set to combine up to 5 messages over last 5 seconds).
    If using the highlighting feature, it highlights the whole message as well as the matching word.
    "Now playing" widget, with preview of the song title, a knob for adjusting the volume and a stop button.

Architecture is as following:
```
to_chat() -+
           |
        SSchat
   (queue, batching)
           |
  window.send_message()
           |
           v
+-------------+
| tgui-panel  |
|+-----------+|
|| tgchat    ||
|+-----------+|
+-------------+
```

Subsystem is basically goonchat, but without all the garbage that slows the servers down (string concatenation, double urlencoding, sanitizing, etc). Now, instead of all that, it's being slowed down by json_encode in /datum/tgui_window/proc/send_message, which IMO is completely worth it, and allows sending various templates and widgets to tgchat.

/datum/tgui_window abstracts the whole window away from you, establishes a nice message-passing interface between DM and JS, with two message queues on each side, automatically loads js/css assets for you, basically does everything. You as a developer only have to worry about sending/receiving messages and write javascript.

tgui-panel is a slimmed down version of tgui, and functions as a container for various widgets, and tgchat is one of them. It of course can be expanded with more stuff.

It's also a separate entry point and a JS bundle, so it's not bloating the main tgui bundle, and is currently sitting at about 230kB.

* tgchat

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-08-14 23:30:16 +02:00