perf: optimize danmuku theme styles
This commit is contained in:
parent
2d051fedd7
commit
4f6eb560fe
4 changed files with 670 additions and 962 deletions
32
package.json
32
package.json
|
@ -45,7 +45,7 @@
|
||||||
"homepage": "https://github.com/molvqingtai/WebChat",
|
"homepage": "https://github.com/molvqingtai/WebChat",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hookform/resolvers": "^3.9.0",
|
"@hookform/resolvers": "^3.9.0",
|
||||||
"@lottiefiles/dotlottie-react": "^0.9.1",
|
"@lottiefiles/dotlottie-react": "^0.9.2",
|
||||||
"@perfsee/jsonr": "^1.13.0",
|
"@perfsee/jsonr": "^1.13.0",
|
||||||
"@radix-ui/react-avatar": "^1.1.1",
|
"@radix-ui/react-avatar": "^1.1.1",
|
||||||
"@radix-ui/react-checkbox": "^1.1.2",
|
"@radix-ui/react-checkbox": "^1.1.2",
|
||||||
|
@ -64,19 +64,19 @@
|
||||||
"@resreq/timer": "^1.1.6",
|
"@resreq/timer": "^1.1.6",
|
||||||
"@rtco/client": "^0.2.17",
|
"@rtco/client": "^0.2.17",
|
||||||
"@tailwindcss/typography": "^0.5.15",
|
"@tailwindcss/typography": "^0.5.15",
|
||||||
"@webext-core/messaging": "^1.4.0",
|
"@webext-core/messaging": "^2.0.2",
|
||||||
"@webext-core/proxy-service": "^1.2.0",
|
"@webext-core/proxy-service": "^1.2.0",
|
||||||
"class-variance-authority": "^0.7.0",
|
"class-variance-authority": "^0.7.0",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"danmu": "^0.12.0",
|
"danmu": "^0.14.0",
|
||||||
"date-fns": "^4.1.0",
|
"date-fns": "^4.1.0",
|
||||||
"framer-motion": "^11.11.9",
|
"framer-motion": "^11.11.10",
|
||||||
"idb-keyval": "^6.2.1",
|
"idb-keyval": "^6.2.1",
|
||||||
"lucide-react": "^0.453.0",
|
"lucide-react": "^0.453.0",
|
||||||
"nanoid": "^5.0.7",
|
"nanoid": "^5.0.7",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
"react-hook-form": "^7.53.0",
|
"react-hook-form": "^7.53.1",
|
||||||
"react-markdown": "^9.0.1",
|
"react-markdown": "^9.0.1",
|
||||||
"react-use": "^17.5.1",
|
"react-use": "^17.5.1",
|
||||||
"react-virtuoso": "^4.12.0",
|
"react-virtuoso": "^4.12.0",
|
||||||
|
@ -96,22 +96,22 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^19.5.0",
|
"@commitlint/cli": "^19.5.0",
|
||||||
"@commitlint/config-conventional": "^19.5.0",
|
"@commitlint/config-conventional": "^19.5.0",
|
||||||
"@eslint-react/eslint-plugin": "^1.15.0",
|
"@eslint-react/eslint-plugin": "^1.15.1",
|
||||||
"@eslint/js": "^9.12.0",
|
"@eslint/js": "^9.13.0",
|
||||||
"@semantic-release/changelog": "^6.0.3",
|
"@semantic-release/changelog": "^6.0.3",
|
||||||
"@semantic-release/exec": "^6.0.3",
|
"@semantic-release/exec": "^6.0.3",
|
||||||
"@semantic-release/git": "^10.0.1",
|
"@semantic-release/git": "^10.0.1",
|
||||||
"@types/eslint": "^9.6.1",
|
"@types/eslint": "^9.6.1",
|
||||||
"@types/eslint-plugin-tailwindcss": "^3.17.0",
|
|
||||||
"@types/eslint__js": "^8.42.3",
|
"@types/eslint__js": "^8.42.3",
|
||||||
"@types/node": "^22.7.5",
|
"@types/eslint-plugin-tailwindcss": "^3.17.0",
|
||||||
"@types/react": "^18.3.11",
|
"@types/node": "^22.8.1",
|
||||||
|
"@types/react": "^18.3.12",
|
||||||
"@types/react-dom": "^18.3.1",
|
"@types/react-dom": "^18.3.1",
|
||||||
"@typescript-eslint/parser": "^8.9.0",
|
"@typescript-eslint/parser": "^8.11.0",
|
||||||
"@vitejs/plugin-react": "^4.3.2",
|
"@vitejs/plugin-react": "^4.3.3",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^9.12.0",
|
"eslint": "^9.13.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-plugin-prettier": "^5.2.1",
|
"eslint-plugin-prettier": "^5.2.1",
|
||||||
"eslint-plugin-tailwindcss": "^3.17.5",
|
"eslint-plugin-tailwindcss": "^3.17.5",
|
||||||
|
@ -124,14 +124,14 @@
|
||||||
"postcss-rem-to-responsive-pixel": "^6.0.2",
|
"postcss-rem-to-responsive-pixel": "^6.0.2",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"rimraf": "^6.0.1",
|
"rimraf": "^6.0.1",
|
||||||
"semantic-release": "^24.1.2",
|
"semantic-release": "^24.2.0",
|
||||||
"tailwindcss": "^3.4.14",
|
"tailwindcss": "^3.4.14",
|
||||||
"tailwindcss-animate": "^1.0.7",
|
"tailwindcss-animate": "^1.0.7",
|
||||||
"typescript": "^5.6.3",
|
"typescript": "^5.6.3",
|
||||||
"typescript-eslint": "^8.9.0",
|
"typescript-eslint": "^8.11.0",
|
||||||
"vite-plugin-svgr": "^4.2.0",
|
"vite-plugin-svgr": "^4.2.0",
|
||||||
"webext-bridge": "^6.0.1",
|
"webext-bridge": "^6.0.1",
|
||||||
"wxt": "^0.19.11"
|
"wxt": "^0.19.13"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{js,jsx,ts,tsx}": "eslint --fix --flag unstable_ts_config"
|
"*.{js,jsx,ts,tsx}": "eslint --fix --flag unstable_ts_config"
|
||||||
|
|
1579
pnpm-lock.yaml
1579
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -20,7 +20,7 @@ const DanmakuMessage: FC<PromptItemProps> = ({ data, className, onClick, onMouse
|
||||||
onMouseLeave={onMouseLeave}
|
onMouseLeave={onMouseLeave}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
className={cn(
|
className={cn(
|
||||||
'flex justify-center pointer-events-auto visible gap-x-2 border px-2.5 py-0.5 rounded-full bg-primary/30 text-base font-medium text-white dark:bg-slate-800 dark:text-slate-50 backdrop-blur-md',
|
'flex justify-center pointer-events-auto visible gap-x-2 border border-slate-50 px-2.5 py-0.5 rounded-full bg-primary/30 text-base font-medium text-white backdrop-blur-md',
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|
|
@ -73,15 +73,20 @@ const NotificationDomain = Remesh.domain({
|
||||||
map((message) => {
|
map((message) => {
|
||||||
const notificationEnabled = get(IsEnabledQuery())
|
const notificationEnabled = get(IsEnabledQuery())
|
||||||
if (notificationEnabled) {
|
if (notificationEnabled) {
|
||||||
const userInfo = get(userInfoDomain.query.UserInfoQuery())
|
// Compatible with old versions, without the atUsers field
|
||||||
const hasAtSelf = message.atUsers.find((user) => user.userId === userInfo?.id)
|
if (message.atUsers) {
|
||||||
if (userInfo?.notificationType === 'all') {
|
const userInfo = get(userInfoDomain.query.UserInfoQuery())
|
||||||
|
const hasAtSelf = message.atUsers.find((user) => user.userId === userInfo?.id)
|
||||||
|
if (userInfo?.notificationType === 'all') {
|
||||||
|
return PushCommand(message)
|
||||||
|
}
|
||||||
|
if (userInfo?.notificationType === 'at' && hasAtSelf) {
|
||||||
|
return PushCommand(message)
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
} else {
|
||||||
return PushCommand(message)
|
return PushCommand(message)
|
||||||
}
|
}
|
||||||
if (userInfo?.notificationType === 'at' && hasAtSelf) {
|
|
||||||
return PushCommand(message)
|
|
||||||
}
|
|
||||||
return null
|
|
||||||
} else {
|
} else {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue