mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh] Add default icon for alert
This commit is contained in:
parent
f9fb6ed02a
commit
358e6978a4
3 changed files with 15 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<vue-showdown :markdown="label" flavor="github"/>
|
||||
<vue-showdown :markdown="label" flavor="github" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<b-alert :variant="type" show>
|
||||
<icon :iname="icon" />
|
||||
<icon :iname="icon_" />
|
||||
{{ label }}
|
||||
</b-alert>
|
||||
</template>
|
||||
|
@ -9,6 +9,18 @@
|
|||
export default {
|
||||
name: 'ReadOnlyAlertItem',
|
||||
|
||||
data () {
|
||||
let icons = {
|
||||
success: 'thumbs-up',
|
||||
info: 'info',
|
||||
warning: 'warning',
|
||||
danger: 'ban'
|
||||
}
|
||||
return {
|
||||
icon_: (this.icon) ? this.icon : icons[this.type]
|
||||
}
|
||||
},
|
||||
|
||||
props: {
|
||||
id: { type: String, default: null },
|
||||
label: { type: String, default: null },
|
||||
|
|
|
@ -56,7 +56,7 @@ export function adressToFormValue (address) {
|
|||
* @return {Object} an formated argument containing formItem props, validation and base value.
|
||||
*/
|
||||
export function formatYunoHostArgument (arg) {
|
||||
let value = (arg.value !== undefined) ? arg.value : null
|
||||
let value = (arg.value !== undefined) ? arg.value : (arg.current_value !== undefined) ? arg.current_value : null
|
||||
const validation = {}
|
||||
arg.ask = formatI18nField(arg.ask)
|
||||
const field = {
|
||||
|
|
Loading…
Reference in a new issue