diff --git a/.env b/.env index e37cfc4a..4bc5d2f6 100644 --- a/.env +++ b/.env @@ -1,5 +1,11 @@ +# 功能 API 相关设置 +VUE_APP_LINK_VIEW=https://api.stapxs.cn/tool/page-info/ + +# 用户统计 umami 相关设置 VUE_APP_MU_ADDRESS=https://status.stapxs.cn VUE_APP_MU_ID=fa20b37d-93a3-41d5-a180-dd66fbbcc573 VUE_APP_MU_SHARE=https://status.stapxs.cn/share/dxwhBcriczpA7wWQ/Stapxs%20QQ%20Lite%202.0 + +# 高德地图相关设置 VUE_APP_AMAP_KEY=99b8849d7b67f05e9f834bde4108f0f9 -VUE_APP_AMAP_SECRET=e9ac5aac621defdd6bb111b55fb75d73 \ No newline at end of file +VUE_APP_AMAP_SECRET=e9ac5aac621defdd6bb111b55fb75d73 diff --git a/.eslintrc.js b/.eslintrc.js index 54605507..27cdc4ff 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,18 +1,35 @@ module.exports = { - root: true, - env: { - node: true - }, - 'extends': [ - 'plugin:vue/vue3-essential', - 'eslint:recommended', - '@vue/typescript/recommended' - ], - parserOptions: { - ecmaVersion: 2020 - }, - rules: { - "@typescript-eslint/no-explicit-any": "off", // 忽略使用 any 类型的错误 - "no-debugger": 1 // debugger 改为警告而非错误 - } + root: true, + env: { + node: true + }, + 'extends': [ + 'plugin:vue/vue3-essential', + 'eslint:recommended', + '@vue/typescript/recommended' + ], + parserOptions: { + ecmaVersion: 2020 + }, + rules: { + // 基础规则 + '@typescript-eslint/no-explicit-any': 'off', // 忽略使用 any 类型的错误 + 'no-debugger': 'warn', // debugger + 'no-console': 'warn', // console + 'prefer-arrow-callback': 'warn', // 优先使用箭头函数 + 'quotes': ['warn', 'single'], // 引号 + // Vue 相关规则 + 'vue/html-closing-bracket-spacing': ['warn', { + 'startTag': 'never', + 'endTag': 'never', + 'selfClosingTag': 'always' + }], // html 标签闭合 + 'vue/html-quotes': [ 'warn', + 'double', + { 'avoidEscape': true } + ], // html 引号 + 'vue/v-for-delimiter-style': ['error', 'in'], // v-for 分隔符 + 'vue/require-name-property': 'warn', // 组件 name 属性 + 'vue/prefer-true-attribute-shorthand': 'warn', // 属性简写 + } } diff --git a/README.md b/README.md index 222b0414..548d4e85 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@

Stapxs QQ Lite 2.0

- +

一个兼容 OneBot 的非官方网页 QQ 客户端 diff --git a/README/gitcode.png b/README/gitcode.png new file mode 100644 index 00000000..5f4c5726 Binary files /dev/null and b/README/gitcode.png differ diff --git a/package.json b/package.json index 255e7ed4..76097629 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stapxs-qq-lite", - "version": "2.7.18", + "version": "2.8.0", "private": false, "author": "Stapx Steve [林槐]", "description": "一个兼容 OneBot 的非官方网页版 QQ 客户端,使用 Vue 重制的全新版本。", @@ -8,6 +8,7 @@ "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint", + "lint:fix": "vue-cli-service lint --fix", "electron:build": "vue-cli-service electron:build", "electron:serve": "vue-cli-service electron:serve", "postinstall": "electron-builder install-app-deps", @@ -16,6 +17,7 @@ "dependencies": { "@jakejarrett/gtk-theme": "^2.0.1", "@stapxs/umami-logger-typescript": "^1.0.12", + "@types/prismjs": "^1.26.4", "axios": "^1.7.2", "browser-image-compression": "^2.0.0", "core-js": "^3.8.3", @@ -27,6 +29,7 @@ "js-yaml-loader": "^1.2.2", "jsonpath": "^1.1.1", "pinyin": "^3.0.0-alpha.4", + "prismjs": "^1.29.0", "raw-loader": "^4.0.2", "register-service-worker": "^1.7.2", "semver-compare": "^1.0.0", @@ -38,6 +41,7 @@ "vue": "^3.2.13", "vue-clipboard2": "^0.3.3", "vue-i18n": "^9.2.2", + "vue-prism-editor": "^2.0.0-alpha.2", "vue3-bcui": "^0.2.3", "vue3-danmaku": "^1.6.0", "vue3-infinite-scroll-better": "^2.2.0", diff --git a/src/App.vue b/src/App.vue index 7d286a3a..a9c4e7cd 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,36 +11,39 @@

