mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
ts: add useAutoModal typing
This commit is contained in:
parent
026ccb68ed
commit
3e60b96ee0
1 changed files with 9 additions and 6 deletions
|
@ -1,18 +1,21 @@
|
|||
import type { OrchestratedModal } from 'bootstrap-vue-next'
|
||||
import { BModal, useModalController } from 'bootstrap-vue-next'
|
||||
import { h } from 'vue'
|
||||
import { useModalController, BModal } from 'bootstrap-vue-next'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { VueShowdown } from 'vue-showdown'
|
||||
|
||||
export function useAutoModal() {
|
||||
const { t } = useI18n()
|
||||
const { confirm, show } = useModalController()
|
||||
|
||||
return function (
|
||||
message,
|
||||
props_,
|
||||
message: string,
|
||||
props_: OrchestratedModal = {},
|
||||
{ markdown = false, cancelable = true } = {},
|
||||
) {
|
||||
const props = {
|
||||
okTitle: this.$t('ok'),
|
||||
cancelTitle: this.$t('cancel'),
|
||||
const props: OrchestratedModal = {
|
||||
okTitle: t('ok'),
|
||||
cancelTitle: t('cancel'),
|
||||
centered: true,
|
||||
okOnly: !cancelable,
|
||||
...(markdown
|
||||
|
|
Loading…
Reference in a new issue