Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI 流程优化 #110

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/workflows/build-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,6 @@ jobs:
fi
# 获取版本号
echo VERSION=$(node -p "require('./package.json').version") >> $GITHUB_OUTPUT
# 设置 Node.js 版本
- name: Load Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
# 更新依赖
- name: Install
run: yarn
# 代码检查
- name: Lint
run: yarn lint

# ========================= 构建 Web 版本 =========================
build-pages:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 在主分支上构建
name: lint
on:
pull_request: # PR 触发
branches:
- next

jobs:
lint:
runs-on: ubuntu-latest
steps:
# 拉取代码
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
persist-credentials: false
# 设置 Node.js 版本
- name: Load Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
# 更新依赖
- name: Install
run: yarn
# 代码检查
- name: Lint
run: yarn lint
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stapxs-qq-lite",
"version": "2.7.17",
"version": "2.7.18",
"private": false,
"author": "Stapx Steve [林槐]",
"description": "一个兼容 OneBot 的非官方网页版 QQ 客户端,使用 Vue 重制的全新版本。",
Expand Down
1 change: 0 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ export default defineComponent({
this.tags.page = view
},
barMainClick() {
console.log(1111)
if(loginInfo.status) {
this.changeTab('信息', 'Messages', false)
} else {
Expand Down
22 changes: 18 additions & 4 deletions src/components/AboutPan.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
<span style="text-align: center;">{{ $t('description') }}</span>
<a>v{{ packageInfo.version }}</a>
<div class="buttons">
<a class="ss-button" @click="openLink('https://github.com/Stapxs/Stapxs-QQ-Lite-2.0')">{{
<a class="ss-button" @click="goGithub()">{{
$t('option_info_visit_github') }}</a>
<a class="ss-button" style="width: 30px;" @click="openLink('https://blog.stapxs.cn/About.html')">
<a class="ss-button" style="width: 30px;" @click="goBlog()">
<font-awesome-icon :icon="['fas', 'circle-info']"/>
</a>
</div>
Expand Down Expand Up @@ -127,12 +127,14 @@
</template>

<script lang="ts">
import Umami from '@stapxs/umami-logger-typescript'
import DepPan from './DepPan.vue'
import packageInfo from '../../package.json'

import { defineComponent } from 'vue'
import { openLink } from '@/function/utils/appUtil'
import { ContributorElem } from '@/function/elements/system'

import DepPan from './DepPan.vue'
import packageInfo from '../../package.json'
import { runtimeData } from '@/function/msg'

export default defineComponent({
Expand All @@ -158,6 +160,18 @@ export default defineComponent({
template: DepPan
}
runtimeData.popBoxList.push(popInfo)
},

goGithub() {
openLink('https://github.com/Stapxs/Stapxs-QQ-Lite-2.0')
// UM:统计点击事件
Umami.trackEvent('click_statistics', { name: 'visit_github' })
},

goBlog() {
openLink('https://blog.stapxs.cn/About.html')
// UM:统计点击事件
Umami.trackEvent('click_statistics', { name: 'visit_blog' })
}
},
mounted() {
Expand Down
3 changes: 3 additions & 0 deletions src/function/utils/msgUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { runtimeData } from '@/function/msg'
import { v4 as uuid } from 'uuid'
import { Connector } from '@/function/connect'
import { BotMsgType } from '../elements/information'
import Umami from '@stapxs/umami-logger-typescript'

const logger = new Logger()

Expand Down Expand Up @@ -397,5 +398,7 @@ export function sendMsgRaw(id: string, type: string, msg: string | { type: strin
break
}
}
// UM:统计消息发送次数
Umami.trackEvent('sendMsg', { type: type })
}
}
18 changes: 16 additions & 2 deletions src/pages/options/OptView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</div>
<div class="theme-color-col">
<label v-for="(name, index) in colors" :title="name" :key="'color_id_' + index" class="ss-radio">
<input type="radio" name="theme_color" @change="save" :data-id="index"
<input type="radio" name="theme_color" @change="save($event); gaColor($event)" :data-id="index"
:checked="runtimeData.sysConfig.theme_color === undefined ? index === 0 : Number(runtimeData.sysConfig.theme_color) === index">
<div :style="'background: var(--color-main-' + index + ');'">
<div></div>
Expand Down Expand Up @@ -116,7 +116,7 @@
<span>{{ $t('option_dev_chatview_name') }}</span>
<span>{{ $t('option_dev_chatview_name_tip') }}</span>
</div>
<select @change="save" name="chatview_name" title="chatview_name" v-model="chatview_name">
<select @change="save($event); gaChatView($event)" name="chatview_name" title="chatview_name" v-model="chatview_name">
<option value="">{{ $t('option_dev_chatview_name_none') }}</option>
<option v-for="item in getAppendChatView()" :value="item" :key="item">{{ item.replace('Chat', '') }}</option>
</select>
Expand Down Expand Up @@ -217,6 +217,18 @@ export default defineComponent({
Umami.trackEvent('use_language', { name: sender.value })
},

gaChatView(event: Event) {
const sender = event.target as HTMLInputElement
// UM:上传Chat View 选择
Umami.trackEvent('use_chatview', { name: sender.value })
},

gaColor(event: Event) {
const sender = event.target as HTMLInputElement
// UM:上传主题颜色选择
Umami.trackEvent('use_theme_color', { name: this.colors[Number(sender.dataset.id)] })
},

setInitialScaleShow(event: Event) {
const sender = event.target as HTMLInputElement
this.initialScaleShow = Number(sender.value)
Expand Down Expand Up @@ -245,6 +257,8 @@ export default defineComponent({
sender.checked = false
} else {
baseApp.classList.add('no-touch')
// UM:上传禁用触摸(彩蛋)的选择
Umami.trackEvent('click_statistics', { name: 'touch_randomly' })
}
}
},
Expand Down