diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80635f8f..5a439e95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,12 @@ name: Build on: - workflow_dispatch: push: branches: # The branch where the project source code resides # 项目源代码所在的分支 - main + - dev jobs: build: @@ -41,12 +41,12 @@ jobs: - name: Upload Zip uses: actions/upload-artifact@v3 - with: + with: name: BewlyBewly Zip path: extension.zip - + - name: Upload Crx uses: actions/upload-artifact@v3 - with: + with: name: BewlyBewly Crx path: extension.crx diff --git a/package.json b/package.json index 7f9544bf..17ace57d 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,19 @@ "lint": "eslint .", "test": "vitest test" }, + "dependencies": { + "@types/md5": "^2.3.5", + "dplayer": "^1.27.1", + "md5": "^2.3.0", + "mitt": "^3.0.1", + "overlayscrollbars": "^2.4.5", + "overlayscrollbars-vue": "^0.5.6", + "pinia": "^2.1.7", + "qrcode.vue": "^3.4.1", + "vue-i18n": "^9.7.0", + "vue-toastification": "2.0.0-rc.5", + "vuedraggable": "^4.1.0" + }, "devDependencies": { "@antfu/eslint-config": "^0.39.8", "@ffflorian/jszip-cli": "^3.5.1", @@ -72,18 +85,5 @@ "web-ext": "^7.8.0", "webext-bridge": "^5.0.5", "webextension-polyfill": "^0.10.0" - }, - "dependencies": { - "@types/md5": "^2.3.5", - "dplayer": "^1.27.1", - "md5": "^2.3.0", - "mitt": "^3.0.1", - "overlayscrollbars": "^2.4.5", - "overlayscrollbars-vue": "^0.5.6", - "pinia": "^2.1.7", - "qrcode.vue": "^3.4.1", - "vue-i18n": "^9.7.0", - "vue-toastification": "2.0.0-rc.5", - "vuedraggable": "^4.1.0" } } diff --git a/scripts/client.ts b/scripts/client.ts index 6f828930..8493cfd0 100644 --- a/scripts/client.ts +++ b/scripts/client.ts @@ -1,6 +1,8 @@ +/* eslint-disable unused-imports/no-unused-vars */ import type { ErrorPayload, HMRPayload, Update } from 'vite' import type { ViteHotContext } from 'vite/types/hot' import type { InferCustomEventPayload } from 'vite/types/customEvent' + // Vite v3 doesn't export overlay // import { ErrorOverlay, overlayId } from 'vite/src/client/overlay' diff --git a/scripts/prepare.ts b/scripts/prepare.ts index 74b915be..a1b353c7 100644 --- a/scripts/prepare.ts +++ b/scripts/prepare.ts @@ -1,5 +1,5 @@ // generate stub index.html files for dev entry -import { execSync } from 'child_process' +import { execSync } from 'node:child_process' import fs from 'fs-extra' import chokidar from 'chokidar' import { isDev, log, r } from './utils' diff --git a/scripts/utils.ts b/scripts/utils.ts index 03d25ec5..959cc577 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -1,7 +1,8 @@ -import { resolve } from 'path' +import { resolve } from 'node:path' +import process from 'node:process' import { bgCyan, black } from 'kolorist' -export const port = parseInt(process.env.PORT || '') || 3303 +export const port = Number.parseInt(process.env.PORT || '') || 3303 export const r = (...args: string[]) => resolve(__dirname, '..', ...args) export const isDev = process.env.NODE_ENV !== 'production' export const isWin = process.platform === 'win32' diff --git a/src/components/Select.vue b/src/components/Select.vue index eb4e88da..c7a9b26b 100644 --- a/src/components/Select.vue +++ b/src/components/Select.vue @@ -69,7 +69,7 @@ function onMouseEnter() { truncate overflow="hidden" m="r-2" - v-text="label === 'undefined' ? ' ' : label" + v-text="label === 'undefined' ? '' : label" /> diff --git a/src/components/Topbar/Topbar.vue b/src/components/Topbar/Topbar.vue index dd4e007e..87e42f15 100644 --- a/src/components/Topbar/Topbar.vue +++ b/src/components/Topbar/Topbar.vue @@ -23,7 +23,7 @@ const activatedPage = inject('activatedPage') as Ref const scrollbarRef = inject('scrollbarRef') as Ref const mid = getUserID() || '' -const userInfo = reactive({}) as UnwrapNestedRefs +const userInfo = reactive>({}) as UnwrapNestedRefs const hideTopbar = ref(false) const hovingTopbar = ref(false) @@ -40,7 +40,7 @@ const showMorePop = ref(false) const momentsPopKey = ref(`momentsPop[${Number(new Date())}]`) const isLogin = ref(false) -const unReadMessage = reactive( +const unReadMessage = reactive>( {}, ) as UnwrapNestedRefs const unReadDm = reactive({} as UnwrapNestedRefs) diff --git a/src/components/Topbar/components/MomentsPop.vue b/src/components/Topbar/components/MomentsPop.vue index 26a7099b..f9e5f520 100644 --- a/src/components/Topbar/components/MomentsPop.vue +++ b/src/components/Topbar/components/MomentsPop.vue @@ -1,3 +1,4 @@ +