diff --git a/CHANGELOG.md b/CHANGELOG.md index 622b02c..326be43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,14 @@ + +## Version 1.17.0 - 2026-01-03 + +update css, js, py files + +**Changes:** 4 files, 17 lines +**Languages:** CSS (11 lines), JavaScript (2 lines), Python (4 lines) + ## Version 1.16.0 - 2026-01-03 update css, js files diff --git a/pyproject.toml b/pyproject.toml index 5e0f399..b7a9d74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "Snek" -version = "1.16.0" +version = "1.17.0" readme = "README.md" #license = { file = "LICENSE", content-type="text/markdown" } description = "Snek Chat Application by Molodetz" diff --git a/src/snek/static/base.css b/src/snek/static/base.css index 0dd26fb..cd91467 100644 --- a/src/snek/static/base.css +++ b/src/snek/static/base.css @@ -295,7 +295,6 @@ footer { } .chat-input { - position: relative; padding: 15px; display: flex; align-items: center; diff --git a/src/snek/static/chat-input.js b/src/snek/static/chat-input.js index dc80133..b59e8bc 100644 --- a/src/snek/static/chat-input.js +++ b/src/snek/static/chat-input.js @@ -374,7 +374,7 @@ textToLeetAdvanced(text) { this.fileUploadGrid = new FileUploadGrid(); this.fileUploadGrid.setAttribute("channel", this.channelUid); this.fileUploadGrid.style.display = "none"; - this.appendChild(this.fileUploadGrid); + this.parentElement.insertBefore(this.fileUploadGrid, this); this.textarea.setAttribute("placeholder", "Type a message..."); this.textarea.setAttribute("rows", "2"); diff --git a/src/snek/static/file-upload-grid.css b/src/snek/static/file-upload-grid.css index 244b0ff..b5f9f3d 100644 --- a/src/snek/static/file-upload-grid.css +++ b/src/snek/static/file-upload-grid.css @@ -1,16 +1,12 @@ .fug-root { - position: absolute; - bottom: 100%; - left: 0; - right: 0; background: #111; border: 1px solid #333; border-radius: 8px; - margin-bottom: 8px; - z-index: 100; + padding: 8px; + margin: 0 15px 8px 15px; color: white; font-family: sans-serif; - max-width: 100%; + max-width: calc(100% - 30px); } .fug-grid { display: flex; diff --git a/src/snek/view/channel.py b/src/snek/view/channel.py index 6010c1d..b204cc4 100644 --- a/src/snek/view/channel.py +++ b/src/snek/view/channel.py @@ -203,16 +203,12 @@ class ChannelAttachmentUploadView(BaseView): pathlib.Path(attachment["path"]).parent.mkdir(parents=True, exist_ok=True) async with aiofiles.open(attachment["path"], "wb") as file: - print("File openend.", filename) async for msg in ws: if msg.type == web.WSMsgType.BINARY: - print("Binary",filename) if file is not None: await file.write(msg.data) await ws.send_json({"type": "progress", "filename": filename, "bytes": await file.tell()}) elif msg.type == web.WSMsgType.TEXT: - print("TExt",filename) - print(msg.json()) data = msg.json() if data.get('type') == 'end': relative_url = urllib.parse.quote(attachment["relative_url"])