コミットを比較

..

6 コミット

作成者 SHA1 メッセージ 日付
n9k 4eaf9b56f7 Try to ensure websocket is closed when forgetting about it
Might not be necessary, but if it is then it prevents a sitation where a
websocket is still open but we've forgotten about it, so we will never
broadcast any new messages to it and the client will be practically frozen in
time until they disconnect and open a new websocket.

Also update the user's last_seen when the websocket is closed. This prevents a
user with js enabled who's actually idle being considered absent and being
rotated when their websocket accidentally closes for a few seconds.
2022-03-10 07:47:57 +13:00
n9k 88fc9493cf v1.0.1 2022-03-10 07:47:46 +13:00
n9k e36bf78a18 Merge branch 'dev' 2022-03-10 07:47:01 +13:00
n9k ca669833e3 CSS: add `white-space: pre-wrap;` to chat messages 2022-03-10 07:46:53 +13:00
n9k e14cd4c09c Merge branch 'dev' 2022-03-10 07:46:23 +13:00
n9k cda687294e Nojs chat: fix users names/tripcodes having wrong colors 2022-03-10 07:45:56 +13:00
2個のファイルの変更9行の追加24行の削除

ファイルの表示

@ -1,15 +0,0 @@
### 1.0.0
* Reimplemented the project from scratch. The original implementation
is on the [`historical`][historical] branch.
##### 1.0.1
* Added `overflow: hidden;` css to chat messages. This prevents
messages with weird unicode characters from overlapping other
messages.
* Fixed users' colours in nojs chat.
* Added `white-space: pre-wrap;` css to chat messages, so
multi-line messages actually appear on multiple lines.
[historical]: https://git.076.ne.jp/ninya9k/anonstream/src/branch/historical

ファイルの表示

@ -86,14 +86,14 @@
cursor: default;
}
{% for this_user in users_watching + users_notwatching %}
[data-token-hash="{{ this_user.token_hash }}"] > .user__name {
color: {{ this_user.color }};
{% for user_listed in users_watching + users_notwatching %}
[data-token-hash="{{ user_listed.token_hash }}"] > .user__name {
color: {{ user_listed.color }};
}
{% if this_user.tripcode %}
[data-token-hash="{{ this_user.token_hash }}"] > .tripcode {
background-color: {{ this_user.tripcode.background_color }};
color: {{ this_user.tripcode.foreground_color }};
{% if user_listed.tripcode %}
[data-token-hash="{{ user_listed.token_hash }}"] > .tripcode {
background-color: {{ user_listed.tripcode.background_color }};
color: {{ user_listed.tripcode.foreground_color }};
}
{% endif %}
{% endfor %}
@ -110,7 +110,7 @@
<h5>Watching ({{ users_watching | length }})</h5>
<ul>
{% for user_listed in users_watching %}
<li class="user" data-token-hash="{{ user.token_hash }}">
<li class="user" data-token-hash="{{ user_listed.token_hash }}">
{{- appearance(user_listed, insignia_class='user__insignia', name_class='user__name', tag_class='user__name__tag') -}}
{%- if user.token == user_listed.token %} (You){% endif -%}
</li>
@ -120,7 +120,7 @@
<h5>Not watching ({{ users_notwatching | length }})</h5>
<ul>
{% for user_listed in users_notwatching %}
<li class="user" data-token-hash="{{ user.token_hash }}">
<li class="user" data-token-hash="{{ user_listed.token_hash }}">
{{- appearance(user_listed, insignia_class='user__insignia', name_class='user__name', tag_class='user__name__tag') -}}
{%- if user.token == user_listed.token %} (You){% endif -%}
</li>