Skip to content

Commit bfe481c

Browse files
committed
feat(api): settings description
1 parent ec2c324 commit bfe481c

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

packages/api/src/plugin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export interface PluginDescriptor {
2020

2121
export type PluginSettingsItem = {
2222
label: string
23+
description?: string
2324
} & ({
2425
type: 'boolean'
2526
defaultValue: boolean

packages/app-backend-vue2/src/plugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export function setupPlugin (api: DevtoolsApi, app: App, Vue) {
2121
logo: 'https://vuejs.org/images/icons/favicon-96x96.png',
2222
settings: {
2323
legacyActions: {
24-
label: 'Legacy Actions (enable with Vuex < 3.1.0)',
24+
label: 'Legacy Actions',
25+
description: 'Enable this for Vuex < 3.1.0',
2526
type: 'boolean',
2627
defaultValue: false,
2728
},

packages/app-frontend/src/features/plugin/PluginSettingsItem.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ export default defineComponent({
5151
class="flex-1 select-none text-sm py-1.5"
5252
@click="onLabelClick()"
5353
>
54-
{{ schema.label }}
54+
<div>{{ schema.label }}</div>
55+
<div
56+
v-if="schema.description"
57+
class="opacity-75 text-xs"
58+
>
59+
{{ schema.description }}
60+
</div>
5561
</div>
5662
<div class="w-1/2">
5763
<VueSwitch

0 commit comments

Comments
 (0)