1
1
<script setup lang="ts">
2
- import { AdvancedConfig , GearButton , GlobalConfig , InputMethodConfig , ThemeConfig } from ' fcitx5-config-vue'
2
+ import { AdvancedConfig , GearButton , GlobalConfig , InputMethodConfig , PluginManager , ThemeConfig } from ' fcitx5-config-vue'
3
3
import { NModal , NSelect , NSpace , NTooltip } from ' naive-ui'
4
4
import { computed , ref } from ' vue'
5
5
import { inputMethod , inputMethods , loading } from ' ../fcitx'
6
6
import AdvancedButton from ' ./AdvancedButton.vue'
7
7
import GlobalButton from ' ./GlobalButton.vue'
8
8
import MenuButton from ' ./MenuButton.vue'
9
+ import PluginButton from ' ./PluginButton.vue'
9
10
import ThemeButton from ' ./ThemeButton.vue'
10
11
11
12
const options = computed (() => {
@@ -16,12 +17,13 @@ const options = computed(() => {
16
17
})
17
18
18
19
const showModal = ref (false )
19
- const modalType = ref <' im' | ' global' | ' theme' | ' advanced' >(' im' )
20
+ const modalType = ref <' im' | ' global' | ' theme' | ' plugin ' | ' advanced' >(' im' )
20
21
21
22
const titleMap = {
22
23
im: ' Input Method' ,
23
24
global: ' Global Config' ,
24
25
theme: ' Theme Editor' ,
26
+ plugin: ' Plugin Manager' ,
25
27
advanced: ' Advanced' ,
26
28
}
27
29
</script >
@@ -53,6 +55,12 @@ const titleMap = {
53
55
</template >
54
56
{{ titleMap.theme }}
55
57
</NTooltip >
58
+ <NTooltip >
59
+ <template #trigger >
60
+ <PluginButton @click =" modalType = 'plugin'; showModal = true" />
61
+ </template >
62
+ {{ titleMap.plugin }}
63
+ </NTooltip >
56
64
<NTooltip >
57
65
<template #trigger >
58
66
<AdvancedButton @click =" modalType = 'advanced'; showModal = true" />
@@ -61,6 +69,7 @@ const titleMap = {
61
69
</NTooltip >
62
70
<NModal
63
71
v-model:show =" showModal"
72
+ :style =" modalType === 'plugin' ? 'width: auto' : 'max-width: 1024px'"
64
73
preset =" card"
65
74
:title =" titleMap[modalType]"
66
75
>
@@ -78,6 +87,10 @@ const titleMap = {
78
87
v-else-if =" modalType === 'theme'"
79
88
@close =" showModal = false"
80
89
/>
90
+ <PluginManager
91
+ v-else-if =" modalType === 'plugin'"
92
+ @close =" showModal = false"
93
+ />
81
94
<AdvancedConfig
82
95
v-else
83
96
@close =" showModal = false"
0 commit comments