diff --git a/src/components/mobile/NumberPadSheet.vue b/src/components/mobile/NumberPadSheet.vue index 5a54d2a0..e5b8b92b 100644 --- a/src/components/mobile/NumberPadSheet.vue +++ b/src/components/mobile/NumberPadSheet.vue @@ -65,281 +65,295 @@ - diff --git a/src/lib/ui/mobile.js b/src/lib/ui/mobile.js index 981b3b3d..b0fbcdf1 100644 --- a/src/lib/ui/mobile.js +++ b/src/lib/ui/mobile.js @@ -1,3 +1,4 @@ +import { useI18n as useVueI18n } from 'vue-i18n'; import { f7, f7ready } from 'framework7-vue'; import { FontSize, FONT_SIZE_PREVIEW_CLASSNAME_PREFIX } from '@/core/font.ts'; @@ -192,3 +193,13 @@ export function scrollToSelectedItem(parentEl, containerSelector, selectedItemSe container.scrollTop(targetPos); } + +export function useI18nUIComponents() { + const i18nGlobal = useVueI18n(); + + return { + showAlert: (message, confirmCallback) => showAlert(message, confirmCallback, i18nGlobal.t), + showConfirm: (message, confirmCallback, cancelCallback) => showConfirm(message, confirmCallback, cancelCallback, i18nGlobal.t), + showToast: (message, timeout) => showToast(message, timeout, i18nGlobal.t) + }; +}