diff --git a/src/snek/app.py b/src/snek/app.py index 525b1ad..ac535cd 100644 --- a/src/snek/app.py +++ b/src/snek/app.py @@ -42,6 +42,7 @@ from snek.system.template import ( PythonExtension, sanitize_html, ) +from snek.view.new import NewView from snek.view.about import AboutHTMLView, AboutMDView from snek.view.avatar import AvatarView from snek.view.channel import ChannelAttachmentView,ChannelAttachmentUploadView, ChannelView @@ -272,6 +273,8 @@ class Application(BaseApplication): name="static", show_index=True, ) + + self.router.add_view("/new.html", NewView) self.router.add_view("/profiler.html", profiler_handler) self.router.add_view("/container/sock/{channel_uid}.json", ContainerView) self.router.add_view("/about.html", AboutHTMLView) diff --git a/src/snek/static/chat-input.js b/src/snek/static/chat-input.js index e44f6d9..531f4ce 100644 --- a/src/snek/static/chat-input.js +++ b/src/snek/static/chat-input.js @@ -394,7 +394,7 @@ textToLeetAdvanced(text) { } j++; } - return i === s.length; + return i === s.length && s.length > 1; } flagTyping() { diff --git a/src/snek/static/service-worker.js b/src/snek/static/service-worker.js index 42a2419..23b6369 100644 --- a/src/snek/static/service-worker.js +++ b/src/snek/static/service-worker.js @@ -52,7 +52,7 @@ self.addEventListener("push", async (event) => { data, }).then(e => console.log("Showing notification", e)).catch(console.error); - event.waitUntil(reg); +// event.waitUntil(reg); });