mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-03-02 17:21:15 +01:00
1 line
31 KiB
Plaintext
1 line
31 KiB
Plaintext
|
{"version":3,"file":"Import-CWswmNcW.js","sources":["../../../resources/js/components/formElements/FormTextarea.vue","../../../resources/js/views/twofaccounts/Import.vue"],"sourcesContent":["<script setup>\n import { useIdGenerator, useValidationErrorIdGenerator } from '@/composables/helpers'\n\n defineOptions({\n inheritAttrs: false\n })\n\n const props = defineProps({\n modelValue: [String, Number, Boolean],\n label: {\n type: String,\n default: ''\n },\n fieldName: {\n type: String,\n default: '',\n required: true\n },\n fieldError: [String],\n placeholder: {\n type: String,\n default: ''\n },\n help: {\n type: String,\n default: ''\n },\n size: {\n type: String,\n default: ''\n },\n hasOffset: {\n type: Boolean,\n default: false\n },\n isDisabled: {\n type: Boolean,\n default: false\n },\n maxLength: {\n type: Number,\n default: null\n },\n isIndented: Boolean,\n leftIcon: '',\n rightIcon: '',\n idSuffix: {\n type: String,\n default: ''\n }\n })\n\n const { inputId } = useIdGenerator(props.inputType, props.fieldName + props.idSuffix)\n const { valErrorId } = useValidationErrorIdGenerator(props.fieldName)\n const legendId = useIdGenerator('legend', props.fieldName).inputId\n</script>\n\n<template>\n <div class=\"mb-3\" :class=\"{ 'pt-3' : hasOffset, 'is-flex' : isIndented }\">\n <div v-if=\"isIndented\" class=\"mx-2 pr-1\" :style=\"{ 'opacity': isDisabled ? '0.5' : '1' }\">\n <FontAwesomeIcon class=\"has-text-grey\" :icon=\"['fas', 'chevron-right']\" transform=\"rotate-135\"/>\n </div>\n <div class=\"field\" :class=\"{ 'is-flex-grow-5' : isIndented }\">\n <label v-if=\"label\" :for=\"inputId\" class=\"label\" v-html=\"$t(label)\"></label>\n <div class=\"control\" :class=\"{ 'has-icons-left' : leftIcon, 'has-icons-right': rightIcon }\">\n <textarea \n :disabled=\"isDisabled\" \n :id=\"inputId\"\n class=\"textarea\" \n :class=\"size\"\n :value=\"modelValue\" \n :placeholder=\"placeholder\" \n v-bind=\"$attrs\"\n v-on:input=\"$emit('update:modelValue', $event.target.value)\"\n v-on:change=\"$emit('change:modelValue', $event.target.value)\"\n :maxlength=\"maxLength\"\n :aria-describedby=\"help ? legendId : undefined\"\n :aria-invalid=\"fieldError != undefined\"\n :aria-errormessage=\"fieldError != undefined ? valErrorId : undefined\" \n />\n </div>\n <FieldError v-if=\"fieldError != undefined\" :error=\"fieldError\" :field=\"fieldName\" />\n <p :id=\"legendId\" class=\"help\" v-html=\"$t(help)\" v-if=\"help\"></p>\n </div>\n </div> \n</template>\n","<script setup>\n import Form from '@/components/formElements/Form'\n import FormTextarea from '@/components/formElements/FormTextarea.vue'\n import twofaccountService from '@/services/twofaccountService'\n import OtpDisplay from '@/components/OtpDisplay.vue'\n import Spinner from '@/components/Spinner.vue'\n import { useNotifyStore } from '@/stores/notify'\n import { useUserStore } from '@/stores/user'\n import { useBusStore } from '@/stores/bus'\n import { useTwofaccounts } from '@/stores/twofaccounts'\n import { UseColorMode } from '@vueuse/components'\n\n const $2fauth = inject('2fauth')\n const notify = useNotifyStore()\n const user = useUserStore()\n const bus = useBusStore()\n const twofaccounts = useTwofaccounts()\n const otpDisplay = ref(null)\n const fil
|