+
+ +
-
+
{{ msg.text }}
- +
@@ -134,7 +140,7 @@
{{ runtimeData.popBoxList[0].title }} - +
img { + height: 44px; + width: 44px; } .respond { @@ -636,6 +644,49 @@ font-size: 0.7rem; } +.script-view .list { + margin-left: -20px; +} +.script-view .list > header { + margin-top: 35px; +} +.script-view .list > header > span { + margin: 10px -5px 0 -5px; + font-size: 0.8rem; +} +.script-view .list-body { + margin: 0 -5px; +} +.script-view .list-body h2 { + font-size: 0.9rem; +} +.script-view .list-body span { + font-size: 0.8rem; +} +.script-view .list-body span svg { + margin: 0; + font-size: 0.75rem; +} +.script-view .editor-main { + box-shadow: -5px 0px 4px -5px var(--color-shader); +} +.script-view .save-controller > span, +.script-view .save-controller > svg { + font-size: 0.8rem; +} +.script-view .opt-item > select, +.script-view .ss-button { + height: 30px !important; +} +.script-view .ss-button, +.script-view .opt-item > select, +.script-view .ss-button > svg { + font-size: 0.75rem; +} +.script-view .editor { + font-size: 0.8rem; +} + @media (max-width: 700px) { .main-body > ul { background: var(--color-card-2) !important; diff --git a/src/assets/css/append/append_vibrancy.css b/src/assets/css/append/append_vibrancy.css index 39cfd48e..792ad0bc 100644 --- a/src/assets/css/append/append_vibrancy.css +++ b/src/assets/css/append/append_vibrancy.css @@ -89,6 +89,15 @@ left: 270px; } +.script-view { + background: rgba(var(--color-card-rgb), 0.6) !important; +} +.script-view .list > header > span, +.script-view .list-body > div { + background: transparent; + backdrop-filter: blur(10px); +} + @media (max-width: 500px) { .chat-pan > div.info { margin-top: 35px; diff --git a/src/assets/css/chat.css b/src/assets/css/chat.css index 8d7a2015..1d122ab3 100644 --- a/src/assets/css/chat.css +++ b/src/assets/css/chat.css @@ -383,6 +383,7 @@ input { } .merge-pan > div:last-child > div:first-child svg { color: var(--color-font); + cursor: pointer; height: 1.5rem; } .merge-pan > div:last-child > div:last-child { @@ -728,6 +729,19 @@ input { .bulletins > div.base > div.body > span { white-space: pre-line; } +.bulletins > div.base > div.body > span > a { + color: var(--color-main) !important; + font-weight: bold; + text-decoration: underline; + padding: 0 5px; + opacity: 0.8; +} +.bulletins > div.base > div.body > span > a:before { + text-align: center; + content: '🔗'; + color: transparent; + text-shadow: 0 0 0 var(--color-font-1); +} .bulletins > div.base > div.info { background: var(--color-card-1); transition: background .3s; diff --git a/src/assets/css/msg.css b/src/assets/css/msg.css index 7914aede..0dad8820 100644 --- a/src/assets/css/msg.css +++ b/src/assets/css/msg.css @@ -12,6 +12,7 @@ margin: 5px 0; font-size: 1rem; flex-wrap: wrap; + transition: opacity 0.3s; } .message.forward { border: 2px solid var(--color-card-2); diff --git a/src/assets/css/options.css b/src/assets/css/options.css index 5736d976..6ca5b720 100644 --- a/src/assets/css/options.css +++ b/src/assets/css/options.css @@ -58,7 +58,14 @@ width: 25%; } .logo-card>svg>path:first-child { - fill: var(--color-main); + fill: var(--color-main) !important; +} +.logo-card>svg>path:not(:last-child):not(:nth-last-child(2)) { + fill: var(--color-card); +} +.logo-card>svg>path:last-child, +.logo-card>svg>path:nth-last-child(2) { + fill: var(--color-card-2); } .logo-card>a { diff --git a/src/assets/css/view.css b/src/assets/css/view.css index 642a8685..6e69f059 100644 --- a/src/assets/css/view.css +++ b/src/assets/css/view.css @@ -455,6 +455,8 @@ textarea:focus { font-size: 0.9rem; flex: 1; } +/* .friend-body > div > div a.nick { +} */ .friend-body.active > div > div a { color: var(--color-font-1-r); } diff --git a/src/assets/l10n/zh-CN.json b/src/assets/l10n/zh-CN.json index db673aeb..3a7216b5 100644 --- a/src/assets/l10n/zh-CN.json +++ b/src/assets/l10n/zh-CN.json @@ -250,6 +250,7 @@ "chat_chat_info_silence_all_tip": "你们是不整点活不开心是吧", "btn_accept": "同意", "btn_reject": "拒绝", + "btn_reflush": "刷新页面", "sys_notice_new_friend": "新朋友", "sys_notice": "系统消息", "chat_msg_menu_remove": "移出群聊", @@ -319,6 +320,19 @@ "chat_msg_menu_plus": "+ 1", "option_dev_chat_respond": "关闭回应功能", "option_dev_chat_respond_tip": "如果你不想用它或者 bot 不支持,可以关闭这个功能", + "chat_jump_reply_fail": "(获取回复消息失败)", + "title_scripts": "脚本", + "scripts_tip": "脚本功能提供了一种简便的自动化操作方式,能够执行如自动回复等任务。", + "scripts_run_save": "保存", + "scripts_run_condition": "条件", + "scripts_run_trigger": "触发", + "scripts_run_message": "新消息", + "option_dev_append": "进阶功能", + "option_dev_scripts_tip": "显示脚本功能面板", + "statue_enabled": "已启用", + "statue_disabled": "已禁用", + "scripts_run_title_err": "脚本标题已存在", + "scripts_run_notice": "脚本方法将限制在当前页面内,你可以参考当前页面的源代码来了解可用的方法可用。", "menu_about": "关于", "menu_update": "检查更新…", diff --git a/src/assets/pathMap/Lagrange.OneBot.yaml b/src/assets/pathMap/Lagrange.OneBot.yaml index 20cd748c..da3f0471 100644 --- a/src/assets/pathMap/Lagrange.OneBot.yaml +++ b/src/assets/pathMap/Lagrange.OneBot.yaml @@ -14,6 +14,7 @@ login_info: nickname: $.data.nickname # 群、好友列表 user_list: + name: get_friend_list|get_group_list source: $.data[*] list: group_id: /group_id @@ -29,6 +30,7 @@ user_list: # 收藏表情 roaming_stamp: name: fetch_custom_face + reverse: true # 消息列表 message_list: name: get_group_msg_history diff --git a/src/assets/pathMap/NapCat.Onebot.yaml b/src/assets/pathMap/NapCat.Onebot.yaml index f1fc6094..c3aeca52 100644 --- a/src/assets/pathMap/NapCat.Onebot.yaml +++ b/src/assets/pathMap/NapCat.Onebot.yaml @@ -13,18 +13,24 @@ login_info: bkn: "" nickname: $.data.nickname # 群、好友列表 -user_list: +friend_list: + name: get_friends_with_category + source: $.data[*] + list: + class_id: /categoryId + class_name: /categroyName + user_id: /user_id + nickname: /nickname + remark: /remark + longNick: /longNick +group_list: + name: get_group_list source: $.data[*] list: group_id: /group_id group_name: /group_name member_count: /member_count admin_flag: $.admins[?(@ == '')] - - class_id: null - user_id: /user_id - nickname: /nickname - remark: /remark # 消息列表 message_list: name: get_group_msg_history @@ -77,15 +83,6 @@ set_message_read: # 设置消息回应 send_respond: name: set_msg_emoji_like -# 获取分组信息 -class_list: - name: get_friends_with_category - source: $.data[*] - list: - class_id: /categoryId - class_name: /categroyName - user_count: /categroyMbCount - list: /buddyList # 获取群公告 group_notices: name: _get_group_notice @@ -108,4 +105,17 @@ group_essence: add_digest_uin: /add_digest_uin add_digest_nick: /add_digest_nick add_digest_time: /add_digest_time - is_end: $.data.is_end \ No newline at end of file + is_end: $.data.is_end +# 获取收藏表情 +roaming_stamp: + name: fetch_custom_face + pageed: true +# 获取历史会话 +recent_contact: + name: get_recent_contact + source: $.data[*] + list: + user_id: /peerUin + time: /msgTime + chat_type: /chatType + name: /peerName \ No newline at end of file diff --git a/src/assets/qed.txt b/src/assets/qed.txt index 8e4ad6ff..2ab131e0 100644 --- a/src/assets/qed.txt +++ b/src/assets/qed.txt @@ -1 +1 @@ -
错误报告(这是彩蛋)
Stapxs QQ Lite遇到错误,给您带来不便,我们深表庆幸。

我们已经产生了相关错误报告(报告中应该不包含你的任何隐私信息),希望您发送此报告给我们以帮助改善Stapxs QQ Lite的质量。
发送错误报告(S)
错误号:F6ED4FJDB6SKSZ7CG6Z9A07GDZ错误信息
错误模块:function printMsg()
\ No newline at end of file +
错误报告(这是彩蛋)
Stapxs QQ Lite遇到错误,给您带来不便,我们深表庆幸。

我们已经产生了相关错误报告(报告中应该不包含你的任何隐私信息),希望您发送此报告给我们以帮助改善Stapxs QQ Lite的质量。
发送错误报告(S)
错误号:F6ED4FJDB6SKSZ7CG6Z9A07GDZ错误信息
错误模块:function printMsg()
\ No newline at end of file diff --git a/src/background.ts b/src/background.ts index 7f3337f8..999b6333 100644 --- a/src/background.ts +++ b/src/background.ts @@ -21,6 +21,7 @@ protocol.registerSchemesAsPrivileged([ export let win = undefined as BrowserWindow | undefined export let touchBarInstance = undefined as touchBar | undefined +/* eslint-disable no-console */ async function createWindow() { console.log('') console.log(' _____ _____ _____ _____ __ __ \n' + @@ -154,7 +155,7 @@ app.on('window-all-closed', () => { }) if (process.platform === 'win32') { - app.removeAsDefaultProtocolClient("stapx-qq-lite") // 取消默认协议 + app.removeAsDefaultProtocolClient('stapx-qq-lite') // 取消默认协议 } app.quit() }) @@ -168,7 +169,7 @@ app.on('ready', async () => { if (process.platform === 'win32') { app.setAppUserModelId('Stapx QQ Lite') // 设置应用 ID - app.setAsDefaultProtocolClient("stapx-qq-lite") // 设置为默认协议 + app.setAsDefaultProtocolClient('stapx-qq-lite') // 设置为默认协议 } // 开发者工具 if (isDevelopment && !process.env.IS_TEST) { diff --git a/src/components/AboutPan.vue b/src/components/AboutPan.vue index 46907726..cb013243 100644 --- a/src/components/AboutPan.vue +++ b/src/components/AboutPan.vue @@ -9,14 +9,14 @@
- - - - - - - - + + + + + + + +
{{ $t('name') }} @@ -28,7 +28,7 @@ {{ $t('option_info_visit_github') }} - +
@@ -41,7 +41,7 @@
{{ $t('list_of_dependencies') }}
- +
@@ -192,7 +192,6 @@ export default defineComponent({ }) } }) - .catch(console.error) } }) diff --git a/src/components/BulletinBody.vue b/src/components/BulletinBody.vue index 788ffdb9..083e8154 100644 --- a/src/components/BulletinBody.vue +++ b/src/components/BulletinBody.vue @@ -8,14 +8,14 @@ + \ No newline at end of file diff --git a/src/components/DepPan.vue b/src/components/DepPan.vue index ea0491dd..88ad8331 100644 --- a/src/components/DepPan.vue +++ b/src/components/DepPan.vue @@ -12,36 +12,36 @@ {{ $t('powered_by') }} Vue.js
- +
- + {{ $t('dept_info') }}
aMap高德地图
- +
Border Card UIbcui.js
Apache 2.0
- +
Font Awesome
SIL OFL 1.1
-
+
QFace
MIT
- +
ServiceLogosvue.js logo
- +
diff --git a/src/components/FacePan.vue b/src/components/FacePan.vue index 3d563107..5a9d8387 100644 --- a/src/components/FacePan.vue +++ b/src/components/FacePan.vue @@ -10,7 +10,7 @@
-
@@ -22,8 +22,8 @@
-
- +
+ {{ $t('chat_face_pan_none').split('|')[0] }}
@@ -31,7 +31,7 @@
- +
- - + +
{{ toHtml(item.name) }}
@@ -26,7 +26,7 @@
- +
@@ -44,7 +44,7 @@
- +
@@ -40,7 +40,7 @@ import { getMsgRawTxt } from '@/function/utils/msgUtil' export default defineComponent({ name: 'FriendBody', - props: ['data', 'select', 'menu'], + props: ['data', 'select', 'menu', 'from'], data () { return { trueLang: getTrueLang(), diff --git a/src/components/MsgBody.vue b/src/components/MsgBody.vue index 4ad99b27..332279c8 100644 --- a/src/components/MsgBody.vue +++ b/src/components/MsgBody.vue @@ -26,20 +26,20 @@