Support boolean config fields in plugins
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2334>
This commit is contained in:
parent
f4241241dc
commit
993fb426ee
|
@ -0,0 +1 @@
|
|||
Support boolean config fields in plugins
|
|
@ -188,6 +188,19 @@ const submitAndScan = async () => {
|
|||
:html="useMarkdownRaw(field.help)"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-if="field.type === 'boolean'"
|
||||
class="field"
|
||||
>
|
||||
<div class="ui toggle checkbox">
|
||||
<input
|
||||
:id="`plugin-${field.name}`"
|
||||
v-model="values[field.name]"
|
||||
type="checkbox"
|
||||
>
|
||||
<label :for="`plugin-${field.name}`">{{ field.label || field.name }}</label>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
<button
|
||||
|
|
|
@ -390,11 +390,11 @@ export interface Plugin {
|
|||
enabled: boolean
|
||||
description?: string
|
||||
source?: string
|
||||
values?: Record<string, string>
|
||||
values?: Record<string, any>
|
||||
conf?: {
|
||||
name: string
|
||||
label: string
|
||||
type: 'text' | 'long_text' | 'url' | 'password'
|
||||
type: 'text' | 'long_text' | 'url' | 'password' | 'boolean'
|
||||
help?: string
|
||||
}[]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue