Skip to content

Commit

Permalink
feat(api): settings description
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Feb 10, 2022
1 parent ec2c324 commit bfe481c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/api/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export interface PluginDescriptor {

export type PluginSettingsItem = {
label: string
description?: string
} & ({
type: 'boolean'
defaultValue: boolean
Expand Down
3 changes: 2 additions & 1 deletion packages/app-backend-vue2/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export function setupPlugin (api: DevtoolsApi, app: App, Vue) {
logo: 'https://vuejs.org/images/icons/favicon-96x96.png',
settings: {
legacyActions: {
label: 'Legacy Actions (enable with Vuex < 3.1.0)',
label: 'Legacy Actions',
description: 'Enable this for Vuex < 3.1.0',
type: 'boolean',
defaultValue: false,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ export default defineComponent({
class="flex-1 select-none text-sm py-1.5"
@click="onLabelClick()"
>
{{ schema.label }}
<div>{{ schema.label }}</div>
<div
v-if="schema.description"
class="opacity-75 text-xs"
>
{{ schema.description }}
</div>
</div>
<div class="w-1/2">
<VueSwitch
Expand Down

0 comments on commit bfe481c

Please sign in to comment.