mirror of
https://gitee.com/HuLaSpark/HuLa.git
synced 2024-11-29 10:18:35 +08:00
commit
d678f3d7b4
@ -9,8 +9,5 @@ index.html
|
||||
src/assets
|
||||
.eslintrc.cjs
|
||||
**/config
|
||||
/src-tauri/*
|
||||
.gitee
|
||||
.github
|
||||
commitlint.config.cjs
|
||||
auto-imports.d.ts
|
@ -5,5 +5,4 @@
|
||||
**/*.svg
|
||||
**/*.sh
|
||||
/public/*
|
||||
/src-tauri/*
|
||||
auto-imports.d.ts
|
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,3 +1,13 @@
|
||||
|
||||
|
||||
## [2.5.2](https://github.com/HuLaSpark/HuLa/compare/v2.5.1...v2.5.2) (2024-10-31)
|
||||
|
||||
|
||||
### 🐛 Bug Fixes | Bug 修复
|
||||
|
||||
* **build:** :bug: 升级wry版本修复mac安装报错问题 ([fefa2f9](https://github.com/HuLaSpark/HuLa/commit/fefa2f970305839064764cd1d82a0d8e557f3148))
|
||||
* **component:** :bug: 修复聊天框内右键菜单问题 ([e59630b](https://github.com/HuLaSpark/HuLa/commit/e59630b70ed0d245174c97136d502bb63cac03ec))
|
||||
|
||||
## [2.5.1](https://github.com/HuLaSpark/HuLa/compare/v2.5.0...v2.5.1) (2024-10-29)
|
||||
|
||||
### 🐛 Bug Fixes | Bug 修复
|
||||
|
14
README.md
14
README.md
@ -84,6 +84,20 @@ pnpm run tauri:dev
|
||||
pnpm run tauri:build
|
||||
```
|
||||
|
||||
## ⚠️ Precautions(macOS Users)
|
||||
|
||||
Downloading the installation package on the web page will indicate that the installation package is corrupted, and you may encounter a certificate issue, which is caused by the security mechanism of the macOS system. Follow these steps to solve:
|
||||
|
||||
#### 1. Open "System Settings" - "Security & Privacy", as shown in the figure, check the box: Allow apps downloaded from "Any Source" to run:
|
||||
|
||||
![img.png](preview/img_9.png)
|
||||
|
||||
#### 2. If an error is reported, run the following command in the terminal to resolve the problem:
|
||||
|
||||
```bash
|
||||
sudo xattr -rd com.apple.quarantine the Path To Install The Package/HuLa.app
|
||||
```
|
||||
|
||||
## SubmissionSpecification
|
||||
|
||||
use **pnpm run commit** to invoke the _git commit_ interaction and follow the prompts to complete the input and selection of information
|
||||
|
@ -84,6 +84,20 @@ pnpm run tauri:dev
|
||||
pnpm run tauri:build
|
||||
```
|
||||
|
||||
## ⚠️ 注意事项(macOS用户)
|
||||
|
||||
网页上下载安装包会提示安装包已损坏,可能会遇到证书问题,这是因为 macOS 系统的安全机制导致的。请按照以下步骤解决:
|
||||
|
||||
#### 1. 打开 “系统设置” - “安全性与隐私”,如图勾选:允许 “任何来源” 下载的 App 运行:
|
||||
|
||||
![img.png](preview/img_9.png)
|
||||
|
||||
#### 2. 如果还报错,请在终端执行以下命令解决:
|
||||
|
||||
```bash
|
||||
sudo xattr -rd com.apple.quarantine 你的安装包路径/HuLa.app
|
||||
```
|
||||
|
||||
## 提交规范
|
||||
|
||||
执行 **pnpm run commit** 唤起 _git commit_ 交互,根据提示完成信息的输入和选择
|
||||
|
@ -1,44 +0,0 @@
|
||||
import pkg from '../../package.json'
|
||||
|
||||
/**
|
||||
* 启动时打印信息
|
||||
* @param env 环境变量
|
||||
* @param mode 运行模式
|
||||
*/
|
||||
export const atStartup = (env: { [key: string]: string }, mode: string) => {
|
||||
return () => {
|
||||
if (mode === 'dev') {
|
||||
console.log(
|
||||
` 🍀 ${'\x1b[32m'}${'\x1b[38;2;19;152;127m'}${env.VITE_APP_NAME} ${'\x1b[0m'}${'\x1b[90m'}${pkg.version}${'\x1b[0m'}`
|
||||
)
|
||||
console.log(
|
||||
` ${'\u001b[38;2;26;178;146m'}${'\x1b[1m'}${'➜'}${'\x1b[0m'} ` +
|
||||
`${'当前环境: '}` +
|
||||
`${'\x1b[38;2;215;95;135m'}${mode}${'\x1b[0m'}`
|
||||
)
|
||||
console.log(
|
||||
` ${'\u001b[38;2;26;178;146m'}${'\x1b[1m'}${'➜'}${'\x1b[0m'} ${'\x1b[38;2;0;215;175m'}${'\x1b[1m'}${'Vue'}${'\x1b[0m'}: ` +
|
||||
`${'\x1b[90m'}${pkg.dependencies.vue}${'\x1b[0m'}` +
|
||||
` ${'\x1b[38;2;95;215;255m'}${'\x1b[1m'}${'Vite'}${'\x1b[0m'}: ` +
|
||||
`${'\x1b[90m'}${pkg.devDependencies.vite}${'\x1b[0m'}` +
|
||||
` ${'\u001b[38;5;33m'}${'\x1b[1m'}${'Node.js'}${'\x1b[0m'}: ` +
|
||||
`${'\x1b[90m'}${process.version}${'\x1b[0m'}`
|
||||
)
|
||||
console.log(
|
||||
` ${'\u001b[38;2;26;178;146m'}${'\x1b[1m'}${'➜'}${'\x1b[0m'} ` +
|
||||
`当前 ${'\x1b[38;2;215;135;0m'}${'\x1b[1m'}Tauri${'\x1b[0m'} 版本: `,
|
||||
`${'\x1b[90m'}${pkg.dependencies['@tauri-apps/api']}${'\x1b[0m'}`
|
||||
)
|
||||
console.log(
|
||||
` ${'\u001b[38;2;26;178;146m'}${'\x1b[1m'}${'\u001b[2m'}${'➜'}${'\x1b[0m'} ` +
|
||||
'后端服务地址: ' +
|
||||
`${'\x1b[38;2;95;175;255m'}https://github.com/nongyehong/HuLa-IM-Server${'\x1b[0m'}`
|
||||
)
|
||||
console.log(
|
||||
` ${'\u001b[38;2;26;178;146m'}${'\x1b[1m'}${'\u001b[2m'}${'➜'}${'\x1b[0m'} ` +
|
||||
'项目地址: ' +
|
||||
`${pkg.author.url}`
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "hula",
|
||||
"type": "module",
|
||||
"version": "2.5.1",
|
||||
"version": "2.5.2",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=18.12.0",
|
||||
@ -16,7 +16,7 @@
|
||||
"url": "https://github.com/HuLaSpark/HuLa"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.*": [
|
||||
"*.{js,jsx,vue,ts,tsx,json}": [
|
||||
"oxlint src",
|
||||
"prettier . --write",
|
||||
"eslint src"
|
||||
@ -65,7 +65,7 @@
|
||||
"@release-it/bumper": "^6.0.1",
|
||||
"@release-it/conventional-changelog": "8.0.2",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@tauri-apps/cli": "2.0.0",
|
||||
"@tauri-apps/cli": "2.0.4",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^20.14.14",
|
||||
"@typescript-eslint/eslint-plugin": "7.1.0",
|
||||
@ -94,7 +94,7 @@
|
||||
"typescript": "^5.6.2",
|
||||
"unplugin-auto-import": "^0.18.2",
|
||||
"unplugin-vue-components": "^0.27.4",
|
||||
"vite": "5.4.8",
|
||||
"vite": "5.4.10",
|
||||
"vue-tsc": "^2.1.4"
|
||||
},
|
||||
"config": {
|
||||
|
4957
pnpm-lock.yaml
4957
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
BIN
preview/img_9.png
Normal file
BIN
preview/img_9.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 181 KiB |
66
src-tauri/Cargo.lock
generated
66
src-tauri/Cargo.lock
generated
@ -456,9 +456,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "brotli"
|
||||
version = "6.0.0"
|
||||
version = "7.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b"
|
||||
checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd"
|
||||
dependencies = [
|
||||
"alloc-no-stdlib",
|
||||
"alloc-stdlib",
|
||||
@ -2459,7 +2459,19 @@ version = "2.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5b1fb8864823fad91877e6caea0baca82e49e8db50f8e5c9f9a453e27d3330fc"
|
||||
dependencies = [
|
||||
"jsonptr",
|
||||
"jsonptr 0.4.7",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "json-patch"
|
||||
version = "3.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08"
|
||||
dependencies = [
|
||||
"jsonptr 0.6.3",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
@ -2476,6 +2488,16 @@ dependencies = [
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jsonptr"
|
||||
version = "0.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5dea2b27dd239b2556ed7a25ba842fe47fd602e7fc7433c2a8d6106d4d9edd70"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "keyboard-types"
|
||||
version = "0.7.0"
|
||||
@ -4828,9 +4850,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
||||
|
||||
[[package]]
|
||||
name = "tauri"
|
||||
version = "2.0.3"
|
||||
version = "2.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd96d46534b10765ce0c6208f9451d98ea38636364a41b272d3610c70dd0e4c3"
|
||||
checksum = "d3889b392db6d32a105d3757230ea0220090b8f94c90d3e60b6c5eb91178ab1b"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bytes",
|
||||
@ -4879,16 +4901,16 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-build"
|
||||
version = "2.0.1"
|
||||
version = "2.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "935f9b3c49b22b3e2e485a57f46d61cd1ae07b1cbb2ba87387a387caf2d8c4e7"
|
||||
checksum = "9f96827ccfb1aa40d55d0ded79562d18ba18566657a553f992a982d755148376"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cargo_toml",
|
||||
"dirs 5.0.1",
|
||||
"glob",
|
||||
"heck 0.5.0",
|
||||
"json-patch",
|
||||
"json-patch 3.0.1",
|
||||
"schemars",
|
||||
"semver",
|
||||
"serde",
|
||||
@ -4901,14 +4923,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-codegen"
|
||||
version = "2.0.1"
|
||||
version = "2.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "95d7443dd4f0b597704b6a14b964ee2ed16e99928d8e6292ae9825f09fbcd30e"
|
||||
checksum = "8947f16f47becd9e9cd39b74ee337fd1981574d78819be18e4384d85e5a0b82f"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"brotli",
|
||||
"ico",
|
||||
"json-patch",
|
||||
"json-patch 2.0.0",
|
||||
"plist",
|
||||
"png",
|
||||
"proc-macro2",
|
||||
@ -4928,9 +4950,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-macros"
|
||||
version = "2.0.1"
|
||||
version = "2.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4d2c0963ccfc3f5194415f2cce7acc975942a8797fbabfb0aa1ed6f59326ae7f"
|
||||
checksum = "8bd1c8d4a66799d3438747c3a79705cd665a95d6f24cb5f315413ff7a981fe2a"
|
||||
dependencies = [
|
||||
"heck 0.5.0",
|
||||
"proc-macro2",
|
||||
@ -5183,9 +5205,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime"
|
||||
version = "2.1.0"
|
||||
version = "2.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8f437293d6f5e5dce829250f4dbdce4e0b52905e297a6689cc2963eb53ac728"
|
||||
checksum = "a1ef7363e7229ac8d04e8a5d405670dbd43dde8fc4bc3bc56105c35452d03784"
|
||||
dependencies = [
|
||||
"dpi",
|
||||
"gtk",
|
||||
@ -5202,9 +5224,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime-wry"
|
||||
version = "2.1.0"
|
||||
version = "2.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aaac63b65df8e85570993eaf93ae1dd73a6fb66d8bd99674ce65f41dc3c63e7d"
|
||||
checksum = "62fa2068e8498ad007b54d5773d03d57c3ff6dd96f8c8ce58beff44d0d5e0d30"
|
||||
dependencies = [
|
||||
"gtk",
|
||||
"http",
|
||||
@ -5228,9 +5250,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tauri-utils"
|
||||
version = "2.0.1"
|
||||
version = "2.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c38b0230d6880cf6dd07b6d7dd7789a0869f98ac12146e0d18d1c1049215a045"
|
||||
checksum = "1fc65d6f5c54e56b66258948a6d9e47a82ea41f4b5a7612bfbdd1634c2913ed0"
|
||||
dependencies = [
|
||||
"brotli",
|
||||
"cargo_metadata",
|
||||
@ -5239,7 +5261,7 @@ dependencies = [
|
||||
"glob",
|
||||
"html5ever",
|
||||
"infer",
|
||||
"json-patch",
|
||||
"json-patch 2.0.0",
|
||||
"kuchikiki",
|
||||
"log",
|
||||
"memchr",
|
||||
@ -6492,9 +6514,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wry"
|
||||
version = "0.46.0"
|
||||
version = "0.46.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "469a3765ecc3e8aa9ccdf3c5a52c82697ec03037cd60494488763880d31a1b3a"
|
||||
checksum = "cd5cdf57c66813d97601181349c63b96994b3074fc3d7a31a8cce96e968e3bbd"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"block2",
|
||||
|
@ -17,10 +17,10 @@ strip = true # 删除调试符号
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.0.1", features = [] }
|
||||
tauri-build = { version = "2.0.2", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "2.0.2", features = [ "macos-private-api", "tray-icon", "image-png"] }
|
||||
tauri = { version = "2.0.6", features = [ "macos-private-api", "tray-icon", "image-png"] }
|
||||
tauri-plugin-os = "2.0.1"
|
||||
tauri-plugin-shell = "2.0.1"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
|
File diff suppressed because one or more lines are too long
@ -1 +1,72 @@
|
||||
{"default":{"identifier":"default","description":"Capability for the main window","local":true,"windows":["*"],"permissions":["core:window:default","core:window:allow-create","core:window:allow-start-dragging","core:window:allow-close","core:window:allow-hide","core:window:allow-center","core:window:allow-show","core:window:allow-maximize","core:window:allow-minimize","core:window:allow-destroy","core:window:allow-is-focused","core:window:allow-is-fullscreen","core:window:allow-set-focus","core:window:allow-set-position","core:window:allow-scale-factor","core:window:allow-unminimize","core:window:allow-set-always-on-top","core:window:allow-set-size","core:window:allow-set-min-size","core:window:allow-unmaximize","core:window:allow-set-fullscreen","core:webview:allow-create-webview","core:webview:allow-create-webview-window","core:webview:allow-internal-toggle-devtools","core:webview:allow-set-webview-size","core:webview:allow-webview-size","core:event:default","core:event:allow-listen","os:default","os:allow-os-type","os:allow-arch","os:allow-version","os:allow-hostname","process:default","process:allow-exit","clipboard-manager:allow-clear","clipboard-manager:allow-write-image","http:allow-fetch","http:allow-fetch-cancel","http:allow-fetch-read-body","http:allow-fetch-send","core:tray:default","core:tray:allow-get-by-id","shell:default","shell:allow-open","autostart:allow-enable","autostart:allow-disable","autostart:allow-is-enabled","dialog:allow-confirm","core:resources:allow-close",{"identifier":"http:default","allow":[{"url":"http://**"},{"url":"https://**"},{"url":"http://*:*"},{"url":"https://*:*"}]}]},"desktop-capability":{"identifier":"desktop-capability","description":"","local":true,"windows":["home"],"permissions":["updater:default","updater:allow-check","updater:allow-download","updater:allow-install"],"platforms":["macOS","windows","linux"]}}
|
||||
{
|
||||
"default": {
|
||||
"identifier": "default",
|
||||
"description": "Capability for the main window",
|
||||
"local": true,
|
||||
"windows": ["*"],
|
||||
"permissions": [
|
||||
"core:window:default",
|
||||
"core:window:allow-create",
|
||||
"core:window:allow-start-dragging",
|
||||
"core:window:allow-close",
|
||||
"core:window:allow-hide",
|
||||
"core:window:allow-center",
|
||||
"core:window:allow-show",
|
||||
"core:window:allow-maximize",
|
||||
"core:window:allow-minimize",
|
||||
"core:window:allow-destroy",
|
||||
"core:window:allow-is-focused",
|
||||
"core:window:allow-is-fullscreen",
|
||||
"core:window:allow-set-focus",
|
||||
"core:window:allow-set-position",
|
||||
"core:window:allow-scale-factor",
|
||||
"core:window:allow-unminimize",
|
||||
"core:window:allow-set-always-on-top",
|
||||
"core:window:allow-set-size",
|
||||
"core:window:allow-set-min-size",
|
||||
"core:window:allow-unmaximize",
|
||||
"core:window:allow-set-fullscreen",
|
||||
"core:webview:allow-create-webview",
|
||||
"core:webview:allow-create-webview-window",
|
||||
"core:webview:allow-internal-toggle-devtools",
|
||||
"core:webview:allow-set-webview-size",
|
||||
"core:webview:allow-webview-size",
|
||||
"core:event:default",
|
||||
"core:event:allow-listen",
|
||||
"os:default",
|
||||
"os:allow-os-type",
|
||||
"os:allow-arch",
|
||||
"os:allow-version",
|
||||
"os:allow-hostname",
|
||||
"process:default",
|
||||
"process:allow-exit",
|
||||
"clipboard-manager:allow-clear",
|
||||
"clipboard-manager:allow-write-image",
|
||||
"http:allow-fetch",
|
||||
"http:allow-fetch-cancel",
|
||||
"http:allow-fetch-read-body",
|
||||
"http:allow-fetch-send",
|
||||
"core:tray:default",
|
||||
"core:tray:allow-get-by-id",
|
||||
"shell:default",
|
||||
"shell:allow-open",
|
||||
"autostart:allow-enable",
|
||||
"autostart:allow-disable",
|
||||
"autostart:allow-is-enabled",
|
||||
"dialog:allow-confirm",
|
||||
"core:resources:allow-close",
|
||||
{
|
||||
"identifier": "http:default",
|
||||
"allow": [{ "url": "http://**" }, { "url": "https://**" }, { "url": "http://*:*" }, { "url": "https://*:*" }]
|
||||
}
|
||||
]
|
||||
},
|
||||
"desktop-capability": {
|
||||
"identifier": "desktop-capability",
|
||||
"description": "",
|
||||
"local": true,
|
||||
"windows": ["home"],
|
||||
"permissions": ["updater:default", "updater:allow-check", "updater:allow-download", "updater:allow-install"],
|
||||
"platforms": ["macOS", "windows", "linux"]
|
||||
}
|
||||
}
|
||||
|
@ -21,9 +21,7 @@
|
||||
{
|
||||
"description": "A list of capabilities.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"capabilities"
|
||||
],
|
||||
"required": ["capabilities"],
|
||||
"properties": {
|
||||
"capabilities": {
|
||||
"description": "The list of capabilities.",
|
||||
@ -39,10 +37,7 @@
|
||||
"Capability": {
|
||||
"description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, \"platforms\": [\"macOS\",\"windows\"] } ```",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"identifier",
|
||||
"permissions"
|
||||
],
|
||||
"required": ["identifier", "permissions"],
|
||||
"properties": {
|
||||
"identifier": {
|
||||
"description": "Identifier of the capability.\n\n## Example\n\n`main-user-files-write`",
|
||||
@ -93,10 +88,7 @@
|
||||
},
|
||||
"platforms": {
|
||||
"description": "Limit which target platforms this capability applies to.\n\nBy default all platforms are targeted.\n\n## Example\n\n`[\"macOS\",\"windows\"]`",
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"type": ["array", "null"],
|
||||
"items": {
|
||||
"$ref": "#/definitions/Target"
|
||||
}
|
||||
@ -106,9 +98,7 @@
|
||||
"CapabilityRemote": {
|
||||
"description": "Configuration for remote URLs that are associated with the capability.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"urls"
|
||||
],
|
||||
"required": ["urls"],
|
||||
"properties": {
|
||||
"urls": {
|
||||
"description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n## Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api",
|
||||
@ -1586,9 +1576,7 @@
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"path"
|
||||
],
|
||||
"required": ["path"],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "FS scope path.",
|
||||
@ -1610,9 +1598,7 @@
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"path"
|
||||
],
|
||||
"required": ["path"],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "FS scope path.",
|
||||
@ -1703,9 +1689,7 @@
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"url"
|
||||
],
|
||||
"required": ["url"],
|
||||
"properties": {
|
||||
"url": {
|
||||
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
||||
@ -1727,9 +1711,7 @@
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"url"
|
||||
],
|
||||
"required": ["url"],
|
||||
"properties": {
|
||||
"url": {
|
||||
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
||||
@ -1826,10 +1808,7 @@
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"cmd",
|
||||
"name"
|
||||
],
|
||||
"required": ["cmd", "name"],
|
||||
"properties": {
|
||||
"args": {
|
||||
"description": "The allowed arguments for the command execution.",
|
||||
@ -1852,10 +1831,7 @@
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"sidecar"
|
||||
],
|
||||
"required": ["name", "sidecar"],
|
||||
"properties": {
|
||||
"args": {
|
||||
"description": "The allowed arguments for the command execution.",
|
||||
@ -1886,10 +1862,7 @@
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"cmd",
|
||||
"name"
|
||||
],
|
||||
"required": ["cmd", "name"],
|
||||
"properties": {
|
||||
"args": {
|
||||
"description": "The allowed arguments for the command execution.",
|
||||
@ -1912,10 +1885,7 @@
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"sidecar"
|
||||
],
|
||||
"required": ["name", "sidecar"],
|
||||
"properties": {
|
||||
"args": {
|
||||
"description": "The allowed arguments for the command execution.",
|
||||
@ -1964,20 +1934,14 @@
|
||||
},
|
||||
"allow": {
|
||||
"description": "Data that defines what is allowed by the scope.",
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"type": ["array", "null"],
|
||||
"items": {
|
||||
"$ref": "#/definitions/Value"
|
||||
}
|
||||
},
|
||||
"deny": {
|
||||
"description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.",
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"type": ["array", "null"],
|
||||
"items": {
|
||||
"$ref": "#/definitions/Value"
|
||||
}
|
||||
@ -1985,9 +1949,7 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"required": [
|
||||
"identifier"
|
||||
]
|
||||
"required": ["identifier"]
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -5481,37 +5443,27 @@
|
||||
{
|
||||
"description": "MacOS.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"macOS"
|
||||
]
|
||||
"enum": ["macOS"]
|
||||
},
|
||||
{
|
||||
"description": "Windows.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"windows"
|
||||
]
|
||||
"enum": ["windows"]
|
||||
},
|
||||
{
|
||||
"description": "Linux.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"linux"
|
||||
]
|
||||
"enum": ["linux"]
|
||||
},
|
||||
{
|
||||
"description": "Android.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"android"
|
||||
]
|
||||
"enum": ["android"]
|
||||
},
|
||||
{
|
||||
"description": "iOS.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"iOS"
|
||||
]
|
||||
"enum": ["iOS"]
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -5525,9 +5477,7 @@
|
||||
{
|
||||
"description": "A variable that is set while calling the command from the webview API.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"validator"
|
||||
],
|
||||
"required": ["validator"],
|
||||
"properties": {
|
||||
"raw": {
|
||||
"description": "Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.",
|
||||
@ -5560,4 +5510,4 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,9 +21,7 @@
|
||||
{
|
||||
"description": "A list of capabilities.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"capabilities"
|
||||
],
|
||||
"required": ["capabilities"],
|
||||
"properties": {
|
||||
"capabilities": {
|
||||
"description": "The list of capabilities.",
|
||||
@ -39,10 +37,7 @@
|
||||
"Capability": {
|
||||
"description": "A grouping and boundary mechanism developers can use to isolate access to the IPC layer.\n\nIt controls application windows fine grained access to the Tauri core, application, or plugin commands. If a window is not matching any capability then it has no access to the IPC layer at all.\n\nThis can be done to create groups of windows, based on their required system access, which can reduce impact of frontend vulnerabilities in less privileged windows. Windows can be added to a capability by exact name (e.g. `main-window`) or glob patterns like `*` or `admin-*`. A Window can have none, one, or multiple associated capabilities.\n\n## Example\n\n```json { \"identifier\": \"main-user-files-write\", \"description\": \"This capability allows the `main` window on macOS and Windows access to `filesystem` write related commands and `dialog` commands to enable programatic access to files selected by the user.\", \"windows\": [ \"main\" ], \"permissions\": [ \"core:default\", \"dialog:open\", { \"identifier\": \"fs:allow-write-text-file\", \"allow\": [{ \"path\": \"$HOME/test.txt\" }] }, \"platforms\": [\"macOS\",\"windows\"] } ```",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"identifier",
|
||||
"permissions"
|
||||
],
|
||||
"required": ["identifier", "permissions"],
|
||||
"properties": {
|
||||
"identifier": {
|
||||
"description": "Identifier of the capability.\n\n## Example\n\n`main-user-files-write`",
|
||||
@ -93,10 +88,7 @@
|
||||
},
|
||||
"platforms": {
|
||||
"description": "Limit which target platforms this capability applies to.\n\nBy default all platforms are targeted.\n\n## Example\n\n`[\"macOS\",\"windows\"]`",
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"type": ["array", "null"],
|
||||
"items": {
|
||||
"$ref": "#/definitions/Target"
|
||||
}
|
||||
@ -106,9 +98,7 @@
|
||||
"CapabilityRemote": {
|
||||
"description": "Configuration for remote URLs that are associated with the capability.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"urls"
|
||||
],
|
||||
"required": ["urls"],
|
||||
"properties": {
|
||||
"urls": {
|
||||
"description": "Remote domains this capability refers to using the [URLPattern standard](https://urlpattern.spec.whatwg.org/).\n\n## Examples\n\n- \"https://*.mydomain.dev\": allows subdomains of mydomain.dev - \"https://mydomain.dev/api/*\": allows any subpath of mydomain.dev/api",
|
||||
@ -1586,9 +1576,7 @@
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"path"
|
||||
],
|
||||
"required": ["path"],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "FS scope path.",
|
||||
@ -1610,9 +1598,7 @@
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"path"
|
||||
],
|
||||
"required": ["path"],
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "FS scope path.",
|
||||
@ -1703,9 +1689,7 @@
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"url"
|
||||
],
|
||||
"required": ["url"],
|
||||
"properties": {
|
||||
"url": {
|
||||
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
||||
@ -1727,9 +1711,7 @@
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"url"
|
||||
],
|
||||
"required": ["url"],
|
||||
"properties": {
|
||||
"url": {
|
||||
"description": "A URL that can be accessed by the webview when using the HTTP APIs. Wildcards can be used following the URL pattern standard.\n\nSee [the URL Pattern spec](https://urlpattern.spec.whatwg.org/) for more information.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin on port 443\n\n- \"https://*:*\" : allows all HTTPS origin on any port\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
||||
@ -1826,10 +1808,7 @@
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"cmd",
|
||||
"name"
|
||||
],
|
||||
"required": ["cmd", "name"],
|
||||
"properties": {
|
||||
"args": {
|
||||
"description": "The allowed arguments for the command execution.",
|
||||
@ -1852,10 +1831,7 @@
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"sidecar"
|
||||
],
|
||||
"required": ["name", "sidecar"],
|
||||
"properties": {
|
||||
"args": {
|
||||
"description": "The allowed arguments for the command execution.",
|
||||
@ -1886,10 +1862,7 @@
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"cmd",
|
||||
"name"
|
||||
],
|
||||
"required": ["cmd", "name"],
|
||||
"properties": {
|
||||
"args": {
|
||||
"description": "The allowed arguments for the command execution.",
|
||||
@ -1912,10 +1885,7 @@
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"sidecar"
|
||||
],
|
||||
"required": ["name", "sidecar"],
|
||||
"properties": {
|
||||
"args": {
|
||||
"description": "The allowed arguments for the command execution.",
|
||||
@ -1964,20 +1934,14 @@
|
||||
},
|
||||
"allow": {
|
||||
"description": "Data that defines what is allowed by the scope.",
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"type": ["array", "null"],
|
||||
"items": {
|
||||
"$ref": "#/definitions/Value"
|
||||
}
|
||||
},
|
||||
"deny": {
|
||||
"description": "Data that defines what is denied by the scope. This should be prioritized by validation logic.",
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"type": ["array", "null"],
|
||||
"items": {
|
||||
"$ref": "#/definitions/Value"
|
||||
}
|
||||
@ -1985,9 +1949,7 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"required": [
|
||||
"identifier"
|
||||
]
|
||||
"required": ["identifier"]
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -5481,37 +5443,27 @@
|
||||
{
|
||||
"description": "MacOS.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"macOS"
|
||||
]
|
||||
"enum": ["macOS"]
|
||||
},
|
||||
{
|
||||
"description": "Windows.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"windows"
|
||||
]
|
||||
"enum": ["windows"]
|
||||
},
|
||||
{
|
||||
"description": "Linux.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"linux"
|
||||
]
|
||||
"enum": ["linux"]
|
||||
},
|
||||
{
|
||||
"description": "Android.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"android"
|
||||
]
|
||||
"enum": ["android"]
|
||||
},
|
||||
{
|
||||
"description": "iOS.",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"iOS"
|
||||
]
|
||||
"enum": ["iOS"]
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -5525,9 +5477,7 @@
|
||||
{
|
||||
"description": "A variable that is set while calling the command from the webview API.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"validator"
|
||||
],
|
||||
"required": ["validator"],
|
||||
"properties": {
|
||||
"raw": {
|
||||
"description": "Marks the validator as a raw regex, meaning the plugin should not make any modification at runtime.\n\nThis means the regex will not match on the entire string by default, which might be exploited if your regex allow unexpected input to be considered valid. When using this option, make sure your regex is correct.",
|
||||
@ -5560,4 +5510,4 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"productName": "HuLa",
|
||||
"version": "2.5.1",
|
||||
"identifier": "com.tauri.build",
|
||||
"version": "2.5.2",
|
||||
"identifier": "com.hula.pc",
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
"beforeBuildCommand": "pnpm build",
|
||||
@ -9,9 +9,7 @@
|
||||
"devUrl": "http://127.0.0.1:6130"
|
||||
},
|
||||
"bundle": {
|
||||
"resources": [
|
||||
"tray"
|
||||
],
|
||||
"resources": ["tray"],
|
||||
"createUpdaterArtifacts": true,
|
||||
"active": true,
|
||||
"icon": [],
|
||||
@ -33,9 +31,7 @@
|
||||
"installMode": "passive"
|
||||
},
|
||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDk1NkNENEZFNzg1MjVFMEEKUldRS1hsSjQvdFJzbGJXcnNPNXBYZ2RlTmlRRFZYYVI3YXhiWGpYZXFwVUtucThZUnJHUGw5dVUK",
|
||||
"endpoints": [
|
||||
"https://github.com/HuLaSpark/HuLa/releases/latest/download/latest.json"
|
||||
]
|
||||
"endpoints": ["https://github.com/HuLaSpark/HuLa/releases/latest/download/latest.json"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"productName": "HuLa",
|
||||
"version": "2.5.1",
|
||||
"identifier": "com.tauri.build",
|
||||
"version": "2.5.2",
|
||||
"identifier": "com.hula.pc",
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
"beforeBuildCommand": "pnpm build",
|
||||
@ -9,13 +9,9 @@
|
||||
"devUrl": "http://127.0.0.1:6130"
|
||||
},
|
||||
"bundle": {
|
||||
"resources": [
|
||||
"tray"
|
||||
],
|
||||
"resources": ["tray"],
|
||||
"active": true,
|
||||
"targets": [
|
||||
"app"
|
||||
],
|
||||
"targets": ["app", "dmg"],
|
||||
"icon": [
|
||||
"icons/macos/32x32.png",
|
||||
"icons/macos/128x128.png",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"productName": "HuLa",
|
||||
"version": "2.5.1",
|
||||
"identifier": "com.tauri.build",
|
||||
"version": "2.5.2",
|
||||
"identifier": "com.hula.pc",
|
||||
"build": {
|
||||
"beforeDevCommand": "pnpm dev",
|
||||
"beforeBuildCommand": "pnpm build",
|
||||
@ -9,13 +9,9 @@
|
||||
"devUrl": "http://127.0.0.1:6130"
|
||||
},
|
||||
"bundle": {
|
||||
"resources": [
|
||||
"tray"
|
||||
],
|
||||
"resources": ["tray"],
|
||||
"active": true,
|
||||
"targets": [
|
||||
"msi"
|
||||
],
|
||||
"targets": ["msi"],
|
||||
"icon": [
|
||||
"icons/windows/32x32.png",
|
||||
"icons/windows/128x128.png",
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<NaiveProvider :message-max="3" :notific-max="3">
|
||||
<div v-if="!isLock" id="app">
|
||||
<div v-if="!isLock" id="app-container">
|
||||
<router-view />
|
||||
</div>
|
||||
|
||||
@ -102,7 +102,7 @@ onUnmounted(() => {
|
||||
})
|
||||
</script>
|
||||
<style lang="scss">
|
||||
#app {
|
||||
#app-container {
|
||||
min-height: 100vh;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
@ -141,7 +141,7 @@ const handleEnter = (el: any) => {
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
el.style.height = `${h}px`
|
||||
el.style.transition = '0.5s'
|
||||
el.style.transition = '0.3s'
|
||||
})
|
||||
})
|
||||
}
|
||||
@ -168,6 +168,8 @@ const handleAfterEnter = (el: any) => {
|
||||
.context-menu {
|
||||
@include menu-item-style();
|
||||
.emoji-list {
|
||||
-webkit-backdrop-filter: blur(10px);
|
||||
background: var(--bg-menu);
|
||||
@apply size-fit p-4px select-none;
|
||||
.emoji-item {
|
||||
@apply size-28px rounded-4px text-16px cursor-pointer hover:bg-[--emoji-hover];
|
||||
|
@ -166,7 +166,7 @@ const handleAitKeyChange = (direction: 1 | -1) => {
|
||||
const newIndex = Math.max(0, Math.min(currentIndex + direction, personList.value.length - 1))
|
||||
selectedAitKey.value = personList.value[newIndex].uid
|
||||
// 获取新选中项在列表中的索引,并滚动到该位置(使用key来进行定位)
|
||||
virtualListInst.value?.scrollTo({ key: selectedAitKey.value })
|
||||
virtualListInst.value?.scrollTo({ index: newIndex })
|
||||
}
|
||||
|
||||
const closeMenu = (event: any) => {
|
||||
|
@ -173,6 +173,7 @@
|
||||
</n-flex>
|
||||
<!-- 气泡样式 -->
|
||||
<ContextMenu
|
||||
@contextmenu="handleMacSelect"
|
||||
@mouseenter="handleMouseEnter(item.message.id)"
|
||||
@mouseleave="handleMouseLeave"
|
||||
class="w-fit"
|
||||
@ -381,6 +382,9 @@ const hoverBubble = ref<{
|
||||
}>({
|
||||
key: -1
|
||||
})
|
||||
/** 记录右键菜单时选中的气泡的元素(用于处理mac右键会选中文本的问题) */
|
||||
const recordEL = ref()
|
||||
const isMac = computed(() => type() === 'macos')
|
||||
const { removeTag, userUid } = useCommon()
|
||||
const {
|
||||
handleScroll,
|
||||
@ -515,9 +519,24 @@ const scrollBottom = () => {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 解决mac右键会选中文本的问题
|
||||
* @param event
|
||||
*/
|
||||
const handleMacSelect = (event: any) => {
|
||||
if (isMac.value) {
|
||||
event.target.classList.add('select-none')
|
||||
recordEL.value = event.target
|
||||
}
|
||||
}
|
||||
|
||||
const closeMenu = (event: any) => {
|
||||
if (!event.target.matches('.bubble', 'bubble-oneself')) {
|
||||
activeBubble.value = -1
|
||||
// 解决mac右键会选中文本的问题
|
||||
if (isMac.value) {
|
||||
recordEL.value.classList.remove('select-none')
|
||||
}
|
||||
}
|
||||
if (!event.target.matches('.active-reply')) {
|
||||
/** 解决更替交换回复气泡时候没有触发动画的问题 */
|
||||
|
@ -215,13 +215,11 @@ export const useMsgInput = (messageInputDom: Ref) => {
|
||||
/** 当输入框手动输入值的时候触发input事件(使用vueUse的防抖) */
|
||||
const handleInput = useDebounceFn(async (e: Event) => {
|
||||
const inputElement = e.target as HTMLInputElement
|
||||
console.log('input', inputElement)
|
||||
// 如果输入框中只有<br />标签,则清空输入框内容
|
||||
// TODO: 为什么这里输入后会有一个br标签?
|
||||
if (inputElement.innerHTML === '<br>') {
|
||||
inputElement.innerHTML = ''
|
||||
msgInput.value = inputElement.innerHTML
|
||||
return
|
||||
}
|
||||
msgInput.value = inputElement.innerHTML || ''
|
||||
const { range, selection } = getEditorRange()!
|
||||
|
@ -15,6 +15,9 @@
|
||||
}
|
||||
}
|
||||
.bubble {
|
||||
&::selection {
|
||||
background: red; /* 设置选中背景为透明 */
|
||||
}
|
||||
@include bubble;
|
||||
}
|
||||
.bubble-oneself {
|
||||
|
@ -31,7 +31,7 @@
|
||||
.fade-move,
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: all 0.8s cubic-bezier(0.55, 0, 0.1, 1);
|
||||
transition: all 0.6s cubic-bezier(0.55, 0, 0.1, 1);
|
||||
}
|
||||
|
||||
.fade-enter-from,
|
||||
|
@ -7,7 +7,6 @@ import { getRootPath, getSrcPath } from './build/config/getPath'
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||
import unocss from '@unocss/vite'
|
||||
import terser from '@rollup/plugin-terser'
|
||||
import { atStartup } from './build/config/console'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
/**! 不需要优化前端打包(如开启gzip) */
|
||||
@ -35,8 +34,6 @@ export default defineConfig(({ mode }: ConfigEnv) => {
|
||||
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: 'true'
|
||||
},
|
||||
plugins: [
|
||||
/**! 启动时候打印项目信息(不需要可关闭) */
|
||||
atStartup(config, mode),
|
||||
/**
|
||||
* vue3.5.0已支持解构并具有响应式
|
||||
* */
|
||||
|
Loading…
Reference in New Issue
Block a user