vite打包
This commit is contained in:
1 parent
4fdbaa107a
commit
217fb08540
6 files changed
+1048
-2
No files matched your search
Generated
+1009
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "nodecrypt",
|
||||
"version": "1.0.0",
|
||||
"description": "- **登录与加入房间弹窗**:支持输入用户名、房间名、房间密码,禁止输入空格和特殊符号,支持通过分享链接自动填充房间信息。\r - **房间分享链接自动生成与复制**:可一键生成当前房间的专属链接(含密码),并复制到剪贴板,便于邀请他人加入。\r - **多房间(节点)支持**:可同时加入多个房间,左侧房间栏支持动态切换,房间状态独立保存。\r - **聊天消息实时同步**:支持文本与图片消息,消息自动同步到所有在线成员。\r - **图片粘贴、拖拽、附件上传发送**:支持直接粘贴、拖拽图片或通过附件按钮上传图片,自动压缩大图片,限制单张图片最大5MB。\r - **图片可点击全屏预览**:聊天图片点击后可全屏预览,支持缩放、拖动、双击还原,ESC或点击关闭。\r - **系统消息提示**:如用户加入/退出、房间状态变更等,系统消息以特殊气泡样式居中显示。\r - **在线成员列表实时更新**:右侧成员栏实时显示在线成员昵称与头像,自动区分自己与他人。\r - **支持自定义头像**:基于用户名自动生成 SVG 头像,所有头像样式统一,支持昵称变更自动刷新头像。\r - **输入框多行自适应高度**:输入区高度随内容自动扩展,支持多行输入,采用 Telegram 风格占位符。\r - **禁止用户名、房间名、密码输入空格和特殊符号**:输入时自动过滤,提升安全性和一致性。\r - **响应式布局**:支持侧边栏和右侧成员栏宽度拖拽调整,适配不同屏幕宽度。\r - **前端防止 XSS 攻击**:所有用户输入内容均进行 HTML 转义,防止脚本注入。\r - **退出房间彻底销毁连接**:退出房间时断开与服务器的连接,清理房间数据,支持全部房间关闭后自动刷新页面。\r - **主要交互均有动画与友好提示**:如菜单弹出、系统消息、按钮反馈等,提升用户体验。",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "vite build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/shuaiplus/NodeCrypt.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/shuaiplus/NodeCrypt/issues"
|
||||
},
|
||||
"homepage": "https://github.com/shuaiplus/NodeCrypt#readme",
|
||||
"devDependencies": {
|
||||
"vite": "^6.3.5"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
root: 'web',
|
||||
base: './', // 关键配置,生成相对路径
|
||||
build: {
|
||||
outDir: '../dist',
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
input: 'web/index.html',
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -112,7 +112,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="./NodeCrypt.js"></script>
|
||||
<script type="module" src="./main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,6 +2,7 @@ import { processImage, setupImageSend } from './util.image.js';
|
||||
import { createAvatarSVG } from './util.avatar.js';
|
||||
import { setupEmojiPicker } from './util.emoji.js';
|
||||
import { openSettingsPanel, closeSettingsPanel, initSettings, notifyMessage } from './util.settings.js';
|
||||
import './NodeCrypt.js';
|
||||
|
||||
/*const config = {
|
||||
rsaPublic: 'CHATCRYPT_PUBLIC_KEY',
|
||||
|
||||
+1
-1
@@ -314,7 +314,7 @@ body {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.main::before {
|
||||
.main::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
|
||||
Reference in new issue
Block a user