Skip to content

Commit 11ba9dd

Browse files
committed
fix: installPlugin must be called after fcitxReady
1 parent 6aef0e6 commit 11ba9dd

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v5
1515

16-
- uses: actions/setup-node@v5
16+
- uses: actions/setup-node@v6
1717
with:
1818
node-version: 24.x
1919

2020
- name: Install dependencies
2121
run: |
22-
wget -P cache https://github.com/fcitx-contrib/fcitx5-js/releases/download/latest/fcitx5-js.tgz
22+
curl -LO --output-dir cache https://github.com/fcitx-contrib/fcitx5-js/releases/download/latest/fcitx5-js.tgz
2323
npm i -g pnpm
2424
pnpm i
2525

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
"build": "vite build && vue-tsc -d --emitDeclarationOnly"
1212
},
1313
"devDependencies": {
14-
"@antfu/eslint-config": "^6.0.0",
14+
"@antfu/eslint-config": "^6.1.0",
1515
"@vitejs/plugin-vue": "^6.0.1",
1616
"eslint": "^9.38.0",
1717
"fcitx5-js": "file:cache/fcitx5-js.tgz",
1818
"naive-ui": "^2.43.1",
1919
"typescript": "5.9.3",
20-
"vite": "^7.1.11",
20+
"vite": "^7.1.12",
2121
"vooks": "^0.2.12",
2222
"vue": "^3.5.22",
2323
"vue-i18n": "11",
24-
"vue-tsc": "^3.1.1"
24+
"vue-tsc": "^3.1.2"
2525
}
2626
}

src/PluginManager.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
22
import type { UploadFileInfo } from 'naive-ui'
3+
import { fcitxReady } from 'fcitx5-js'
34
import { NA, NFlex, NList, NListItem, NUpload, NUploadDragger, useMessage } from 'naive-ui'
45
import { computed, ref } from 'vue'
56
import { t } from './i18n'
@@ -17,6 +18,7 @@ const availablePlugins = computed(() => allPlugins.filter(plugin => !installedPl
1718
const fileList = ref<UploadFileInfo[]>([])
1819
1920
async function onUpload(files: UploadFileInfo[]) {
21+
await fcitxReady
2022
// Must clear the fileList synchronously first as uploading multiple files will trigger multiple times.
2123
fileList.value = []
2224
for (const file of files) {

0 commit comments

Comments
 (0)