From a614102de339afa87c5d3b81329094129a403401 Mon Sep 17 00:00:00 2001 From: Therainclouds <245141853@qq.com> Date: Fri, 13 Feb 2026 12:33:43 +0800 Subject: [PATCH] first commit --- .dockerignore | 69 + .gitignore | 187 + .trae/documents/增加内网资产应用及美化页面.md | 45 + .vscode/settings.json | 3 + DEPLOY_NOTES.md | 118 + Dockerfile | 42 + README.md | 177 + deploy.sh | 648 ++ deploy_fixed.sh | 243 + docker-compose.yml | 25 + image/avatar/ag.png | Bin 0 -> 1722719 bytes image/avatar/azhi.png | Bin 0 -> 1643370 bytes image/avatar/changfeng.png | Bin 0 -> 2046890 bytes image/avatar/hongzong.png | Bin 0 -> 1296277 bytes image/avatar/liwei.png | Bin 0 -> 1332377 bytes image/avatar/server.png | Bin 0 -> 3156 bytes image/avatar/xiaoji.png | Bin 0 -> 1958306 bytes image/logo2.png | Bin 0 -> 101947 bytes image/logo_w.ico | Bin 0 -> 7472 bytes main.py | 1771 +++++ nginx.conf | 57 + pre_deploy_check.sh | 74 + remote_deploy_script.sh | 415 ++ requirements.txt | 7 + start.sh | 172 + templates/chat.html | 6058 ++++++++++++++++ templates/index.html | 6359 +++++++++++++++++ templates/login.html | 458 ++ test_chat.html | 125 + 29 files changed, 17053 insertions(+) create mode 100644 .dockerignore create mode 100644 .gitignore create mode 100644 .trae/documents/增加内网资产应用及美化页面.md create mode 100644 .vscode/settings.json create mode 100644 DEPLOY_NOTES.md create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 deploy.sh create mode 100644 deploy_fixed.sh create mode 100644 docker-compose.yml create mode 100644 image/avatar/ag.png create mode 100644 image/avatar/azhi.png create mode 100644 image/avatar/changfeng.png create mode 100644 image/avatar/hongzong.png create mode 100644 image/avatar/liwei.png create mode 100644 image/avatar/server.png create mode 100644 image/avatar/xiaoji.png create mode 100644 image/logo2.png create mode 100644 image/logo_w.ico create mode 100644 main.py create mode 100644 nginx.conf create mode 100644 pre_deploy_check.sh create mode 100644 remote_deploy_script.sh create mode 100644 requirements.txt create mode 100644 start.sh create mode 100644 templates/chat.html create mode 100644 templates/index.html create mode 100644 templates/login.html create mode 100644 test_chat.html diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9179de1 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,69 @@ +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# Virtual environments +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ +.env +.venv + +# Testing +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.pytest_cache/ +htmlcov/ + +# IDEs +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Project specific +uploads/* +!uploads/.gitkeep +*.log +.git/ +README.md + +# Docker +Dockerfile +docker-compose.yml +nginx.conf \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b80352 --- /dev/null +++ b/.gitignore @@ -0,0 +1,187 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# macOS +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# Windows +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# Application specific +uploads/ +logs/ +database/ +chat_history/ diff --git a/.trae/documents/增加内网资产应用及美化页面.md b/.trae/documents/增加内网资产应用及美化页面.md new file mode 100644 index 0000000..6a4bccd --- /dev/null +++ b/.trae/documents/增加内网资产应用及美化页面.md @@ -0,0 +1,45 @@ +# 增加内网资产应用跳转及样式美化计划 + +我将在 `templates/index.html` 中添加一个新的“应用服务”板块,包含您指定的6个应用跳转项,并对弹出的内网资产页面(二级页面)进行样式美化。 + +## 1. 新增应用服务板块 + +在“台式机资源”下方新增一个 `
`,标题为“应用服务”,包含以下应用: + +* **it-tools**: 端口 40116 (图标: `fa-toolbox`) + +* **langflow**: 端口 7860 (图标: `fa-wind`) + +* **n8n**: 端口 5678 (图标: `fa-project-diagram`) + +* **certimate**: 端口 8090 (图标: `fa-certificate`) + +* **ntfy**: 端口 40265 (图标: `fa-comment-dots`) + +* **screego**: 端口 5050 (图标: `fa-desktop`) + +* QR-code生成 + +地址统一为 `6.6.6.66`。 + +## 2. 样式美化 (CSS) + +我将更新 JavaScript 中动态注入的 CSS 样式,以美化弹出的二级页面: + +* **整体容器**: 优化 `.internal-assets-container` 的滚动体验和间距。 + +* **列表项**: 增强 `.asset-item` 的视觉效果,添加更明显的悬停 (Hover) 效果和阴影。 + +* **凭证详情**: 美化 `.asset-credentials` 区域(虽然新应用暂无凭证,但优化现有凭证的展示): + + * 添加展开动画 (`slideDown`)。 + + * 优化账号/密码显示框的样式,使其看起来更像代码块或卡片。 + + * 调整复制按钮的样式。 + +## 3. 实现步骤 + +1. 编辑 `templates/index.html`,在 `modalBody.innerHTML` 的模板字符串中插入新的 HTML 结构。 +2. 在同一个文件的 ` + + +
+ + + + +
+
+ +
+ Logo + 内网群聊 +
+
+ + 在线 + + + + +
+
+
+
+ +

释放发送文件

+
+ +
+
+ + + + +
+
+
+ + + + + + + \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..4dab55b --- /dev/null +++ b/templates/index.html @@ -0,0 +1,6359 @@ + + + + + + 叠加态 - 局域网文件传输 + + + + + +
+ + + +
+
+ + + +
+
+ +
+ + + +
+
+
+ +
+
+ +

拖拽文件或文件夹到这里上传

+

支持多文件和文件夹上传

+
+ + +
+ + +
+ +
+ +
+ +
+
+ +
+ + +
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/templates/login.html b/templates/login.html new file mode 100644 index 0000000..5d1450c --- /dev/null +++ b/templates/login.html @@ -0,0 +1,458 @@ + + + + + + 登录 - 局域网聊天室 + + + + + +
+ + +
+
+ +
+ +
+ + +
+
+ + +
+ +
+
+
+ + 安全可靠 +
+
+ + 实时聊天 +
+
+ + 文件传输 +
+
+ + 群聊私聊 +
+
+
+ + +
+ + + + \ No newline at end of file diff --git a/test_chat.html b/test_chat.html new file mode 100644 index 0000000..a1c1ad4 --- /dev/null +++ b/test_chat.html @@ -0,0 +1,125 @@ + + + + 聊天测试 + + + +

聊天测试

+
未连接
+
+ + + + + + + \ No newline at end of file