11<script setup lang="ts">
22import type { UploadFileInfo } from ' naive-ui'
3- import { NA , NFlex , NList , NListItem , NUpload , NUploadDragger , useMessage } from ' naive-ui'
3+ import { NA , NAlert , NCode , NFlex , NList , NListItem , NUpload , NUploadDragger , useMessage } from ' naive-ui'
44import { computed , ref } from ' vue'
55
66const message = useMessage ()
@@ -9,7 +9,7 @@ function getInstalledPlugins() {
99 return window .fcitx .getInstalledPlugins ().sort ()
1010}
1111
12- const allPlugins = [' anthy' , ' chewing' , ' chinese-addons' , ' hallelujah' , ' hangul' , ' lua' , ' rime' , ' sayura' , ' thai' , ' unikey' ]
12+ const allPlugins = [' anthy' , ' chewing' , ' chinese-addons' , ' hallelujah' , ' hangul' , ' lua' , ' mozc ' , ' rime' , ' sayura' , ' thai' , ' unikey' ]
1313const installedPlugins = ref <string []>(getInstalledPlugins ())
1414const availablePlugins = computed (() => allPlugins .filter (plugin => ! installedPlugins .value .includes (plugin )))
1515
@@ -37,11 +37,17 @@ async function onUpload(files: UploadFileInfo[]) {
3737
3838<template >
3939 <NFlex size =" large" >
40- <NUpload v-model:file-list =" fileList" style =" width : auto " multiple accept =" .zip" @update:file-list =" onUpload" >
41- <NUploadDragger style =" height : 200px " >
42- Download and drag zip to this area
43- </NUploadDragger >
44- </NUpload >
40+ <NFlex vertical >
41+ <NUpload v-model:file-list =" fileList" style =" width : auto " multiple accept =" .zip" @update:file-list =" onUpload" >
42+ <NUploadDragger style =" height : 200px " >
43+ Download and drag zip to this area
44+ </NUploadDragger >
45+ </NUpload >
46+ <NAlert title =" Warning" type =" warning" >
47+ Mozc doesn't work on Chrome unless start the process with <br >
48+ <NCode >--enable-features=WebAssemblyUnlimitedSyncCompilation</NCode >
49+ </NAlert >
50+ </NFlex >
4551 <NFlex >
4652 <NList style =" min-width : 100px " >
4753 <template #header >
0 commit comments