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,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<b-alert :variant="type" show>
|
<b-alert :variant="type" show>
|
||||||
<icon :iname="icon" />
|
<icon :iname="icon_" />
|
||||||
{{ label }}
|
{{ label }}
|
||||||
</b-alert>
|
</b-alert>
|
||||||
</template>
|
</template>
|
||||||
|
@ -9,6 +9,18 @@
|
||||||
export default {
|
export default {
|
||||||
name: 'ReadOnlyAlertItem',
|
name: 'ReadOnlyAlertItem',
|
||||||
|
|
||||||
|
data () {
|
||||||
|
let icons = {
|
||||||
|
success: 'thumbs-up',
|
||||||
|
info: 'info',
|
||||||
|
warning: 'warning',
|
||||||
|
danger: 'ban'
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
icon_: (this.icon) ? this.icon : icons[this.type]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
id: { type: String, default: null },
|
id: { type: String, default: null },
|
||||||
label: { 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.
|
* @return {Object} an formated argument containing formItem props, validation and base value.
|
||||||
*/
|
*/
|
||||||
export function formatYunoHostArgument (arg) {
|
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 = {}
|
const validation = {}
|
||||||
arg.ask = formatI18nField(arg.ask)
|
arg.ask = formatI18nField(arg.ask)
|
||||||
const field = {
|
const field = {
|
||||||
|
|
Loading…
Reference in a new issue